kbialek / deye-inverter-mqtt

Reads Deye solar inverter metrics and posts them over MQTT
Apache License 2.0
230 stars 50 forks source link

Inverter Frequency is more detailed as read 0.01 instead of 0.1 #171

Closed JensHoRi closed 5 months ago

JensHoRi commented 6 months ago

Reading the registers directly I saw, Frequency is shown as 49.89 Hz.

deye-inverter-mqtt only shows 49.9 Hz.

Maybe row in deye-inverter-mqtt/[src](https://github.com/kbialek/deye-inverter-mqtt/tree/main/src/deye_sensor.py needs to be changed to 0.01f in row print_format?

I'm no programmer, so here as in idea instead of send a pull request maybe causes an error

kbialek commented 6 months ago

Yes, I can confirm that. I own string and micro inverters, and they both report frequency with scale of 2. However, later the value is sent over MQTT using the 0.1f print format, which is the default for all metrics. This conversion is lossy and introduces accuracy error, but I do not think it needs fixing. Or do you have a use case which requires higher accuracy?

JensHoRi commented 6 months ago

That’s the reason I put it on enhancement ;)

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 5 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.