Hi All,
I'm new to Domoticz and my qestion is probably basic, but I wasn't able to find an asnwer anywhere.
My goal: setup a door sensor as a single switch - type "contact"
Hardware: kerui door sensor connected through RFLink Gateway. It sends both "open" and "close" signals (https://www.aliexpress.com/item/6pcs-lo ... 26744.html)
What I did so far: The sensor is detected as two devices: type - Light/Switch, subtype: Eurodomest, Data: Open and Closed respectively
Problem: When I click "add light/switch device", I create two separate switches - one that records door opening and one recording door closing. I'd like to have a single switch, that would show Open or Closed.
Thanks in advance for any ideas.
cheers
Lech
Door Sensor as a single switch
Moderator: leecollings
-
- Posts: 4
- Joined: Thursday 12 January 2017 10:15
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Door Sensor as a single switch
I figured it out - here is my solution in case it helps anyone.
step 1: add two devices as switches ("Door Open", "Door Closed")
step 2: change the type of the switch to "Push On Button" and "Push Off Button" respectively
step 3: add a virtual sensor ("Front Door") and add it as a switch
step 4: create a device script:
If there is a simpler way - I'd appreciate if you post the solution here.
Cheers
step 1: add two devices as switches ("Door Open", "Door Closed")
step 2: change the type of the switch to "Push On Button" and "Push Off Button" respectively
step 3: add a virtual sensor ("Front Door") and add it as a switch
step 4: create a device script:
Code: Select all
commandArray = {}
if
devicechanged['Door Open'] == 'On'
then
commandArray['Front Door'] = 'On'
end
if
devicechanged['Door Closed'] == 'Off'
then
commandArray['Front Door'] = 'Off'
end
return commandArray
Cheers
-
- Posts: 113
- Joined: Friday 08 January 2016 12:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Door Sensor as a single switch
Could you just put a Json command in the on action of the closed switch, that would turn off the switch that was turned on by the open contact.
http://<username:password>@domoticz-ip<:port>/json.htm?type=command¶m=switchlight&idx=<switch id>&switchcmd=Off
http://<username:password>@domoticz-ip<:port>/json.htm?type=command¶m=switchlight&idx=<switch id>&switchcmd=Off
running domoticz 3.4834 on rpi2, with
Hue bridge / bulbs.
lightwave rf sockets, mood controlers, sensors & contacts.
Home bridge / Siri.
Ha bridge / echo Alexa.
Hard wired alarm system - setting home / away status.
Next: harmony hub.
Hue bridge / bulbs.
lightwave rf sockets, mood controlers, sensors & contacts.
Home bridge / Siri.
Ha bridge / echo Alexa.
Hard wired alarm system - setting home / away status.
Next: harmony hub.
-
- Posts: 76
- Joined: Saturday 31 December 2016 21:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Door Sensor as a single switch
Hmm I just added the open device then added the close device as a sub device of open, finally edit the master device to set it as contact type.
It seems to register open/closed fine - but is this not the best way to do it then?
It seems to register open/closed fine - but is this not the best way to do it then?
-
- Posts: 113
- Joined: Friday 08 January 2016 12:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Door Sensor as a single switch
This seems the simplest waySwifty wrote:Hmm I just added the open device then added the close device as a sub device of open, finally edit the master device to set it as contact type.
It seems to register open/closed fine - but is this not the best way to do it then?

Didn't think about sub device.
running domoticz 3.4834 on rpi2, with
Hue bridge / bulbs.
lightwave rf sockets, mood controlers, sensors & contacts.
Home bridge / Siri.
Ha bridge / echo Alexa.
Hard wired alarm system - setting home / away status.
Next: harmony hub.
Hue bridge / bulbs.
lightwave rf sockets, mood controlers, sensors & contacts.
Home bridge / Siri.
Ha bridge / echo Alexa.
Hard wired alarm system - setting home / away status.
Next: harmony hub.
-
- Posts: 2
- Joined: Tuesday 31 January 2017 7:27
- Target OS: -
- Domoticz version:
- Contact:
Re: Door Sensor as a single switch
Some generic door alarm are circuits with 2 reed switches output to single GPIO. But sometimes it is necessary to have asingle push plate, key single switch. Most installations only need actuator to activate automatic door which rely on harness for sonnection. Would like to share a very useful article for advantages of door sensors. http://cspalarms.ca/blog/home-security/ ... r-sensors/ . They usually transmit signals to the security alarms
-
- Posts: 1
- Joined: Saturday 24 March 2018 18:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Door Sensor as a single switch
Hello
J'ai acheté sur AliExpress KERUI 433 Mhz Sans Fil Intelligent PIR Motion Sensor Détecteur. Il fonctionne trés bien, est vu comme un switch "On/Off" et je déclenche un script sur "Action OFF" quand il y a un mouvement.
J'ai acheté sur AliExpress "KERUI ouvert rappel Capteur 433 mhz Tandis Que Sans Fil À Domicile D'alarme Fenêtre/Porte Capteur à Détecter Ouvert porte", pour résumer des contacts de porte/Fenêtre. Il fonctionne très bien, est vu comme 3 switch "On/Off" et je déclenche un script sur "Action ON" pour l'arrachement, un script "Action ON" quand on l'ouvre et un script "Action OFF" quand on le ferme.
Ceci pour votre information.
Par contre, si quelqu'un a une idée pour le détecteur Kerui de fuite d'eau : 433 MHz Sans Fil Détecteur D'intrusion D'eau Fuite Capteur. Il n'est pas vu dans Domoticz, la led s'allume mais rien ne passe dans la log
J'ai acheté sur AliExpress KERUI 433 Mhz Sans Fil Intelligent PIR Motion Sensor Détecteur. Il fonctionne trés bien, est vu comme un switch "On/Off" et je déclenche un script sur "Action OFF" quand il y a un mouvement.
J'ai acheté sur AliExpress "KERUI ouvert rappel Capteur 433 mhz Tandis Que Sans Fil À Domicile D'alarme Fenêtre/Porte Capteur à Détecter Ouvert porte", pour résumer des contacts de porte/Fenêtre. Il fonctionne très bien, est vu comme 3 switch "On/Off" et je déclenche un script sur "Action ON" pour l'arrachement, un script "Action ON" quand on l'ouvre et un script "Action OFF" quand on le ferme.
Ceci pour votre information.
Par contre, si quelqu'un a une idée pour le détecteur Kerui de fuite d'eau : 433 MHz Sans Fil Détecteur D'intrusion D'eau Fuite Capteur. Il n'est pas vu dans Domoticz, la led s'allume mais rien ne passe dans la log
Who is online
Users browsing this forum: No registered users and 1 guest