As promised, I’m open-sourcing my Home Assistant configuration files. I benefitted greatly from the samples Home Assistant links to at https://home-assistant.io/cookbook/, and hope that by sharing these, others can similarly benefit.
The configurations are available to browse and download at https://git.ethitter.com/open-source/Home-Assistant-Config. The
git clone URL is https://git.ethitter.com/open-source/Home-Assistant-Config.git, and a zip of the latest configurations is available from https://git.ethitter.com/open-source/Home-Assistant-Config/repository/archive.zip?ref=master.
I’ll periodically synchronize this repository with its source, which includes some sensitive data that I manually exclude.
Much of my configuration is fairly straightforward, coming directly from Home Assistant’s documentation at https://home-assistant.io/components/. There are, however, a few interesting things to note:
- Turning off lights after inactivity – this requires a script in addition to the automation, as the script delays the action. See https://git.ethitter.com/open-source/Home-Assistant-Config/blob/master/automations/office-lights-timeout.yaml and https://git.ethitter.com/open-source/Home-Assistant-Config/blob/master/scripts.yaml.
- Customizing display names and icons – the names of many elements can be less-than-ideal, particularly with many of the same item. Similarly, many of the same item can make for a visually-repetitive interface. For example, I have many lighting scenes with the same name, but that apply to different sets of lights. Fortunately, the name or icon of anything can be changed, as demonstrated in https://git.ethitter.com/open-source/Home-Assistant-Config/blob/master/customizations/scenes.yaml.
- Security – Using various third-party tools, I’ve integrated control over Samsung’s Smart Home Monitor and our August Smart Locks from within Home Assistant. I described how to integrate Smart Home Monitor in http://ethitter.com/2016/08/smartthings-smart-home-monitor-shm-mqtt-home-assistant/; after completing additional tests and resolving one bug in the library, I’ll share how the August Locks integrate.
Things to Know
The configurations require a bit of context to be truly useful, and at least a passing familiarity with the formatting of data in YAML. I run Home Assistant from a Raspberry Pi 3 on our local network. Since our connection speed exceeds that of the Pi’s megabit ethernet port, I added a gigabit USB adapter as discussed at http://www.jeffgeerling.com/blogs/jeff-geerling/getting-gigabit-networking. To interact with Samsung’s SmartThings platform, the Pi runs an MQTT broker and an MQTT bridge for Home Assistant. Those were set up according to https://home-assistant.io/blog/2016/02/09/smarter-smart-things-with-mqtt-and-home-assistant/, though I opted not to use Docker; instead, I run Node 6 from the nodesource repository, and the bridge and broker run right on the Pi alongside Home Assistant. Lastly, to control the alarm, or Smart Home Monitor, I wrote a SmartApp that leverages the aforementioned MQTT setup, which I described at http://ethitter.com/2016/08/smartthings-smart-home-monitor-shm-mqtt-home-assistant/.
As of August 20, my configuration produced these results: