[Disclaimer] This is my first post, apologizes for formatting issues/typos
Want to set up an automation system that requires no effort to save money every night?! You wouldn’t have clicked on this link if the answer is no.
This automation system will:
- Turn the AC on when you go to sleep (colder temps = better sleep).
- After a specified time it will turn the AC off while you’re sleeping (@ 1am for me).
- Finally, it will turn the AC back on at another specified time (@ 6am for me).
The last step checks if you’re home before turns AC back on
- AC unit that can communicate w/IFTTT (Mine is connected to a Kasa smartplug)
- Time to set this up
------Setup a boolean variable which tells Apilio if you’re awake or not
---------Link Alexa trigger to toggle Apilio awake state when going to sleep
Go to IFTTT and create an Alexa trigger for a specific phrase
The given phrase doesn’t matter as you will override it later. (You’ll see)
Now we create the IFTTT action which links to Apilio and updates sleep state
The variable “awake_ongoing” is going to be false when I’m sleeping
Here’s the logic, but know that what you say to Alexa to trigger the routine can still be changed
Creating the Alexa routine to turn on AC when sleeping and to update Apilio sleep state variable
[Important] What you put here in the “When you say” section is what will cause everything else to run.
[Note] My AC is connected to a Kasa smartplug which in turn is connected to my Alexa.
Simple Alexa routine to turn off AC at a specified time (1am)
Now we need to create a time variable in Apilio and I do that by combining it with IFTTT.
Since Apilio has no time variables I will use a boolean value to check if it is a certain time or not
Setting up the IFTTT trigger
Updating our time variable to true in Apilio
Heres the logic
Now we will have to reset the time variable as after 1 minute the time variable “time_6am” will no longer be true.
To do that we must create an Apilio condition that will check the value of our time variable
Now we create a logic block to reset our time variable back to true!
[Important] I wait 2 minutes before resetting to account for any processes that might update slow
When the time variable gets updated to true, it will reset back to false after 2 minutes
We must create the IFTTT action to update Apilio time variable to false
This is from the Apilio logicblock
Heres the logic, remember that this will happen 2 minutes after IFTTT update time variable at 6am
Need a way for Apilio to tell if we’re currently home so that it only turns the AC if someone is present.
First we need Apilio location variable which IFTTT can update
IFTTT location trigger
— Being home is a boolean so it’s easier to chose the toggle option here
Enter your home location
Have Apilio update location variable
Heres the logic
Now we can finally set up our final logicblock that will check if we are home and if it’s 6am. If both are true, IFTTT will tell Kasa to turn the AC on
Last IFTTT trigger (previous picture)
kasa will turn the AC on if home + 6am
In order to prevent an error you must also reset your Apilio awake status variable to true when waking. (Similair to how you must reset the 6am time variable back to false)
The way I do this is with a Siri shortcut automation that runs when my morning alarm goes off and will send a webhook to IFTTT which in turn, triggers the Apilio awake status back to true
— This is an important step that I am showing so please let me know if you need further help
THAT IS ALL
[Discussion] I understand that there are a lot of moving parts and again this is my first time trying to explain my workflows so forgive me if you are confused.
What’s important to know with this method is that there are very few things that MUST happen for this to work.
— I must have my phone with me connected to the internet and at home (no effort)
— I must tell Alexa that I am going to sleep by saying my selected phrase (“Alexa, sleep time.”)
— I must stop my phone alarm when waking (no effort)
Truly other than those 3 actions above, you will not have to do anything else and you will still get cold air upon sleeping/waking, but you wont be wasting money having your AC run all night as you used Apilio to automate that process for you!!!