This week I bought an echo dot device and I wanted to try out some of its home automation features. I used Home Assistant (Python, Open Source).
For my test setup I added a LED on RPI port 18 (I used a 68 ohm resistor).
Install Home Assistant on Raspberry Pi
I followed the documentation for Home Asssistant for installation on a Raspberry Pi.
For headless setup, SSH can be enabled by placing a file named ‘ssh’, without any extension, onto the boot partition of the SD card.
The default password of the RPI is raspberry. It is best to change the default password:
Home Assistant configuration
The Home Assistant is configured via the yaml config-file configuration.yaml.
At the end of the configuration.yaml file I added the folowing lines to enable the GPIO pin 18 and expose it via emulated_hue:
Start Home Assistant service on the RPI:
GPIO Switch setup
I am using Home Assistant’s rpi_gpio switch platform to control the LED via the RPI’s GPIO pin.
For this to work I had to add the homeassistant user to the gpio group:
Alexa discover devices
For the device discovery part I asked alexa to do the work:
Visit Alexa Setup to setup a “desk” group which contains the light device:
Using Alexa
Now I can use Alexa to switch the light on and off…
I wish you a happy new year! Mark