My first automation


(Arun Nayar) #1

I setup the hub and a multi sensor on the bathroom door, and a cree bulb inside. I want it to turn on when I open the door and turn off when I close it. Works fine when I am outside but how do I get it to stay on if I am inside the bathroom. DO I need another sensor?


(Rick Pittser) #2

You could use a motion detector inside, or just set a delayed off for some period of time (5, 10 minutes, etc).


#3

Sounds like you need more so a motion sensor as opposed to the door sensor.


#4

But, with what you already have yeah set a rule so it stays on for x amount of time. X being the amount of time above what you know would be normal to stay in.


#5

Or it might be possible to set up a rule in rule machine so the initial opening turns the light on and the next opening shuts off the light. I assume that could be done in rule machine though someone with more skills with that would have to comment on how to do that.


(Rick Pittser) #6

That’s a good point. There is a “toggle light” action in RM which would probably do what you want.


(Arun Nayar) #7

thats interesting, might have to look into this rule machine. Does it involve scripting. Right now I did what chowder first suggested, the turn off after X minutes.


(Rick Pittser) #8

You have to be familiar with the IDE, which isn’t that difficult. You have to cut and paste some code to make it work, and then it is just a smartapp. Once you get it setup, you can do nearly anything with it.


#9

It does involve code, however the code has already been written. You will have to go to the ST API site and create new smartapp. You then paste the code in, save, and publish to you. You then go to your phone and under smartapps select My APPS and install said app. From there you can build out rules that ST will follow.


(Rick Pittser) #10

One other thing that might make it difficult to use the toggle light action is if someone ever doesn’t close the door fully so the contact sensor registers. I considered doing this for one of my bathrooms, but the door tends to get left slightly open so either the light would stay on all the time, or be in the wrong state a lot.


#11

Yeah, a motion sensor would be much better suited to what he wants to do.


(Arun Nayar) #12

I got the kit and planned to use the motion sensor for the outside. But you are right it makes more sense to have a motion sensor.

Also a separate question. I see in videos people having their car as a thing in their setup. How do you do that? Do you use the arrival sensor or something else? I read some reviews on the arrival sensor and people ar enot too happy with it.


#13

My phone as a presence sensor has been perfectly fine. Hasnt failed once. I know some have difficulty and I imagine it depends on the GPS on the phone more than it being a ST issue. If your phone is working for you then I would continue to do that.


(Rick Pittser) #14

Same here. I use mine and my wife’s phone as presence sensor. Works very well for me.


(Arun Nayar) #15

ok then thats what I will do too.


(Arun Nayar) #16

whats the battery used by these multi sensor. One of the sensors I got is not turning on, the LED does not come on. Dead or just battery drained?