Page 1 of 1

Order of blocky vs manual inputs

Posted: Friday 04 January 2019 23:12
by HenriZ
I have a pi running zigbee2mqtt and it's plugin for domoticz, a philips motion sensor and a 'klikaaklikuit' magnetic door sensor.

I added the motion sensor to supported devices for the domoticz plugin (see latest repo pull request merge). This works.

Now what I want is the hallway light to be turned on for 5 minutes whenever either the motion detector detects motion OR the magnetic doorcontact is opened.

The blockly schematic for this is fairly simple. Put in text:

Code: Select all

if 
  motiondetector == on OR magnetic_contact == open
do
 set hallway_light level 80%
 set hallway_light on for 5 minutes
As said, this works as expected.

However, suppose I now go to the hallway, the light turns on. For whatever reason, I use the app to turn it off. Now no matter how much I move, it will not turn on again.

Basically I want every movement or change in the door contact status to 'open' to switch the lights on if not on and (re)set the timer to 5 minutes.

What am I doing wrong?

Re: Order of blocky vs manual inputs

Posted: Saturday 05 January 2019 0:40
by waaren
HenriZ wrote: Friday 04 January 2019 23:12 Now what I want is the hallway light to be turned on for 5 minutes whenever either the motion detector detects motion OR the magnetic doorcontact is opened.
However, suppose I now go to the hallway, the light turns on. For whatever reason, I use the app to turn it off. Now no matter how much I move, it will not turn on again.
Basically I want every movement or change in the door contact status to 'open' to switch the lights on if not on and (re)set the timer to 5 minutes.
What could be the case here is that your motiondetector does not send a new motiondetected signal to domoticz but is in its timeout period.
My motionSensors send max. 1 motiondetection per minute. So when the Blockly turned on the light because motion detected and I would turn off the light manually after 10 seconds. I have to wait 50 seconds before the motion detector would send another On signal when movement is detected and the Blockly triggered.