Blockly switching on/off/on/off

Moderator: leecollings

Post Reply
Toolman
Posts: 23
Joined: Monday 04 July 2016 23:15
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.8805
Location: Netherlands
Contact:

Blockly switching on/off/on/off

Post by Toolman »

Hi, I've made a blockly test script to turn on a light when a motion sensor is triggered (Aeon multisensor 6) but when it's turned on it immediately turns off again. This is happening every minute.
2016-11-28 16_23_37-Domoticz.jpg
2016-11-28 16_23_37-Domoticz.jpg (113.07 KiB) Viewed 1118 times
When the motion sensor is triggered its state becomes on and after 4 minutes it becomes off.
So I can't explain the on/off behaviour as mentioned above.
Small piece of logging:
2016-11-28 16_43_56-Domoticz.jpg
2016-11-28 16_43_56-Domoticz.jpg (49.24 KiB) Viewed 1118 times
This doesn't really turns on/off a light, but writes to the logging for testing purposes.

Licht moet aan obv beweging = Light has to turn on because of movement
Licht moet uit = Light has to turn off

Any help would be greatly appreciated.
tozzke
Posts: 135
Joined: Friday 02 January 2015 9:22
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Blockly switching on/off/on/off

Post by tozzke »

If I recreate your blockly with dummy switches, it also reacts as you mention.
If I change it to:
Image
it works as expected
Image

a workaround which might help you ;)
Toolman
Posts: 23
Joined: Monday 04 July 2016 23:15
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.8805
Location: Netherlands
Contact:

Re: Blockly switching on/off/on/off

Post by Toolman »

Tozzke,
Thanks for the workaround. I'll try that later on (no time right now :-( ) and will use it for the "real" version.
Problem solved I think.
Still weird that my solution does show that strange behaviour.
Toolman
Posts: 23
Joined: Monday 04 July 2016 23:15
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.8805
Location: Netherlands
Contact:

Re: Blockly switching on/off/on/off

Post by Toolman »

Update: the solution of Tozzke works like a charm
tozzke
Posts: 135
Joined: Friday 02 January 2015 9:22
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Blockly switching on/off/on/off

Post by tozzke »

I'm reading more issues regarding the nested If-statements lately, so I'm avoiding those ;)
Also I don't believe they were even possible when I started with Blockly, so I taught myself a way to make them without nested If-statements
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests