Turn off motion sensors during certain modes?


(Ra Nae Stanton) #1

I’m not sure if this is the best place to put this, but I’d like to be able to have my lights respond to my motion sensors when I’m home, but not if I’m away. I have two, one which is supposed to ignore pets, and a Fibraro. Unfortunately, the dogs trigger both of them. So, I’d like to be able to have ST ‘ignore’ motion when in Away mode.

Is this possible?


(Convinced ST will never be unbroken…) #2

Yes and no. SmartThings doesn’t have a way to disable a device, but every SmartApp has settings to only activate under certain modes. It’s usually near the very bottom of the app settings.


(Ra Nae Stanton) #3

Thanks, I’ll try that.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #4

Well… The Device Handler definition interface is plenty rich enough to add an Attribute and Command for “Capability Disable”, it’s just up to Device Type developers to implement it in a consistent manner.

Every sensor should have a toggle switch to lock it into the user declared benign state. This could be activated manually or triggered by Routines or Mode changes.

Anyhow… I made this feature request ages ago. It doesn’t require any change to the platform.


(Convinced ST will never be unbroken…) #5

Me too. SmartThings is the first HA platform I have used that doesn’t support a disabled state on both devices and rule/actions. But they don’t have globals either (also suggested).


(Bruce) #6

I messed around with modifying the device type for a SmartSense motion sensor, to add disable() and enable() functionality. The code was easy, but I ran into some weird bug in the backend that stopped it from working.

But then, thinking about it more (and forced by circumstance), I decided it’s better to do this at the app level instead. I had two “special” modes in my setup, both for this sort of purpose. That’s a very poor solution, fraught with problems. I have been using custom apps for the two rooms where I wanted motion disable functionality, so why not just put it there in my own app?

That’s what I did, and it works really well; it took about 5 lines of new code to implement. I use a virtual on/off button to enable/disable motion activation. Now, I can use Routines, Smart Light scheduled events, and Minimote button presses, to turn that disable switch on or off. Problem solved. Note that this solution is built into my custom app. It would be easy to add to any custom lighting app that handles motion events. ST could add it to Smart Lights, but they won’t, because it could just confuse most users and dirty up the UI (by one line).

Then I went back and deleted the two special modes, leaving my setup quite sleek, with only Away, Day, Evening and Night modes. And I threw away all of the helper apps used to cope with the extra modes. Ahh… :grinning:


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #7

I guess …if you don’t have a lot of SmartApps that reference the Device, and you don’t really want to use the “standard” SmartApps / Smart Lighting


(Bruce) #8

If you want to do this with Smart Lights, it takes a helper app and two virtual switches. One of the virtual switches stands-in for the real switch in Smart Lights, so that the helper app can deal with the disable motion logic, and the other is the disable switch. This is the way people did it before with Lights & Switches. It’s not elegant, but it works. We are stuck with some custom app unless and until SmartThings incorporates motion disable into Smart Lights.