A headshot of Joey.
  • alexa
  • echo
  • homebridge
  • homebridge-plugin
  • homekit
  • smarthome

Homebridge Alexa Smart Home

smart home device control wide

The impetus for starting this project was frustration with using the Amazon Alexa app to control a few Bluetooth lightbulbs that only work with Alexa. Fairly frequently, I prefer to quietly control smart home devices using my iPhone as a remote rather than speak verbal commands to Alexa. Sometimes it is because I am not within range of an Alexa device and sometimes I need to control devices quietly.

Regardless, the Amazon Alexa app is not user friendly for controlling smart home devices because there is no widget for quick access and it requires navigating several screens to get to where I can control my devices, all which are fairly slow due to how many features the app has. With Apple HomeKit, I can add device shortcuts to my home screen and control devices quietly with ease.

Unfortunately, not all IoT devices are compatible with Apple HomeKit which is why Homebridge is so popular. It provides an interface for developers to integrate any smart home device with Apple HomeKit and allows non-developers to install plugins shared with the community.

Once I discovered that I could reverse engineer what the Alexa app was doing using Fiddler and that there were open source projects to facilitate the login process programmatically, I started hacking together something to control these lightbulbs. Within a few days, I had something functional and decided to publish it so other Homebridge users could benefit as well. I also used the opportunity to learn fp-ts, a functional programming library for Typescript, which was very rewarding and challenging.

Not surprisingly, only a week or two went by before people started organically discovering what I built and were requesting I start supporting more than just lightbulbs; things like thermostats, Echo smart speakers, and air quality monitors to name a few.

Source code link

github.com