Override motion sensor Topic is solved
Moderator: leecollings
Override motion sensor
Hello,
I have a blockly script (see image) for my stairway (1 motion sensor and 1 fibaro switch).
When the event is active I would like to override the event by pressing the physical button so the light stays on even when there is no motion detected. And when I turn off the lamp by pressing the physical button it will activate the script again.
Is this possibile?
Regards
I have a blockly script (see image) for my stairway (1 motion sensor and 1 fibaro switch).
When the event is active I would like to override the event by pressing the physical button so the light stays on even when there is no motion detected. And when I turn off the lamp by pressing the physical button it will activate the script again.
Is this possibile?
Regards
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Override motion sensor
If the physical button is known in domoticz it should be possible by adding an and in your BlocklyCndiann wrote: ↑Wednesday 14 October 2020 16:21 When the event is active I would like to override the event by pressing the physical button so the light stays on even when there is no motion detected. And when I turn off the lamp by pressing the physical button it will activate the script again.
Is this possibile?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: Override motion sensor
Where do I need to put this 'and' function? Is it not necessary to do it in dzvents or lua?
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Override motion sensor
In blockly: Change
[Else if] [PIR trap motion] =[Off]
to
[Else if] [PIR trap motion] =[Off] and [physical button] = [Off]
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: Override motion sensor
Thanks but I didn't get it to work. The physical switch is called Lamp Trap.
When the lights go on and I press the switch, the lights go out.
It's a momentary switch.
When the lights go on and I press the switch, the lights go out.
It's a momentary switch.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Override motion sensor
Not sure I understand. Can you please describe it with some details so I can try to replicate it?
- what device type sybtypes are Lamp trap and Lamp Trap in domoticz as seen on the devices tab?
- do these devices have an action defined in the On action or Off action (in the edit window of the device from the switch tab)?
- are there any other Blockly's or script involved then the one you posted?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: Override motion sensor
Sorry, I have a Fibaro dimmer 2. The light switch of this dimmer I called Lamp trap. So in my blockly Lamp trap is a name for the dimmer/switch.
When I do your script the light stays on.
When I do your script the light stays on.
Re: Override motion sensor
So I have a motion sensor and a Fibaro dimmer. The fibaro dimmer is connect to a physical momentary switch. I have called the Fibaro light switch in domoticz to Lamp trap.
So when I push the momentary switch Lamp trap will be turned on.
When the script is active and motion is on the Lamp trap will turn on.
Now I want to override the script so that the light will stay on when I press the momentary switch(Lamp trap).
I have activated scene, so I have set a scene with double click and triple click. But I think did doesn't involved the blockly event.
So when I push the momentary switch Lamp trap will be turned on.
When the script is active and motion is on the Lamp trap will turn on.
Now I want to override the script so that the light will stay on when I press the momentary switch(Lamp trap).
I have activated scene, so I have set a scene with double click and triple click. But I think did doesn't involved the blockly event.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Override motion sensor
Can you please share these devices as shown on the devices tab [setup][devices]
like this example and (if any) the On / Off actions of the switches [switches][edit button on the switch]
like this example
Don't know what this means. Maybe it becomes clear if you share a screenshotI have activated scene, so I have set a scene with double click and triple click. But I think did doesn't involved the blockly event.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: Override motion sensor
See below.
ID 22 till 26 are extra because I have activated scene option.
I use Lamp trap (id1, idx 293) for the blockly script.
ID 22 till 26 are extra because I have activated scene option.
I use Lamp trap (id1, idx 293) for the blockly script.
Re: Override motion sensor
It's still not working right now.
I see in the log 2 events triggered. The blockly script is called Trap verlichting.
When the script is not active during daylight I also get the event Trap verlichting_2 log. And if I press the lightswitch the lamp will turn on only for several seconds (seems when the motion decection is OFF) the light automaticaly will be turned off even when the script is not running.
If I dissable the script and press the lightswitch the lamp stays on until I press the lightswitch again.
I see in the log 2 events triggered. The blockly script is called Trap verlichting.
Code: Select all
2020-10-25 19:32:00.290 EventSystem: Event triggered: Trap verlichting_1
2020-10-25 19:32:00.321 OpenZWave: Domoticz has send a Switch command!, Level: 1, NodeID: 25 (0x19)
2020-10-25 19:32:00.324 (OpenZWave) Light/Switch (Lamp trap)
2020-10-25 19:32:04.510 (Buienradar) General/Custom Sensor (Next Rainshower Leadtime)
2020-10-25 19:32:04.514 (Buienradar) General/Custom Sensor (Next Rainshower Duration)
2020-10-25 19:32:04.518 (Buienradar) General/Custom Sensor (Next Rainshower Avg Rainrate)
2020-10-25 19:32:04.522 (Buienradar) General/Custom Sensor (Next Rainshower Max Rainrate)
2020-10-25 19:32:04.525 (Buienradar) General/Percentage (Rain Intensity)
2020-10-25 19:32:04.529 (Buienradar) General/Custom Sensor (Rainfall next Hour)
2020-10-25 19:32:05.531 (OpenZWave) Usage (Lamp trap vermogen)
2020-10-25 19:32:05.534 (OpenZWave) General/kWh (Lamp trap kWh Meter)
2020-10-25 19:32:40.137 EventSystem: Event triggered: Trap verlichting_2
2020-10-25 19:32:40.170 OpenZWave: Domoticz has send a Switch command!, Level: 0, NodeID: 25 (0x19)
2020-10-25 19:32:40.172 (OpenZWave) Usage (Lamp trap Unknown)
2020-10-25 19:32:40.175 (OpenZWave) General/kWh (Lamp trap kWh Meter)
2020-10-25 19:32:40.181 (OpenZWave) Light/Switch (Lamp trap)
2020-10-25 19:32:40.553 (OpenZWave) Usage (Lamp trap vermogen)
2020-10-25 19:32:40.555 (OpenZWave) General/kWh (Lamp trap kWh Meter)
2020-10-25 19:32:50.560 (OpenZWave) Usage (Lamp trap vermogen)
2020-10-25 19:32:50.564 (OpenZWave) General/kWh (Lamp trap kWh Meter)
If I dissable the script and press the lightswitch the lamp stays on until I press the lightswitch again.
Re: Override motion sensor
Hello,
I have a motion sensor in the hallway and a FGD212 Dimmer 2. I connected 2 physical momentary switches on it. So If I press once the light 'Lamp trap' goes on.
In blocky I had this event:
It does the job but when I switch the light with the physical switch it trigger the blockly event so the 'Lamp trap' goes out when the motion detector is off even If I do this at 10:00.
And I didn't get manual override to work, so I can switch the physical switch for example on 10:00 and 'Lamp trap' stay on even if there is no motion detected.
I tried in dzVents but only got so far;
What I want to archieve;
-Set timer to activate between 15:00 and 11:00
- Set level % of 'Lamp trap'
- Set duration time or when motion is off turn 'Lamp trap' off
- Override the script when I press the physical button
Hope I can get some help! Thanks
I have a motion sensor in the hallway and a FGD212 Dimmer 2. I connected 2 physical momentary switches on it. So If I press once the light 'Lamp trap' goes on.
In blocky I had this event:
It does the job but when I switch the light with the physical switch it trigger the blockly event so the 'Lamp trap' goes out when the motion detector is off even If I do this at 10:00.
And I didn't get manual override to work, so I can switch the physical switch for example on 10:00 and 'Lamp trap' stay on even if there is no motion detected.
I tried in dzVents but only got so far;
Code: Select all
return
{
on =
{
devices =
{
['PIR trap motion'] = { 'between 15:00 and 10:00' }, --only turns on after 15:00 and before 11:00
},
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = 'Trap',
},
execute = function(dz, item)
local light = dz.devices('Lamp trap')
local offDelay = 120
if item.active then -- state == 'On'
light.cancelQueuedCommands()
light.switchOn()
light.switchOff().afterSec(offDelay)
end
end
}
-Set timer to activate between 15:00 and 11:00
- Set level % of 'Lamp trap'
- Set duration time or when motion is off turn 'Lamp trap' off
- Override the script when I press the physical button
Hope I can get some help! Thanks
Who is online
Users browsing this forum: No registered users and 1 guest