Best pratice for updating frequency of device values from plugin

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
User avatar
Ragdag
Posts: 152
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Best pratice for updating frequency of device values from plugin

Post by Ragdag »

I'm writing a plugin that is polling my heat pump every xx seconds, I'm wondering if it is best practice to only send changed values to the devices and exclude the other ones. Or would it be better from a history perspective and graphing to always send the values on each poll?
User avatar
psubiaco
Posts: 222
Joined: Monday 20 August 2018 9:38
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Italy
Contact:

Re: Best pratice for updating frequency of device values from plugin

Post by psubiaco »

You have to update only changed value, if you don't want to fill the device history with a huge quantity of data.
Paolo
--
I use DomBus modules to charge EV car, get a full alarm system, control heat pump, fire alarm detection, lights and much more. Video
Facebook page - Youtube channel
User avatar
waltervl
Posts: 5843
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Best pratice for updating frequency of device values from plugin

Post by waltervl »

In Domoticz it does not matter how much data you send for normal sensors (Temp, energy etc). These values are stored in the database every 5 minutes. If you send more times the updates will be stored only in memory and avarage will be stored in the database after 5 min.
But updating every x seconds could also trigger scripts or MQTT send actions every x seconds which could give extra load to your system.

For text devices and switches it is better to only send real changes as every update will be logged in the switch log. Switch log will be emptied every x days depending of your housekeeping settings but a lot of updates can create a lot of data.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
Ragdag
Posts: 152
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Best pratice for updating frequency of device values from plugin

Post by Ragdag »

waltervl wrote: Friday 07 February 2025 19:25 In Domoticz it does not matter how much data you send for normal sensors (Temp, energy etc). These values are stored in the database every 5 minutes. If you send more times the updates will be stored only in memory and avarage will be stored in the database after 5 min.
But updating every x seconds could also trigger scripts or MQTT send actions every x seconds which could give extra load to your system.

For text devices and switches it is better to only send real changes as every update will be logged in the switch log. Switch log will be emptied every x days depending of your housekeeping settings but a lot of updates can create a lot of data.
Thank you for the detailed answer, so ideally we would only send changed data and send a refresh after 5 minutes for all sensors.
User avatar
waltervl
Posts: 5843
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Best pratice for updating frequency of device values from plugin

Post by waltervl »

For switches and text devices only update when needed.... Even not refresh every 5 minutes.....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
Ragdag
Posts: 152
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Best pratice for updating frequency of device values from plugin

Post by Ragdag »

waltervl wrote: Friday 07 February 2025 19:43 For switches and text devices only update when needed.... Even not refresh every 5 minutes.....
Check, apologies I meant refresh for temperature, and custom sensors that have graph capabilities

Finally, is it possible in Domoticz to set levels in the graph indicating normal operating ranges?
Image
User avatar
waltervl
Posts: 5843
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Best pratice for updating frequency of device values from plugin

Post by waltervl »

For temperature and custom sensors just use a good polling time and update them.

There is as far as I know no extra level indication.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
Ragdag
Posts: 152
Joined: Friday 30 March 2018 13:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Best pratice for updating frequency of device values from plugin

Post by Ragdag »

waltervl wrote: Friday 07 February 2025 21:03 For temperature and custom sensors just use a good polling time and update them.

There is as far as I know no extra level indication.
Thanks for the help and information.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest