Looking to make use of the spring time breeze, I picked up a Tornado Transom window fan, Alexa Enabled hoping I can include it into Home Assistant.
Surprisingly got it to work so I thought I’d share the steps.
I would have preferred one of these z-wave enabled instead of AE for state sync, but this is what I can find to work with at this point in time.
Once you can turn the fan on/off within Alexa, then you can move on to the automation.
The general automation concept include:
- Creating a “Button” that Alexa can see and react to.
- Creating a “Routine” that responds to the button press and change the state of the Fan
There seems to be multiple ways to complete step 1.
For the quick proof of concept, I went with a “Alexa Skill, URL Routine Trigger”
Once Enabled (link with Alexa) you log in with Amazon Login and can create buttons that can be hit via REST.
http://www.virtualsmarthome.xyz/url_routine_trigger/
First step is to build a button for Alexa.
Log into the site above and under provide a name for your trigger:
Enter “Button 1 On” and save.
When you click save, you’ll get a notification from Alexa that a new device is ready.
From the Alexa app on your cell phone, you can now create a routine to manage your fan.
The surprising part was, that’s it… When this happens => Perform Action.
The final Alexa side routine looks like this:
- Test out the routine in the App to make sure it changes the Fan State
- Test out the url provided when you created the Trigger to see it trigger the routine
- Add the url to a REST action in home assistant’s configuration.yaml
rest_command:
window_fan_on:
url: "https://www.virtualsmarthome.xyz/url_routine_trigger/activate.php?trigger=10101010-e889-449d-a0cb-424242424242&token=10101010-2299-4e8f-9060-424242424242&response=html"
window_fan_off:
url: "https://www.virtualsmarthome.xyz/url_routine_trigger/activate.php?trigger=10101010-570f-41ce-9030-424242424242&token=10101010-b46c-4a0c-b46e-424242424242&response=html"
- Build out your automation / scripts in HA
- Finally create more buttons, to turn the fan off or for setting different fan options like speed, direction, etc.
Other Thoughts:
- The method to create a button without a third party seems to exists but requires a bit more effort to get working. It’s worth evaluating as to not depend on a third party linked skill. The cloud version of HA appears to have instructions for something similar, but I’m currently not using that feature.
- Best practice stuff like putting tokens into the secrets.yaml files is left up to the reader’s preference, this is more of a proof of concept.
- It’s awful sad that state isn’t natively available, that mean I will need to come up with a creative solution for that separately (energy monitor?, time based state broadcast?).
- Feel free to share your thoughts and experience or even a better fan model should it become available.