Unable to turn off light manually, lights up by motion sensor

Moderator: leecollings

Post Reply
ronniez
Posts: 6
Joined: Friday 30 August 2019 8:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Unable to turn off light manually, lights up by motion sensor

Post by ronniez »

I have a fibaro motion sensor watching a door. It does turn on a light if it is dark and motion is detected, this works great. When I turn off this light manually with the switch that is close to the door, the light is automatically lit again coz the Fibaro sensor notice motion again. This quite annoying as I can only use the phone to turn this light off when I'm out of range of the sensor.
elmortero
Posts: 247
Joined: Sunday 29 November 2015 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9639
Location: Spain
Contact:

Re: Unable to turn off light manually, lights up by motion sensor

Post by elmortero »

Since you do not mention how (or if) this is scripted, a general approach (to be applied in your script)
If motion detected
and light is off
and last change to light > 5 minutes
then
turn on light

This way you can use the switch and the light will not turn on unless you are already long gone
DaanT
Posts: 14
Joined: Friday 23 August 2019 10:11
Target OS: Windows
Domoticz version: 2020.2
Location: Belgium
Contact:

Re: Unable to turn off light manually, lights up by motion sensor

Post by DaanT »

Hi Ronniez,

It's unclear to me when you want fibaro to take control again over the lights. After midnight, after you come home (disable alarm), after several minutes or any other way maybe?

Kind regards
Daan
ronniez
Posts: 6
Joined: Friday 30 August 2019 8:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Unable to turn off light manually, lights up by motion sensor

Post by ronniez »

Some answers to the questions:
I tried Blocky to set it up. I have used a user variable which was to be set by the blocky function set for x seconds. This user var should prevent turning the light on again. but it seems the parameter is not set when the switch is used.
The fibaro has to take control over the lights again after approx 30 seconds after using the switch to turn the light off.

So normal flow should be as following, When it is dark and I enter the room the light switch on automatically, when I leave the room I switch it off myself, if getting in again within 30 seconds light stays off and when I'm still in the room (and move) after 30 seconds, the light goes on automatically again.
DaanT
Posts: 14
Joined: Friday 23 August 2019 10:11
Target OS: Windows
Domoticz version: 2020.2
Location: Belgium
Contact:

Re: Unable to turn off light manually, lights up by motion sensor

Post by DaanT »

Then I would use a switch to act as a delay.

IF "switch lights to off"
Do
- Lights off
- delay motion on
- delay switch on
- delay switch off after 30 seconds

IF "motion = off" - You need this because if you walk out it will go to on, and will stay like that for some time.Need to wait for it to switch off again
Do
- delay motion off

IF "motion = on" and "delays switch = off" and "delay motion off"
Do
- Lights on

However there is a blind spot here. when walking back in, even after the 30seconds delay. If the motion sensor is still not reset to off and it sees you it will stay on and will not trigger the lights on event.

Kind regards
Daan
ronniez
Posts: 6
Joined: Friday 30 August 2019 8:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Unable to turn off light manually, lights up by motion sensor

Post by ronniez »

@DaanT, I assume that is then to be arranged via a lua script or so. Unfortunatally I don't have experience with that (yet). Have to dive into some documentation.
DaanT
Posts: 14
Joined: Friday 23 August 2019 10:11
Target OS: Windows
Domoticz version: 2020.2
Location: Belgium
Contact:

Re: Unable to turn off light manually, lights up by motion sensor

Post by DaanT »

No not at all, I also do everything in blockly. That's the reason i structured my answer the way I did, for me it almost looks like a blockly event.
Just create 3 events and maybe try to group them by assigning numbers before the title: like 11, 12 and 13
ronniez
Posts: 6
Joined: Friday 30 August 2019 8:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Unable to turn off light manually, lights up by motion sensor

Post by ronniez »

@DaanT, I have tried it, and it is working. In my previous attempts I had a lot of the same things but I guess that combining the "delay switch off after 30 seconds" in the first step does do the trick.
Now I only have to figure out why it is a bit slow on turning on the light.
DaanT
Posts: 14
Joined: Friday 23 August 2019 10:11
Target OS: Windows
Domoticz version: 2020.2
Location: Belgium
Contact:

Re: Unable to turn off light manually, lights up by motion sensor

Post by DaanT »

Hi Ronniez,

Which type if smart lights or switches are you using?

Daan
ronniez
Posts: 6
Joined: Friday 30 August 2019 8:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Unable to turn off light manually, lights up by motion sensor

Post by ronniez »

I'm using the double NEO Coolcam Z-wave switch, in combination with the Fibaro Motion Sensor.
I have changed some of the parameters on the Motion Sensor and the reaction time is much shorter now, so it looks pretty well.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest