Hi all, thanks so much for all the help. I’m looking for a solution for motion sensors and physical switches.
Master bath has a motion sensor and a switch. When motion is active, lights should come on. When someone leaves the room and physically hits the switch, lights should go out. Lights should also turn off after a time of inactivity.
Problem is, when someone hits the switch to turn lights off when they leave, the motion is still on active, so it turns the lights right back on.
I’ve tried using “motion changed to” active (instead of “is”). This works but there’s a problem waiting to happen: if someone leaves the room, hits the switch, but goes back in before the motion has reset, the lights will never turn back on.
This has to be a common problem… But I’ve searched previous threads to no avail. (One day I’ll read this entire thread I swear)
If Routine “I’m home” ran
AND front door is closed
Turn on light
Wait 15mins
Turn off light
But I’ve got another trigger to turn it off with a global variable when the front door is opened.
I want to cancel the wait if on this piston if the front door is opened, selecting cancel on piston state change doesn’t work for me, the timer carries on even if the state of door changes.
You were correct in part about the motion sensor whether to use ‘is’ or ‘changes to’. I also had to play a lot with nested conditions and when to call them.
Press the button, the light turns on.
Press the button, the light turns off.
Trigger the motion sensor, lights go on. If you forget to push the button, light goes off in 60 seconds.
Trigger the motion sensor, lights go on. Push the button, lights go off.
The first ‘if’ statement is a nested statement [A and B] not simply A and B. The ‘B’ side of this condition is testing if the motion sensor ‘is inactive’. We want a working button first without interference from the motion sensor. You’ll note I’m using a ‘Toggle’ to turn the light on/off.
The second condition, ‘ELSE IF’ is testing if the motion sensor ‘is active’, NOT changes to. If true, turn on the light. If false, wait your wait time and then toggle the light.
Requires:
1 bulb
1 motion sensor
1 button
Piston Mode: Basic
Before starting piston, set CoRE for expert mode: Settings->ExpertFeatures turn ON Expert Mode
Simplified version of what I’m trying to do. If the Routine is ran, then within 30 seconds there’s motion it should turn the light on but not set the light to red. It carries on running though. Any ideas?
The variable is showing blue because it is true. i.e. it is false which is true.
When your mailbox changes to open that will turn blue and the whole piston will become true.
Does my code look correct? This is what I want to do.
What it should do is when the mail box contact is open it speaks from my speaker and sends a push notification then waits 5 minutes before it will speak again when contact is opened. This gives me 5 minutes to get my mail without push and a voice notification. I think I screwed up the AND, can someone talk me through it? When I was trying to create the AND I couldn’t figure out how.
I’ve been trying to setup a new piston, but have really been struggling to nail it down. I’ll try to describe the logic and hopefully someone can help me a bit.
I have two smart plugs that I want to be switched on Monday-Friday between 6:30-18:30 and off all other times. I also want them on anytime person1, or person2, or person3 are present.
I’ve got a basic Monday-Friday 6:30-18:30 automation setup as a separate rule at the moment which takes care of the most important part of the automation. It’s the last bit I can’t get. I’ve been trying to set it up something like this:
IF person1, person2, person3 are NOT PRESENT; AND IF it’s NOT 6:30-18:30 on Monday, Tuesday, Wednesday, Thursday, Friday; THEN turn plugs off.
I was - but i see your issue now is the text to voice not working, but you get a push alert. So i don’t think it’s your piston but the voice integration.
Is there a way in core to send an alert if a device is not Polling. Here is my goal. Recently my garage fridge lost power because a GFI breaker tripped. I did not have my fridge on any sort of smart connection, so I did not know. Fortunalty it was only off for a few hours and nothing was lost. I then thought to my self that I have a Z-Wave Metering plug sitting around not being used. I plugged the fridge into that, but cannot figure out how to get an alert when its not getting power. I tried monitoring when the power usage was below 2 watts, but of course the plug does not report usage when there is no power.
Anyone find a way to trigger a core when something is not reporting?
I have tried music player/ speech renderer and it worked once when I choose Music Player. Is there a way to tell if the speech was rendered as I am alone now and the speech will sound before I get back in after opening the mailbox?