There’s a few times I’ve considered the Logitech Harmony product line. The products allow you to take all your Infrared Remotes and consolidate them into a single ‘transmitter’. This gives control through Android/iOS apps and there’s APIs that Home Assistant, Google Home and Alexa can all hook into.
The problem is when Logitech decide to no longer support the firmware, or decide to lock it down. The API has an uncertain future which a single update could lock out Home Assistant users.
I much prefer to DIY my home automation. It usually means exploring an area i’m not familiar with so I learn something new along the way.
The first goal is to read a value from an Infrared Remote and transmit it back out. This effectively would replicate the remote in a manner we can control.
For a lot of my home automation projects I use the highly popular Wemos D1 Mini. These little devices are Arduino compatible and provide build in WiFi for £2.00 (provided you can wait for AliExpress shipping).
Next up is the technology to read/broadcast IR signals. For this you can use any IR transmitter, they’re normal LEDs but output on the infrared spectrum. I stumbled on the ‘Lolin IR shield’, a full shield for the Wemos D1 that has several IR transmitters and a receiver built in. They’re also very cheap and use SMD components so they’re quite compact when slotted on.
This is where most of the work went. I wanted to make the software easy to use and maintain without having to change config files or load up the Arduino IDE each time. Initially the firmware sets itself up as a WiFi hotspot, this means the same binary can be loaded into any module and configured from there with MQTT/WiFi settings.
The Interface isn’t the most modern and sleek looking, but it gets the job done. I’m an embedded engineer 🤷♂️.
When you want to reconfigure which ‘buttons’ you have, you just have to load up the webpage and delete or add as required. Adding will ask you to press the button twice, to make sure that the right signal has been captured.
These values are then saved into the EEPROM so that it’ll survive power cycles.
Home Assistant integration was the next challenge. I found you can use MQTT discovery. This is the process of defining new Home Assistant entities over MQTT. This means the only change on the HomeAssistant side is enabling discovery, like so.
# Example configuration.yaml entry mqtt: discovery: true
All of the different buttons that have been configured will be transmitted via MQTT to HomeAssistant and will show up as a switch you can turn on and off. If you have a Google Home or Alexa, this will naturally propagate as it’s just another HomeAssistant entity.
You can read more about MQTT discovery here