blockly, no event when using "and" combining motion and light status

Moderator: leecollings

Post Reply
Joerideman
Posts: 11
Joined: Tuesday 03 May 2016 23:27
Target OS: -
Domoticz version:
Contact:

blockly, no event when using "and" combining motion and light status

Post by Joerideman »

I've started to experiment with MySensors and blockly. I only have one sensor and 1 actuator, both are childs of the same node.
I want to turn on the light only if the light was off and if there is motion. If the light is already on then there is no need to send another radio transmission.
The following example does not work.
blockly-1.JPG
blockly-1.JPG (34.52 KiB) Viewed 1746 times
I have tried a few other things that did work.

Code: Select all

If motion sensor = on, Do Set light = on

Code: Select all

If light = off, Do Set light = on
Both work. What am I doing wrong?


Extra info, I use Mysensors 1.5 and Domoticz Version: 3.4834
User avatar
Shaggie_NB
Posts: 25
Joined: Thursday 30 January 2014 20:46
Target OS: Windows
Domoticz version:
Location: Oss
Contact:

Re: blockly, no event when using "and" combining motion and light status

Post by Shaggie_NB »

Look at your Blockly.....

You have to use the right logic blocks in the right place...

Image
Joerideman
Posts: 11
Joined: Tuesday 03 May 2016 23:27
Target OS: -
Domoticz version:
Contact:

Re: blockly, no event when using "and" combining motion and light status

Post by Joerideman »

blockly-2.JPG
blockly-2.JPG (36.32 KiB) Viewed 1739 times
I swapped them. Is this okay?

Not so different to me.
User avatar
Treve
Posts: 107
Joined: Thursday 05 November 2015 10:37
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.11474
Location: Rotterdam, NL
Contact:

Re: blockly, no event when using "and" combining motion and light status

Post by Treve »

This must be working, Where D1 is a bulb. 2nd part you can see how it's build.
blockly.jpg
blockly.jpg (28.06 KiB) Viewed 1728 times
- RFXtrx433E,
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.

for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
Joerideman
Posts: 11
Joined: Tuesday 03 May 2016 23:27
Target OS: -
Domoticz version:
Contact:

Re: blockly, no event when using "and" combining motion and light status

Post by Joerideman »

Guy I finally saw the difference :)

I start with the 'and' and then the inputs.

blockly-3.JPG
blockly-3.JPG (38.72 KiB) Viewed 1728 times
Thank you all.

@Treve I missed your comment, but that would have helped me.
User avatar
Treve
Posts: 107
Joined: Thursday 05 November 2015 10:37
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.11474
Location: Rotterdam, NL
Contact:

Re: blockly, no event when using "and" combining motion and light status

Post by Treve »

Joerideman wrote:Guy I finally saw the difference :)

@Treve I missed your comment, but that would have helped me.
I tought "2nd part you can see how it's build." say's enough. you're fault was verry simple.

But it's working know, that's the goal.
- RFXtrx433E,
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.

for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
Joerideman
Posts: 11
Joined: Tuesday 03 May 2016 23:27
Target OS: -
Domoticz version:
Contact:

Re: blockly, no event when using "and" combining motion and light status

Post by Joerideman »

I meant that I read your reply (message and image) after I figured it out.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest