Best pratice for updating frequency of device values from plugin
Moderators: leecollings, remb0
- 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
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?
- 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
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
--
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
- 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
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.
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
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- 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
Thank you for the detailed answer, so ideally we would only send changed data and send a refresh after 5 minutes for all sensors.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.
- 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
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
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- 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
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?

- 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
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.
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
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 1 guest