Mismatch 'off delay' in switch and 'off command' in Blockly
Posted: Friday 20 November 2015 22:10
I use a motion/light sensor to switch on the lights in the living room
The lights can also be switched on manually
In Blockly I can't see the difference in the switch status whether 'Blockly' switched it on or off, or a 'manual user'
To solve this with a separate Blockly, a virtual switch is switched ON when the light switch changes status (on or off). I turn that switch off after 3600 seconds (Set after 3600 seconds) in the same Blockly.
In my main blockly, where the decision is made to switch automatically, I have for both switch on and off a 2nd 'SET' command: switch the virtual switch off after 10 seconds.
My intention was then as follows: Manual switch on/off will hold for 3600 sec (1hr) and automatic switch for just 10 sec (after that depending on the motion/light sensor results)
HOWEVER, the virtual switch didn't always turn Off after 10 seconds, so I changed that virtual switch to an OFF delay of 3600seconds.
Now my problem is: the virtual switch remains ON for 3600 seconds all the time and then switches off 2 times, 1 second apart, even while the Blockly event gives the 'OFF' signal after 10 seconds.
The lights can also be switched on manually
In Blockly I can't see the difference in the switch status whether 'Blockly' switched it on or off, or a 'manual user'
To solve this with a separate Blockly, a virtual switch is switched ON when the light switch changes status (on or off). I turn that switch off after 3600 seconds (Set after 3600 seconds) in the same Blockly.
In my main blockly, where the decision is made to switch automatically, I have for both switch on and off a 2nd 'SET' command: switch the virtual switch off after 10 seconds.
My intention was then as follows: Manual switch on/off will hold for 3600 sec (1hr) and automatic switch for just 10 sec (after that depending on the motion/light sensor results)
HOWEVER, the virtual switch didn't always turn Off after 10 seconds, so I changed that virtual switch to an OFF delay of 3600seconds.
Now my problem is: the virtual switch remains ON for 3600 seconds all the time and then switches off 2 times, 1 second apart, even while the Blockly event gives the 'OFF' signal after 10 seconds.