zigbee-herdsman-converters icon indicating copy to clipboard operation
zigbee-herdsman-converters copied to clipboard

Change default energy reporting change threshold to 0.01kWh

Open DataGhost opened this issue 1 year ago • 5 comments

Fixes #6787 (imo)

Decided to just make a PR in case you feel this is a sane default too. The current value of 0.1kWh is pretty large especially compared to other more easily fluctuating values being reported with changes as little as 5W or 0.05A. In contrast, it takes two full minutes at 3kW to use 0.1kWh and since most of these devices (I think) are going to be smart plugs that usually only switch "small" loads, it doesn't seem like something that's going to happen often. My dryer uses only half that power generally. Even at a 0.01kWh change that same load is only going to cause a message every 12 seconds so it's not going to flood the network.

DataGhost avatar Jan 08 '24 00:01 DataGhost

Even at a 0.01kWh change that same load is only going to cause a message every 12 seconds so it's not going to flood the network.

The question is if this is useful, might also be personal preference, but maybe the default should be 50W? (0.50)

Koenkk avatar Jan 08 '24 18:01 Koenkk

Not entirely sure what you mean. For 50W to equal "0.50" the unit has to be hectowatts and I'm not sure that's used anywhere? If you meant 0.50 for the energy that's 500Wh, not 50Wh, and that's a massive amount. Most of the devices I'm monitoring struggle to use that much in a week. The current default of 0.1 (100Wh) is also still rather large and close to the daily usage of a bunch of my monitored devices. I'm just arguing that 0.01kWh (or 10Wh) is a large enough value in most cases to warrant reporting changes about, and it's basically been the default until now IIRC, whether intentional or not. So changing it back only restores the default behaviour to how it was before.

Either way, it's probably a good idea to properly expose it in the web interface under reporting as well, that would have pointed me to the issue much sooner. It now just shows an empty box instead of the threshold value. And I think the default max rep interval of 65000 doesn't really help either, this used to be 3600 for each of those attributes.

DataGhost avatar Jan 08 '24 20:01 DataGhost

Sorry I meant 0.05W (so 0.05kW), what I tried to do with the modernExtend is to provide better defaults for the reporting. I think an energy report a few times a day should be good enough for most of the uses cases (of course users can change it)

Koenkk avatar Jan 09 '24 18:01 Koenkk

0.05kWh seems a better default than 0.10kWh anyway. Not my personal preference but it's adjustable so that's fine. I'll open another ticket for the UI side of things since my biggest concern turned out to be not knowing what value was used.

DataGhost avatar Jan 12 '24 10:01 DataGhost

Could you update this PR and fix the tests? Then this can be merged.

Koenkk avatar Jan 13 '24 13:01 Koenkk