Motion controlled light not working as expected in blocky

Moderator: leecollings

Post Reply
raym
Posts: 81
Joined: Tuesday 03 November 2015 5:07
Target OS: Linux
Domoticz version: beta
Contact:

Motion controlled light not working as expected in blocky

Post by raym »

Hi guys.

I have a very basic blocky (below) which is supposed to activate my office light ("Light X") when my motion sensor is tripped and it is dark (and off again when motion is no longer detected). The sensor and Light are both Z-Wave and "IsDark" is a virtual switch, set to ON by timers before sunset.

The blocky only works if I remove the "Light X" checks (second "and" statement) from both "if" blocks. Otherwise, as it is below, the first "if" block works but the second one is always ignored.

Can anyone explain why this might be happening?

Domoticz Beta v2.4020.

Thanks.
Attachments
OfficeMotionFail.JPG
OfficeMotionFail.JPG (61.54 KiB) Viewed 1254 times
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Motion controlled light not working as expected in blocky

Post by StanHD »

Could you try using " not = Off" instead of "= On". That might work.
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
raym
Posts: 81
Joined: Tuesday 03 November 2015 5:07
Target OS: Linux
Domoticz version: beta
Contact:

Re: Motion controlled light not working as expected in blocky

Post by raym »

StanHD wrote:Could you try using " not = Off" instead of "= On". That might work.
Thanks for your reply. You're right! This does fix it. Why though? Is it a bug?
Sneezydevil
Posts: 111
Joined: Monday 18 January 2016 9:56
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Motion controlled light not working as expected in blocky

Post by Sneezydevil »

The status of a light that is on can be a level like so:

"Status" : "Set Level: 40 %",

The status of a light that is off always seems to be Off.

Great catch by Stan, I looked at your post yesterday morning and did not see the problem even though I knew this.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest