1
0
mirror of https://github.com/esphome/esphome.git synced 2025-01-31 10:10:56 +00:00
0hax 5624fafb3a
Fix handling of timestamps in Teleinfo component. (#2392)
* teleinfo: avoid a buffer overflow.

When reading tag or values, data is written to the buffer even if the
size if bigger than the buffer. Add a new 'max_len' argument to
get_field() to avoid this error.

Signed-off-by: 0hax <0hax@protonmail.com>

* teleinfo: read extra timestamp field for some tags.

Some tags has an extra timestamp field that need to be read before the
actual data.
The code is inspired by Jpsy work:

29339c14f9

Signed-off-by: 0hax <0hax@protonmail.com>

* teleinfo: increase MAX_BUF_SIZE to suffice for 3-phase Linky in Standard mode.

* teleinfo: handle DATE tag correctly.

The DATE tag is special due its format and need to be handled
separately.
Fix from DrCoolzic.

Signed-off-by: 0hax <0hax@protonmail.com>

Co-authored-by: Jörg Wagner <jwagner@digilog.de>
2021-09-27 22:32:08 +02:00
2021-09-27 22:31:15 +02:00
2021-09-27 22:22:45 +02:00
2021-09-27 09:32:33 +13:00
2021-03-07 16:03:16 -03:00
2021-03-07 16:03:16 -03:00
2021-03-07 16:03:16 -03:00
2021-08-18 15:39:57 +12:00

ESPHome Discord Chat GitHub release

ESPHome Logo

Documentation: https://esphome.io/

For issues, please go to the issue tracker.

For feature requests, please see feature requests.

Description
No description provided
Readme Multiple Licenses 296 MiB
Languages
C++ 70.1%
Python 29.6%
C 0.1%