Hi Erwin,
I tried your script once more, and this time I got it to work. I must have made a copy error or something the last time
Thank you!
In regards to my 2 scripts. I am trying to understand how things work, and I don't understand how they can not be a stable solution. Could you try and explain it to me in a bit more detail. This way I get a better understanding. Because I am also writing scripts that controls one light depending on the status of two doors... and there is also a delay involved... These scripts is based on the same logic, thus making it important for me to understand (:
Just so you know the way my motion sensor is set up:
If presence is detected it will send a 1 straight away.
If presence is no longer detected, it will wait 10 seconds, and then send a 0.
As long as there is presence, nothings is being sent.
My Event-based script is triggered by my motion sensor.
If a 1 is received the script turns on the light and disables the resident script called "Sensor".
If a 0 is received it activates the resident script called "Sensor"
The resident script is called "Sensor"
If active, waits 5 min, then checks if value of my motion sensor = 0 (no presence), if so it turns the light of.
Thanks for your help so far!
BR
Mr. D
I tried your script once more, and this time I got it to work. I must have made a copy error or something the last time
Thank you!
In regards to my 2 scripts. I am trying to understand how things work, and I don't understand how they can not be a stable solution. Could you try and explain it to me in a bit more detail. This way I get a better understanding. Because I am also writing scripts that controls one light depending on the status of two doors... and there is also a delay involved... These scripts is based on the same logic, thus making it important for me to understand (:
Just so you know the way my motion sensor is set up:
If presence is detected it will send a 1 straight away.
If presence is no longer detected, it will wait 10 seconds, and then send a 0.
As long as there is presence, nothings is being sent.
My Event-based script is triggered by my motion sensor.
If a 1 is received the script turns on the light and disables the resident script called "Sensor".
If a 0 is received it activates the resident script called "Sensor"
The resident script is called "Sensor"
If active, waits 5 min, then checks if value of my motion sensor = 0 (no presence), if so it turns the light of.
Thanks for your help so far!
BR
Mr. D