Files
esphome-dev/esphome/components
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:

https://github.com/Jpsy/esphome/commit/29339c14f96ed7cf7a68911ca7d9bd5eb94955d6

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-23 10:45:41 +02:00
2021-09-24 18:02:28 +02:00
2021-09-27 22:31:15 +02:00
2021-09-25 09:14:07 +02:00
2021-09-27 08:32:46 +13:00
2021-09-24 18:02:28 +02:00
2021-09-24 18:02:28 +02:00
2021-09-25 10:05:32 +02:00
2021-09-22 13:24:19 +02:00
2021-09-27 09:32:33 +13:00
2021-09-09 09:10:02 +12:00
2021-09-27 09:27:24 +13:00
2021-09-27 11:11:27 +13:00
2021-07-29 19:11:56 +02:00
2021-09-26 21:34:06 +13:00
2021-09-26 21:34:06 +13:00
2021-09-26 21:34:06 +13:00
2021-07-26 14:48:57 +02:00
2021-08-26 14:33:03 +12:00
2021-09-24 18:02:28 +02:00
2021-09-25 10:04:57 +02:00