Closed Trickfilm400 closed 1 month ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@Trickfilm400 I had a look at an unrelated bug in sml decoding and stumbled upon an issue with the value handling. Could you maybe have a look if this issue persists with the next release (hoping that my pr is merged in that)?
The problem
Hi,
I have a esp with an sml component and the OBIS Code Values in hex format are incorrectly converted to decimal numbers with an offset off 256.
Output of the log of esphome:
The main error: number seems to be converted wrong::
The OBIS Info show a hex number of
fde0
which, if entered in a calculator, results in64992
, which is not64736
, which is returned by esphome.64992 - 64736 = 256
- which is very interesting.The HEX Number is the correct number which the smart meter also displays, so it doesn't seem to be a reading issue with the sensor.
Another note is the strange behavior: the result in home assistant (so the sensor value of esphome) is for 3/4 days correct, then the value has an offset of
-256
for 3/4 days, then after another 3/4 days the value is correct again. After 3/4 days the value gets an offset of+256
which is also for 3/4 days, after which its correct again. This cycle repeats itself.A reboot / reflash doesn't fix anything.
I have no idea that the hell is going on, this issue started since the beginning. Has anyone experienced something similar already? If I forgot to provide something, just tell me
Maybe similar to this: https://github.com/esphome/issues/issues/4858
Which version of ESPHome has the issue?
ESPHome version 202x.x.x
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2024.2.x (every version)
What platform are you using?
ESP32
Board
ESP32-WROOM-32 with hichi ttl sensor
Component causing the issue
sml
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response