I want to close my garage door automatically 30 minutes after I open it if I forget to close it by hand. The gate can be opened or closed by triggering a switch. To determine whether the gate is open or closed, I have installed a window contact. My first try was the following script. I want to close my garage door automatically 30 minutes after I open it if I forget to close it by hand. The gate can be opened or closed by triggering a switch. To determine whether the gate is open or closed, I have installed a window contact. My first try was the following script. However, the gate opened again after 30 minutes if I closed it manually.
Thanks a lot
Therefore I wrote three scripts in the second attempt. In the first one I use a variable, this is set to 1 when the gate is open for 30 minutes. The second script should open the gate if this variable is 1 and the gate is open. With the third script I set the variable to 0 when the gate is closed. Unfortunately, the second script does not fire. So the variable is set to 1 after 30 minutes, but the switch is not triggered. Can somebody help me with it?Help: Delayed switching Topic is solved
Moderator: leecollings
-
- Posts: 13
- Joined: Tuesday 21 April 2020 15:04
- Target OS: Linux
- Domoticz version: 2021.1
- Location: Germany
- Contact:
Help: Delayed switching
Last edited by poeschel on Saturday 25 April 2020 13:54, edited 1 time in total.
Version: 2021.1
Platform: Ubuntu server 20.04
Platform: Ubuntu server 20.04
-
- Posts: 67
- Joined: Tuesday 27 March 2018 17:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Help: Delayed switching
Think you are overcomplicating. The first script should work on its own if you are triggering on Device. And using a momentary (pulse) switch contact, which is what most controllers want to see. And if open/closed are the right way round on the sensor.
-
- Posts: 13
- Joined: Tuesday 21 April 2020 15:04
- Target OS: Linux
- Domoticz version: 2021.1
- Location: Germany
- Contact:
Re: Help: Delayed switching
The frist Script dosn't work correctly. My switch gets the command on. After a second it switch off. This is it, what the door need. But open and close ist the same command. The switch doesn't know the position of the door. The first script sends the On-command later without checking of the actual position.
The problem with the other scripts is, that it don't trigger of the changing of the uservariable.Is it a bug in my system?
The problem with the other scripts is, that it don't trigger of the changing of the uservariable.Is it a bug in my system?
Version: 2021.1
Platform: Ubuntu server 20.04
Platform: Ubuntu server 20.04
-
- Posts: 67
- Joined: Tuesday 27 March 2018 17:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Help: Delayed switching
Yes, the switch doesn't know. But the contact does. IF the contact is Open, (assuming Open is the correct state when the garage is actually open), pulse the door switch after 30 minutes. That's all that needs to happen.
-
- Posts: 109
- Joined: Tuesday 02 October 2018 20:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Help: Delayed switching
A blocky isn't triggered bij a changed variable. Exchange the variable by a dummy switch and it will work with the 2 last scripts.
You can also combine this 2 in one script with an if else function
You can also combine this 2 in one script with an if else function
-
- Posts: 13
- Joined: Tuesday 21 April 2020 15:04
- Target OS: Linux
- Domoticz version: 2021.1
- Location: Germany
- Contact:
Re: Help: Delayed switching
But I can't pulse the switch delayed in this way. The first script switches the switch 30 minutes after the gate has been opened. But it is not checked whether the gate is still open. If the gate was closed within these 30 minutes, there is still an impulse and the gate opens again.Yes, the switch doesn't know. But the contact does. IF the contact is Open, (assuming Open is the correct state when the garage is actually open), pulse the door switch after 30 minutes. That's all that needs to happen.
Version: 2021.1
Platform: Ubuntu server 20.04
Platform: Ubuntu server 20.04
-
- Posts: 109
- Joined: Tuesday 02 October 2018 20:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Help: Delayed switching
That's why you should skip the first script. As I see it the last two are enough
-
- Posts: 13
- Joined: Tuesday 21 April 2020 15:04
- Target OS: Linux
- Domoticz version: 2021.1
- Location: Germany
- Contact:
Who is online
Users browsing this forum: No registered users and 1 guest