Posts: 3
Threads: 1
Joined: Jul 2018
Reputation:
0
Hi
Im looking for a simple script.
Input 1 - KNX 0/2/5
Input 2 - KNX 0/2/6
Input 3 - KNX 0/2/7 (same as output)
Output - KNX 0/2/7 (same as input 3)
If input 1 sends 1 to the bus it will set the output to 1 and start a timer for 2 hours. After the timer ends the output is set to 0. A new input will restart the timer.
If input 2 sends 1 to the bus it will stop the timer.
If input 3 sends 0 to the bus it will stop the timer.
Can someone point me in the right direction?
Posts: 3
Threads: 1
Joined: Jul 2018
Reputation:
0
Thank you for the reply! This script is for my garden gate.
I've been playing with this and the code provided is that this is supposed to integrate with an existing KNX installation where 0/2/6 is a telegram that "locks" the gate in an unlocked state, and 0/2/7 is a telegram that removes this lock and returns the operation to normal.
0/2/5 is a spare trigger that first sends a 1, then a 0 when operated - currently not doing anything.
So what I' m trying to do is use this spare trigger to make a 2 hour unlocked gate function if that makes sense? I need to be able to reset the timer and bring the gate back to normal operation or to permanent unlock during the timer period.
Posts: 5003
Threads: 28
Joined: Aug 2017
Reputation:
229
------------------------------
Ctrl+F5
Posts: 8149
Threads: 43
Joined: Jun 2015
Reputation:
472
Your code does not check 0/2/6 and 0/2/5 values, only their update time. Some extra if's are needed there. You need to correctly define the logic of operation then it will be easy to write a script for that.
Posts: 167
Threads: 20
Joined: Apr 2017
Reputation:
2
Well almost, at day, the light need to go to 20% after no movement of 10 minutes.
When everybody is gone, and alarm turns on, all lights need to turn off.
But when it isnt posible i have to do it with a extra line in the script.
I have multiple of this, in the same project, so i have to copy past it for 40 times.