mivo wrote:Hi Logread,
I am testing your plugin, It is running OK for more than 1 day on my RPi without issues. I have beta 3.8025 compiled from source. Battery level of 2 Zwave radiator valves is reported correctly. Great work !
One minor suggestion - please try to set Domoticz.Heartbeat parameter in OnStart function. It will use longer interval of heartbeat calling (10 sec. by default) and can decrease CPU load. It will not worsen this plugin work - battery values updated every 30 mins. or more.
Thanks for your feedback.
Regarding the changing of the Heartbeat, your point is taken, though I will test this first against the warning on the wiki about heartbeat set to longer than 30 seconds:
Set the heartbeat interval in seconds, default 10 seconds. Values greater than 30 seconds will cause a message to be regularly logged about the plugin not responding. The plugin will actually function correctly with values greater than 30 though.
If I decide to implement this (that is is there is no annoying side effect such as clogging the logs), I will rather change the heartbeat interval after the first call to onHeartbeat function rather than in the onStart function, so that the battery levels remain updated 10s after the plugin is started as currently setup.
That being said, i have now four plugins I wrote using the same heartbeat code stucture running concurrently on the same system and I have not noticed any material load on the CPU or delays (on a Raspberry).