Page 1 of 1

[ANSWERED]: Unable to toggle Motion sensor any more

PostPosted: Wed Aug 26, 2015 2:58 pm
by Turribeach
Hi, somewhere in the last few minor releases a feature got removed: being able to have an action to turn on/off a Fibaro Motion Sensor (FGMS001). I have few control pages where I can still simply toggle my control sensors with an action as Device Actions => Light/Appliance Controls => Toggle On/Off. While the actions I defined on my control pages still work I can't create new ones since my motion sensors are no longer listed under Device Actions => Light/Appliance Controls => Toggle On/Off nor they seem to be listed in any of the other Device Actions options. Furthermore if I try to edit one of my motion sensor existing actions in the control page the device appears as " - no device selected - ".

My guess is they were removed from the list since it was deemed that switching these devices on/off did not make sense. I can see why someone might think that, why would you need to "switch on" a motion sensor since that actually wouldn't actually do anything since the sensor is only there to "sense" motion, nothing happens when motion is sensed. Well I do have a couple of use cases where I want to switch on/off motion sensors:

1) The main use is to do with the fact that I was using the motion sensors in a control page to trigger some scenes manually. The actions execute as part of a trigger that executes when the motion sensor goes on, so it was easier for me to add an action on the motion sensor image to "turn" the motion sensor on manually rather than adding a separate button for it. Also there doesn't seem to be a way to execute a trigger from the Edit Actions of an item in a control page, not sure why. This limitation could be easily overcome either by some basic scripting (I think) or by moving the actions of the said trigger to an action group which can then be executed from the edit actions of the item in the control page. But that's not ideal since it separates the trigger logic from the action logic. Also the other reason I wanted to "turn" on the motion sensor is that I also have some actions when the motion sensor goes off, so by turning the motion sensor on manually I would also get the automated actions when it automatically goes off. Not sure how could I cover that scenario from a control page action?

2) The second use is this. I control lights with my motion sensors. My logic is quite complicated (see this thread). The motion sensors default to an "Off Delay" of 30 seconds. This is OK for most uses but in certain cases I want to turn off the motion sensor manually to make sure it detects motion again quickly and can fire again on "Motion On", For instance if the light is turned off manually from the light switch I want to turn off the motion sensor in 5 seconds to make sure it can be detect motion more quickly again rather than waiting the usual 30 seconds to go off..

Can this functionality be restored? How can I do that now?

Re: Unable to toggle Motion sensor any more

PostPosted: Thu Aug 27, 2015 12:02 am
by howartp
I'm interested in this; I've never tried turning off a motion sensor, but the concept of making it 'become on' (by motion) quicker would be interesting.


Sent from my iPhone using Tapatalk

Re: Unable to toggle Motion sensor any more

PostPosted: Tue Sep 01, 2015 12:11 pm
by matt (support)
Although we removed the ability to turn on/off (or toggle) most Z-Wave motion sensors in the UI, you can still do it via a simple embedded python script. Here is an example that turns it on, off, and toggles it:

Code: Select all
dev = indigo.devices[816101221]
indigo.sensor.turnOn(dev)
indigo.sensor.turnOff(dev)
indigo.sensor.toggle(dev)

For your script will want to do just 1 of those 3 (per script).