I have a Yale door lock with some simple PLEG Triggers, Conditions & actions
When I unlock coming home in daytime - turn on TV - “_Is_Day_Time AND
(_Is_Day_Time;_Door_Unlocked)”
When I unlock coming home at night - turn on light and TV - “_Is_Night_Time AND (_Is_Night_Time;_Door_Unlocked)”
When I Close door on leaving - Turn off light and TV “_Door_Closed_On_Leaving”
I also have a Scene that I operate when I go to bed which shuts everything off.
I am not at home every night, but when I am I would like My TV to come on at 06:45 and my light to come on if it is dark (I have a light sensor) . I am struggling with this.
I use Ping Sensor to detect my smartphone. You can also use Location with apps like Tasker. I use Tasker’s Network Location + Authomation integration with Tasker’s Network Location to detect I’m ‘near or at’ home and issue a task to set my presence as ‘home’.
Also, I started a Security & Occupancy thread about this exact topic, you might want to find/read that.
I’ve not yet integrated Door Locks as an Input to set the Occupancy/Security state… I want to use identification of which code is used to do so so it can set different states based on the person entering.
I was hoping to use logic rather than introducing more technology.
So if I use my scene to shut everything down when I go to bed at night then that would be the trigger to say I’m home and to turn on the TV and light at 06:45 or just the TV if it is not dark.
Sorry guys feeling a bit dumb here!
I wanted to turn everything off using my iPhone when I went to bed and that would be the trigger to say I’m home and to turn on the TV and light at 06:45 or just the TV if it is not dark.
Firstly I couldn’t see the PLEG on my iPhone to trigger the Goodnight and the sequencing just eluded me :-[
PLEG does not have a UI …
Most folks use a Virtual Switch or MultiSwitch to indicate some state.
In your case something like BedTime
When the BedTime switch is turned on … You can turn off everything left on.
If the BedTime switch is on … and it’s 6.45 you can fire your Wakeup condition.
In the action for the Wakeup … you can cancel the Bedtime switch … then it’ ready for the next night.
OK, I set up my switch and when I “GoodNight” it turns it triggers a Condition _Night_shut_down which initiates an action to turn everything off.
I have another Condition _Its_Morning that I am trying to use to Date/Time Stamp of Good_Night so that at 05:45:00 it fires other Actions. I am having problems with this, in fact everything came back on in the middle of the night ;D
Check out the Status command on the Control tab of the PLEG device.
It generates a nice report. Save it and attach it to your posts when you have a question. It makes it easier for us to see what you are trying to do … and to respond using the variables and condition names that you are using.
Then where you previously referenced it in your conditions use:
!_Is_Day_Time
The ! character means NOT.
[hr]
Then change _Its_Morning to the following:
_Its_Morning Good_Night and (5:29:00; NOW)
The built-in variable called NOW is a 1 minute interval timer. So it evaluates the expression every minute.
What this says that if Good_Night is true … the first minute after 5:29:00 it will fire the actions for _Its_Morning
[hr]
You might also want to add an Action to _Its_Morning to turn the MultiSwitch 1 OFF.