Hi
I would like to create a small box with 3 leds that shows the state of 3 switches in Domoticz.
I (will soon) have 3 switches that shows whether or not my doors in the house is locked. I can see this in Domoticz. However, I would like to be able to see the state of my locks without computer/phone.
So what would be the best way.
Is it a NodeMcu/Esp8266 that uses Json to "poll" the switches?
Sould be a easy build but on the downside this Json would have to run about once a minute or every other minute.
So is there a different way? Some way to get a "ping" when the state changes on a switch?
I have a MySensors Gateway. Maybe thats the whay to go?
EDIT All the above text is talking about having the Domoticz controller and my "LED node" on the same wifi network. So the term externally in the title might be misleading.
Best way to externally read state of a switch?
Moderator: leecollings
-
- Posts: 6
- Joined: Friday 01 November 2013 19:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
-
- Posts: 722
- Joined: Friday 02 October 2015 12:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Finland
- Contact:
Re: Best way to externally read state of a switch?
Sounds to me that you are thinking this from the wrong direction
Domoticz is designed to be able to react (in several ways) to switch state changes, you can use for example lua scripts or blockly (= event system) or trigger other scripts via on/off action behind each switch. So, if I understood the requirement correctly. You just select one of these methods to handle the controlling of the leds. Easiest would be if they are controlled with something compatible with Domoticz (like MySensors) but in essence you can use anything "scriptable" - just associate the wall switches with appropriate on/off action scripts...

Domoticz is designed to be able to react (in several ways) to switch state changes, you can use for example lua scripts or blockly (= event system) or trigger other scripts via on/off action behind each switch. So, if I understood the requirement correctly. You just select one of these methods to handle the controlling of the leds. Easiest would be if they are controlled with something compatible with Domoticz (like MySensors) but in essence you can use anything "scriptable" - just associate the wall switches with appropriate on/off action scripts...

-
- Posts: 6
- Joined: Friday 01 November 2013 19:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Best way to externally read state of a switch?
Hmmm... Then MySensors is the way to go.
Ahhh... Whait. It would be EXACTLY like controlling 3 relays on a MySensor Node. Triggerd of cause from a script when the switch is altered.
Oh man, how could I not see that. =)
Thanx for you reply, and for opening my eyes. =)
Ahhh... Whait. It would be EXACTLY like controlling 3 relays on a MySensor Node. Triggerd of cause from a script when the switch is altered.
Oh man, how could I not see that. =)
Thanx for you reply, and for opening my eyes. =)
-
- Posts: 722
- Joined: Friday 02 October 2015 12:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Finland
- Contact:
Re: Best way to externally read state of a switch?
Exactly - glad I could helppopunonkok wrote:...Triggerd of cause from a script when the switch is altered...

Who is online
Users browsing this forum: No registered users and 1 guest