Using Motion Sensor as a light switch toggle?


(Mel) #1

Hi all,

I have a belkin wemo led bulb however it doesnt work well for me as I want to easily turn it off and on without having to load the ST apps.

Instead of going down the route of installing a physical ST light switch (i’m in the uk and I dont think we have many options for this anyway) I thought about using a motion sensor in a box.

I intend to have a closed box with the motion sensor inside it. Make a small hole which will allow enough movement to activate the motion sensor when waving over it. So wave over the box to turn on, wave again to turn off.

However I dont see any app which will turn a switch/bulb on with motion if bulb is off and turn off if bulb is on. Only ones are turn on when motion detected and turn off after a certain time.

Any ideas?


#2

I think @JDRoberts uses a similar arrangement. I’m not sure the same app he uses is available to you in the UK, but he should see this and may have some good ideas for you.


#3

Because of the way that motion sensors work, it’s quite difficult to do this toggle. A motion sensor has to have a certain period of time of inactivity before It can report activity again.

I myself am quadriparetic (use a wheelchair with limited and function) so I am always looking for a touch free switches. And I do use motion sensors for this, but I have one that is for on and one that is for off. It works for me, but it wouldn’t be very intuitive for anyone else.

There are a lot of other options, however. You can easily use a contact sensor ( Open for on, close for off)

You can use one of the battery operated switches which are available in the UK, including the popp and the Devolo.

You can use the very popular mood cube, which you have to build but is pretty easy, where each of the six faces of a wooden cube does something different with your lighting.

Here are a couple of threads with more ideas:


(Mel) #4

Thanks for the quick reply.

That’s disappointing to hear.about the motion sensor. It feels like a pretty simply thing to do but all the apps appear to be based upon time periods like you say. i am half way there, I can turn it on with a wave, but not off! :frowning:
I’ll have a look at the alternatives but really fancied having a ‘wave my hand’ switch.


#5

You can turn it off with a wave, you just can’t use the same motion sensor to both turn on and turn it off. That just has to do with the timing of the device itself, not with the smart app.

If you build a container and you have two in compartments right next to each other, maybe the top one for on and the bottom one for off, you could probably do it. But then that’s getting pretty expensive since you need two motion sensors.

Most people will use motion to turn on and inactivity to turn off again. So when you walk into a room the light turns on and then after 15 minutes of no activity the light turns off again., That has its own tricky issues to keep it from turning off if someone is just sitting still Watching television or reading, but there are ways to address that as well.

So there are lots of options, you just have to find the one that appeals to you. :sunglasses:


(Jason) #6

Maybe someone will integrate this.


#7

The Swipe is available in the UK (I think not in the US yet) but I don’t know anyone using it–at £120, it’s more than most people want to spend for a switch.

http://products.z-wavealliance.org/products/1655/pics

Vesternet did their usual thorough review:


(Mike) #8

You may be able to do this using CoRE - [OBSOLETE] [BETA MILESTONE 1] CoRE (Community's own Rules Engine)

I’ve only tested with a st motion sensor, a Philips hue bulb and a simple toggle rule in CoRE but it seems useable to me, you would have to wait for the motion sensors state to revert back to inactive but that shouldn’t be a problem…unless you’d use the switch twice very quickly in normal use.

It depends which motion sensor you’re using and how long it takes to switch states, the smart things one reverts to inactive pretty quick (less than 15 seconds and I wouldn’t need to use it twice in that timeframe).


(Mel) #9

Yes I’m using the ST motion sensor.

Sounds good! Not gonna take hours of development is it?


(Mike) #10

The developer of the app has done all the hard work so make sure you thank them, especially if you find the app useful!

It won’t take hours for what you want to do…but it could take you a while to get your head round it if you wanted to do something complicated and/or you have no/limited programming knowledge.

Easiest way would be -

  • Log into your hub @ https://graph.api.smartthings.com/

  • navigate through My SmartApps / + New SmartApp / From Code

  • go to https://github.com/ady624/CoRE and navigate to core.groovy, open it.

  • Copy the code (easiest way is to highlight a bit from the 1st line and then press ‘end’ on your keyboard

  • Paste it into the new SmartApp page and create

That’s the hard part :slight_smile:

I’ll add screenshots off my phone for the CoRE part.

On your phone you should now find CoRE in the smartapps category.


Hope that gives you an idea of what you need to do but as @JDRoberts says, that thread is where you want to be :sunglasses:


#11

Just be aware that, as the author mentions in several places, core is still very early in its development and is only considered an alpha release, not even a beta.

That means a couple of things. First, there will be glitches. Second, you may from time to time have to uninstall (Losing all your set ups to date) and reinstall if a new version comes out. The flip side of that is that you get to have input into how the app develops.

Here is the official author thread: I suggest starting there. :sunglasses: