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:
10 thoughts on “My Home Assistant configurations”
Thanks for sharing. Will definitely look your config and learn from it.
My pleasure, and thanks for the tip on Twitter about the
secrets.yamlfile. I’ve updated my configs. 😀
Thanks for your sharing. It’s really friendly!
I am making my own configuration but I am far from the end.
And personally, I think it’s never finished since the possibilities are limited by your imagination…
I saw that your are getting information about your Raspberry Pi. How are you doing that?
The only config related to the Pi I found is into groups.yaml but this is not working for me.
That uses the System Monitor component from Home Assistant: https://home-assistant.io/components/sensor.systemmonitor/. The configuration is in
It’s working fine now!
What I really like is the way how configuration is organized in directories. Is easy to find the file you need to change if you need a change.
CPU speed is reported by a different component: https://home-assistant.io/components/sensor.cpuspeed/. I’d accidentally omitted that sensor’s configuration, but it’s there now: https://git.ethitter.com/open-source/Home-Assistant-Config/blob/dae534085c2fda809558d6656f04433661216e43/sensors/cpuspeed.yaml.
This has been a great post. It really helped me put some of the missing pieces together in my setup, which I followed right along the same path you did and landed here. In my current setup, I have the google cast and google home devices and now I have a much more sensors in my Raspberry PI panel. However, the reason I’m here in the first place is to figure out how to create a panel that can goggle my 3-6 outlet/switch devices hooked up via smartthings. Could you point me in the right direction?
As usual, I figured it out as soon as I asked 🙂
For future readers, you’ll want to set up the switches.yaml file with mqtt
– platform: mqtt
name: “Living Room Light”
state_topic: “smartthings/Living Room Light/switch”
command_topic: “smartthings/Living Room Light/switch”
Thank you SO much for posting all of this. It literally answered questions I didn’t know I had! One it created was on the Raspberry Pi information, Do you use a hat or some kind of sensor or is that info available all the time?
Now to study your MQTT stuff……
The Pi details come from two sensors: https://home-assistant.io/components/sensor.cpuspeed/ and https://home-assistant.io/components/sensor.systemmonitor/.
They’re configured in https://git.ethitter.com/open-source/Home-Assistant-Config/blob/dae534085c2fda809558d6656f04433661216e43/sensors/cpuspeed.yaml and https://git.ethitter.com/open-source/Home-Assistant-Config/blob/5bfa928c36582ed46165bb37bf81afb36ff881e6/sensors/systemmonitor.yaml.
Comments are closed.