Hey everyone, I’m currently working on optimizing my smart home setup and came across an interesting challenge with my Modbus TCP energy meter. The meter is constantly updating power values, which causes a lot of log entries and unnecessary data in my persistence database. For example, the power value is jittering around 1 Watt, as shown below:
09:17:22.906 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘ez_pool_Wirkleistung_L123’ changed from 261 W to 260 W
09:17:23.913 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘ez_pool_Wirkleistung_L123’ changed from 260 W to 261 W
This is spamming my logs and creating a lot of redundant data. I wonder if there’s a way to set a threshold at the item level so that the item only updates when the difference from the previous value is more than ±10W. This would significantly reduce the noise in my logs and persistence database.
Looking at the Modbus definition, I see that the meter is configured to poll every second, which is quite frequent. Maybe adjusting the refresh interval could help, but I’d prefer to keep the real-time data as is. Instead, I’m hoping there’s a threshold setting that can filter out these small fluctuations.
Has anyone encountered a similar issue or found a workaround? Any insights or suggestions would be greatly appreciated! ![]()
Cheers,
[Your Name]