It’s all starting to fall into place; the arduous research, sifting through documentation, and good old trial and error are paying off in spades. The house is coming alive, becoming a part of our daily lives. We’re in the future, and it’s free and liberating.
I’ve been building my smart home on open standards and technology, it’s self-hosted and doesn’t cost anything but a few watts.
This post describes a vertical slice of one single automation within my home and an appreciation of the many layers of free and open-source software.
The goal is simple enough, I would like the lights to turn on when a movie is paused, and off again when the movie is resumed.
It’s fair to say that Home Assistant is the conductor, but it’s not without its orchestra - Within the space of ~100ms this elegant symphony begins and concludes.
Our instruments are: Infrared, HDMI-CEC, USB, Kodi, HTTP, Home Assistant, Zigbee.
Here’s how it all fits together:
The Flow
Breakdown
- The TV remote sends an infrared signal to the TV when the pause button is pushed.
- The TV, using HDMI-CEC, communicates with the ONKYO AV RECEIVER.
- The AV RECEIVER, also using HDMI-CEC, communicates with the Pulse Eight HDMI-CEC Adapter.
- The Pulse Eight HDMI-CEC Adapter connects to Kodi running on Fedora/Linux via USB.
- Kodi, using libCEC to listen to HDMI-CEC events pauses the media playback.
- Home Assistant running on HAOS listens for events via HTTP.
- Home Assistant sends an “ON 0x0004 Zigbee” command to the Zigbee Mesh (ZBC).
- Zigbee Mesh forwards the “ON 0x0004 Zigbee” command to the Zigbee Light group (ZG).
- Zigbee Light group (ZG) controls Lamp 1, Lamp 2, and Lamp 3 by sending “ON” commands.
Conclusion
The appreciation I have for modern technology and the free and open-source community is immense. This automation, while but a trivial convenience, showcases years of volunteer work, and interoperation between a variety of technologies, and what’s most important in my opinion, is that as hackers, tinkerers, and engineers we can stand on the shoulders of giants and achieve amazing things together - Even if that thing, is something superfluous like automating your lights..
I hope you feel as inspired as I do and can use this as an inspiration for how you appreciate and approach your home automation.
Technology Used:
Also published here.