(was: Solving not fysically switching, whilst switching in Domoticz)
Since I moved from a PC with Ubuntu, to a Raspberry Pi, I found a strange issue, which I am trying to solve more sturdily.
I have my shoplights switch off when I am more then 500 meters from the shop (and switch on when the door is opened and I am within those 500 meters). However, I found that on multiple occasions the lights were still on. The last time I saw this on my security camera, so I logged in into Domoticz and found that the device (aswell as the virtual switch) were set to "OFF". I turned the device on again and off, which solved the problem. I then changed the DZVents code to 1) Switch off, 2) Switch on after 5 seconds, 3) Switch off again after 10 seconds. For the time being it seemed to have worked (at least I haven't arrived in the shop anymore, seeing the lights being on still), but this is not a proper way to solve the issue, I would think.
I now realised there is a "Enable Polling" checkbox with each device, so I would think that it would be a good idea to switch on that polling. I would guess that if the device is switched off, but at the next poll the device returns that it is actually still on, the device would update the status of the device. A DZVents script could then be triggered upon the device change, and compare the switch status with the status of the virtual device. If they do not match, the virtual status would be implemented to the physical device.
Do you agree to such approach or is there a better solution?
- Raspberry Pi
- Domoticz Beta
- Aeon USB stick gen 5
- CoolCam Power plugs
Understanding the "Enable Polling"
Moderator: leecollings
-
- Posts: 60
- Joined: Tuesday 03 April 2018 18:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Understanding the "Enable Polling"
Last edited by Marque1968 on Friday 22 March 2019 7:27, edited 1 time in total.
-
- Posts: 60
- Joined: Tuesday 03 April 2018 18:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Solving not fysically switching, whilst switching in Domoticz
Perhaps I should change the title to "Understanding the Enable Poling", as that is in essence what I would like to know. Does it work as I described above?
Re: Understanding the "Enable Polling"
Hello my understanding of "Enable Polling" and "Red icons" in Domoticz:
Devices icon gets red when no data is received from this device on the server for more than the timeout value specified in Domoticz settings (default value is 60 minutes i guess). This does not always mean that the devices has an issue:
Examples:
- door sensors only send data when changing state (i.e. door opens or closes)
- some thermostats only send data when measured temperature changes OR target temperature changes. If the room temperature is stable for hours, Domoticz may not receive any data and this is normal.
To solve this, just changing the timeout value in Domoticz settings is fine (this is a global value, it cannot be changed "per device")
"Enable Polling" will force devices to send data periodically, consumming battery (and bandwidth).
For this reason, enable polling on door sensors, presence detection or other autonomous battery device is generally a bad idea.
Other devices like some electric measures, at the opposite, may need to enable polling to receive data.
Devices icon gets red when no data is received from this device on the server for more than the timeout value specified in Domoticz settings (default value is 60 minutes i guess). This does not always mean that the devices has an issue:
Examples:
- door sensors only send data when changing state (i.e. door opens or closes)
- some thermostats only send data when measured temperature changes OR target temperature changes. If the room temperature is stable for hours, Domoticz may not receive any data and this is normal.
To solve this, just changing the timeout value in Domoticz settings is fine (this is a global value, it cannot be changed "per device")
"Enable Polling" will force devices to send data periodically, consumming battery (and bandwidth).
For this reason, enable polling on door sensors, presence detection or other autonomous battery device is generally a bad idea.
Other devices like some electric measures, at the opposite, may need to enable polling to receive data.
Who is online
Users browsing this forum: No registered users and 1 guest