My lighting piston


#21

Okay, so I’ve given up trying to use my iPhone as a presence sensor since you guys (and my testing) feel it’s unreliable. So I’ve since gone to trying to use my front door smart lock and my pin code to do what I want it to do. I’ve tested just using the devices and that works fine as shown in the screen shot below (the first one). That works as you can see and the state is set to true. I then add a condition, first Time then my Physical device (my lock) and testing doesn’t work and the state is set to false. Am I doing it in the wrong spot? At least the devices work haha!


#22

Again, at work and not able to completely address this. And I’m not sure that it matters, but I would put the Lock 1’s lock #1 gets unlocked trigger above the Time condition and see how that works.


#23

If you’re OK with a 3-4 minute delay, here is a few of my comments about a reliable presence detector.

Essentially, it uses a piston to ping your Router’s config page every couple of minutes. When it finds your Phone in the list, it execute a piston. When it does not find the phone, it executes another piston.

This way (without using GPS at all) webCoRE knows whether you are home or not…

Again, it is not instant, but it is rock-solid reliable, and uses absolutely NO battery on your phone whatsoever.


#24

Yeah, didn’t want a delay. At least it’s working for you @WCmore!

Tried the condition switched around (and also before just the Time or Lock condition) and same thing happened. It seems it doesn’t like any condition in there, that’s why I’m wondering if I have the conditions in the wrong spot. If I take them out, it works and is set to a true state.


#25

Your “sunset” and “sunrise” look different than mine.

Here’s a snip of one of my pistons that work perfect. Notice the “sunset” and “sunrise”:

image


#26

Here’s the other way around. This uses the “to” instead of “past”, but the sunset and sunrise still look different:

image


#27

Here is the setup of the first one above:


#28

Thanks for the screenshots! Tried it that way and you see what happens. Should I not be concerned about the piston state? I’m currently out of town so I can’t test there, I was trying to test remotely.


#29

The “Test” will not set off this piston. The trigger is currently set to the lock being ‘unlocked’.

Test this when you get back.

Also, please turn on Trace.


#30

That’s what I thought was happening, but wasn’t sure if I should be concerned with the piston state or not. I’ll test when I get back and report here. Thanks for the help!


#31


My Time is like this.


#32

Okay, I’m back and did some testing. So seems like it’s working and I’m like almost there. When I use my pin code the lights turn on as expected. Guess I didn’t need to worry about the piston state haha. If I use someone else’s code they don’t turn on! Win there. Then if I turn off all the lights (like I’m about to leave for a while) and go to unlock the door, my lights turn on. I’ve tried this with both codes, so it’s definitely in the unlocking action that’s causing it. Also tried doing it with the piston paused and it didn’t happen then so I’m 99.9% sure it’s the piston that’s causing it. What do you guys think I should do for that? Would setting it up like @Pantheon’s format (if I can figure it out) help in this case?


#33

Can you give us a green shot of your current piston?


#34

Yup, same exact setup as before but posting my current one for ya. Think I need to add any conditional steps (if I can)?


#35

With this piston, if at any time you unlock Lock 1 and the time parameters are met, it will turn on White Bulb 2 and White Bulb 3.
If you do not want the lights to turn on as you leave (after unlocking and locking the Lock 1), then you will need additional code. Is that what you are looking for?


#36

Yeah, basically when I lock the door after unlocking it using my code I don’t want it ran again after that. So if I or someone else leaves and all the lights are off, they won’t turn back on to unlock the door to leave. Any idea’s how to accomplish that? Not sure where to start.


#37

There are many ways to do this. Not knowing your situation with the light arrangements, I would write a second piston. A very easy solution would be to turn off the lights 30 seconds after the door is locked (ie, after you have left). But if your lights are indoor lights that you need left on after you arrive home (and unlock and lock the Lock 1), then turning indoor lights off after 30 seconds might not fit your situation.


#38

They’re indoor lights (my living room and bedroom ones) so yeah don’t think that solution would work for me. Can I write it so it needs to look for the code being used it’ll turn on and if it’s not, nothing happens?


#39

You would have to check the manual for your lock. But I don’t think that you can determine which code was entered with webcore. If you have a motion sensor somewhere in your house, then you could possibly use that to indicate if the lights need to be turned off or not (after the lock was locked).


#40

So the #1 from Lock 1’s lock is the code, and it looks like it works in conjunction with me setting it up with my Lock User Management app I setup. If I use someone else’s code they don’t turn on, so it looks like it’s working right there. It’s just if I turn off all the lights like you would normally when you’re about to leave, then go to open the door and re-lock it again the lights turn on. I do have a motion sensor in my living room if that helps at all. I tried setting up one earlier, but didn’t have much success with it (it’d turn off after motion wasn’t detected even though I was still in the room). Basically I wan to set it up so it only goes on the #1 code’s usage. Can that be achieved?