Door switch and status

Moderator: leecollings

Post Reply
ikoon
Posts: 5
Joined: Wednesday 09 August 2023 12:09
Target OS: -
Domoticz version:
Contact:

Door switch and status

Post by ikoon »

Hello

I have tasmota relay which control open/close door and switch, which get door status (open or closes), all in one tasmota device.
I created virtual switch in domoticz and point to it on tasmota switch. But I also need to see if door is opened or closed.
So I want domoticz device, which show status of door and if I push it, than it send command to tasmota relay.
It is possible without two virtual devices?

Sorry for my english...

ikoon
User avatar
waltervl
Posts: 5396
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Door switch and status

Post by waltervl »

I do not completely understand: The virtual switch you have already controlls the relay on/off (= door open/close)?
If you realy want to show if the door is open then you also need a door sensor (eg microswitch?) connected to tasmota device that detects if the door is open or closed. That state then has to be pushed by tasmota to domoticz.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
ikoon
Posts: 5
Joined: Wednesday 09 August 2023 12:09
Target OS: -
Domoticz version:
Contact:

Re: Door switch and status

Post by ikoon »

Yes, I have one virtual sensor switch, which work as open/close button. But I want to see if door is opened/closed. Idealy in one virtual sensor. See attachments...
Attachments
Screenshot at 2023-08-10 08-01-55.png
Screenshot at 2023-08-10 08-01-55.png (60.79 KiB) Viewed 1595 times
Screenshot at 2023-08-10 07-58-51.png
Screenshot at 2023-08-10 07-58-51.png (34.71 KiB) Viewed 1595 times
User avatar
waltervl
Posts: 5396
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Door switch and status

Post by waltervl »

This is something you have to ask in Tasmota forum or look in tasmota documentation as this is the Tasmota interface.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
willemd
Posts: 630
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: Door switch and status

Post by willemd »

If I understand your question well, you want one single device that both reports the status from the sensor but also can be used to control the relay.

I am not very familiar with controlling devices via virtual switches but I guess if you define an action on a switch, it will always launch that action when the status changes, whether it is by pushing the button or by changing the status by reading a sensor. And you want to only trigger the action (i.e. controlling the relay) when you push the button. Is that the issue you have?

With a dzVents script (instead of the action trigger on the switch itself) you can check the status and you can check the user that initiated the status change, so then you can also decide whether to take action or not.
ardamayne
Posts: 2
Joined: Tuesday 10 July 2018 3:00
Target OS: Linux
Domoticz version:
Contact:

Re: Door switch and status

Post by ardamayne »

Funny, I just went through this and made a post about this. Looks like 40656
Short answer- have two virtual switches in Domoticz, one to control the relay with its idx on that "configure Domoticz" section, and the other for the door sensor referenced when you create a rule in Tasmota to put the door sensor state into Domoticz using MQTT.
User avatar
waltervl
Posts: 5396
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Door switch and status

Post by waltervl »

ardamayne wrote: Friday 11 August 2023 6:42 Funny, I just went through this and made a post about this. Looks like 40656
Short answer- have two virtual switches in Domoticz, one to control the relay with its idx on that "configure Domoticz" section, and the other for the door sensor referenced when you create a rule in Tasmota to put the door sensor state into Domoticz using MQTT.
I think you mean topic viewtopic.php?p=305668#p305668
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests