true state of a switch or lamp
Moderators: leecollings, remb0
-
- Posts: 22
- Joined: Saturday 02 May 2015 8:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3530
- Location: Sweden
- Contact:
true state of a switch or lamp
Hi
Is it possible for Domoticz to know the true state of an attached IO device?
If you have wifi relay modules and wall switches to control lightning that allows for querying of it's state, it should be possible for Domoticz to show its true state.
The way I see it, Domoticz assumes that the device always get the command sent by Domoticz and changes the devices icon accordingly. This could and will, result in Domoticz being out of sync with the devices true state and that in turn will lead to faulty behaviors in conditional scripts in Domoticz since those queries the Domoticz object that represents the attached IO device instead of the actual devices state.
Is it possible to change the Domoticz IO device icon upon confirmation from the device and not when clicked, if so how?
/Stefan
Is it possible for Domoticz to know the true state of an attached IO device?
If you have wifi relay modules and wall switches to control lightning that allows for querying of it's state, it should be possible for Domoticz to show its true state.
The way I see it, Domoticz assumes that the device always get the command sent by Domoticz and changes the devices icon accordingly. This could and will, result in Domoticz being out of sync with the devices true state and that in turn will lead to faulty behaviors in conditional scripts in Domoticz since those queries the Domoticz object that represents the attached IO device instead of the actual devices state.
Is it possible to change the Domoticz IO device icon upon confirmation from the device and not when clicked, if so how?
/Stefan
- gizmocuz
- Posts: 2482
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: true state of a switch or lamp
i think you might need to take a look at zwave
Quality outlives Quantity!
- Egregius
- Posts: 2589
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: true state of a switch or lamp
Why should a wifi relay board receive commands other than from domoticz?
-
- Posts: 22
- Joined: Saturday 02 May 2015 8:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3530
- Location: Sweden
- Contact:
Re: true state of a switch or lamp
It could receive a command from the device itself, ie a wall wart with a on/off switch.Egregius wrote:Why should a wifi relay board receive commands other than from domoticz?
But I don't think that is an issue, the issue imo, is to be sure the command was received and executed so you can trust the IO devices states as shown in Domoticz.
-
- Posts: 22
- Joined: Saturday 02 May 2015 8:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3530
- Location: Sweden
- Contact:
Re: true state of a switch or lamp
Are you saying that Domoticz will function in this way if I use z-wave devices?gizmocuz wrote:i think you might need to take a look at zwave
- Egregius
- Posts: 2589
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: true state of a switch or lamp
Yes, zwave devices report their status back to Domoticz.
For the wifi board, you could create a script that gets the status of it and compare it to the status reported by domoticz. If different update domoticz.
For the wifi board, you could create a script that gets the status of it and compare it to the status reported by domoticz. If different update domoticz.
-
- Posts: 22
- Joined: Saturday 02 May 2015 8:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3530
- Location: Sweden
- Contact:
Re: true state of a switch or lamp
Continuously or when changed or when queried?Egregius wrote:Yes, zwave devices report their status back to Domoticz.
Reporting back doesn't necessarily mean that Domoticz always shows the true state of the device.
The ESPeasy WiFi device I'm testing with does report back when changed, but it can still get out of sync with Domoticz if a command is lost.
To sort that out, I would have to do as you suggest; use a script that periodically ask for device state and updates Domoticz if accordingly.
That leads me to another question: How to ask a ESPeasy device of a GPIO state from Domoticz? Edit, I'll start a new thread for that

-
- Posts: 666
- Joined: Thursday 02 October 2014 6:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: Geleen
- Contact:
Re: true state of a switch or lamp
When the communicaion between a zwave device and the zwave controller gets lost, the devices will be marked 'dead'. This is reported back to Domoticz.
I use a greenwave switch. When I change the status of the switch either by updating the switch manually or by clicking in Domoticz, the state is updated in Domoticz.
I use a greenwave switch. When I change the status of the switch either by updating the switch manually or by clicking in Domoticz, the state is updated in Domoticz.
-
- Posts: 22
- Joined: Saturday 02 May 2015 8:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3530
- Location: Sweden
- Contact:
Re: true state of a switch or lamp
greenwave? What is this?jannl wrote:I use a greenwave switch.
-
- Posts: 666
- Joined: Thursday 02 October 2014 6:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: Geleen
- Contact:
Re: true state of a switch or lamp
Greenwave is a brand, at least sold in the Netherlands, look at robbshop.nl
-
- Posts: 22
- Joined: Saturday 02 May 2015 8:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3530
- Location: Sweden
- Contact:
Re: true state of a switch or lamp
How is that 'dead' state presented in the GUI? How can I set it to 'dead' from a script?jannl wrote:When the communicaion between a zwave device and the zwave controller gets lost, the devices will be marked 'dead'. This is reported back to Domoticz.
-
- Posts: 22
- Joined: Saturday 02 May 2015 8:38
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2.3530
- Location: Sweden
- Contact:
Re: true state of a switch or lamp
Thanks Jannl, very comprehensive line of products therejannl wrote:Greenwave is a brand, at least sold in the Netherlands, look at robbshop.nl

Re: true state of a switch or lamp
Let’s continue..
I’m using MQTT-switches (Sonoff Tasmota) as Dummy devices + MQTT Gateway.
I have no troubles with their actual On/Off state.. although..
Some of them are in fact disconnected/unplugged and last seen by Domoticz more than a day ago.
How can I get them offline/red in Domoticz (and eventually in HomeBridge)?
I’m using MQTT-switches (Sonoff Tasmota) as Dummy devices + MQTT Gateway.
I have no troubles with their actual On/Off state.. although..
Some of them are in fact disconnected/unplugged and last seen by Domoticz more than a day ago.
How can I get them offline/red in Domoticz (and eventually in HomeBridge)?
Who is online
Users browsing this forum: No registered users and 1 guest