Page 1 of 1

Motion controlled light not working as expected in blocky

Posted: Saturday 30 January 2016 9:32
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.

Re: Motion controlled light not working as expected in blocky

Posted: Saturday 30 January 2016 10:34
by StanHD
Could you try using " not = Off" instead of "= On". That might work.

Re: Motion controlled light not working as expected in blocky

Posted: Sunday 31 January 2016 1:25
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?

Re: Motion controlled light not working as expected in blocky

Posted: Sunday 31 January 2016 7:48
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.