I’m a huge fan of home automation. I started studying the KNX standard more than a decade ago, and I wanted to automated everything in my home. One day.
In the last decade, we saw the apparition of lots of new standards, not just for lighting and heating, but also for everything else. Unfortunately, it’s rarely compatible with each other. I saw a few projects int he fast, and recently saw HomeAssistant in an article, and decided to try it.
What is HomeAssistant
HomeAssistant is an Open Source project that has lots of compatibility layers with the Internet of Things. As it is community-driven, the support is mainly achieved through the community discussions as well as individual efforts to develop new interfaces and fix bugs.
In my case, it is supposed to support interactions with my light system (Ikea Tradfri), my fan (Dyson), and it’s supposed to see also things like my phone battery life (if the HomeAssistant app is installed to display and interact with the HomeAssistant server).
There are different ways of installing the server on a box, the easiest is to download a full image, the Home Assistant Operating System. This means that you don’t have access to the underlying OS, but just the different layers on top of it, layers that you can also manually install if you want.
I decided to go the full OS way, as you have the supervisor integrated and it was impossible to install it with the community script on the RPi.
Once installed, the assistant started and I could connect to it directly from my phone and I could see the basic “integrations”, as they are called, like the weather where I’m located (if I enter the proper location).
Ikea and Dyson were the integrations I was looking for. My heating system is not over IP or zigBee or something else, so I can’t connect it to my box, but lighting and fan were interesting to me (the fan because you also get temperature, humidity and pollution levels).
That’s when it started to go really bad. Let’s start with Ikea. The integration doesn’t work out of the box. You need to add environment variables to the docker image… Which you cannot do in HAOS as you don’t have access to the underlying system that launches the containers. The only option is to clone the core HA repository, get the tradfri repo and copying it in a custom_components folder in the config folder.
But how do you do that if you can’t have access to the image? You have to install the Samba component through the supervisor that allows you to mount it. The explanation is not very good on how to configure it, but once it’s done, you can mount the config folder, copy the tradfri folder and add the following to the __init__.py file:
The other issue is that you have to set a password in the yaml editor for Samba (there is no way to get to the actual yaml configuration file in the supervisor through the samba mount as far as I could see!), and HA keeps on telling you that it’s unsafe. There is a way to add a secret, which is basically a list of passwords, in a secrets.yaml file in the config folder, and you should be able to use !secret my_password in the yaml editor, but as it’s not valid yaml, it doesn’t work… Way to go…
Then Dyson… Dyson changed their API at the beginning of the year. The native Dyson integration didn’t get this update… As such, you need to add custom components through the Home Assistant Community Shop. Which is a pain. And then add the dyson-cloud and dyson-local components.
Once this was done, I could connect to my account (with the missing F2A!) and my fan was properly discovered. Unfortunately, Dyson is not using a 0-10 scale like in the app for the NOC and VOC sensors, and they don’t tell you what the ranges are like for PM2.5 and PM10. Seriously Dyson… I know that you think you are superior to everyone else, but this is ridiculous (like your support for Brexit).
Playing with HomeAssistant
After all that, I decided to play with HA a little bit, and it was also a steep curve. Scenes, automations, scripts, I still don’t know what is what. But I made a small script that will progressively shutdown my Ikea lamps in my living room.
There again, the existing threads on the community forums are deprecated, although it is possible to understand how to do it with some thoughts. But still hard. Typically, after 11:00PM, I wanted the lamps to shut down 10% (the Ikea default) every minute.
This is the resulting script:
end_of_the_day: alias: End of the day sequence: - wait_for_trigger: - platform: time at: input_datetime.end_of_day - repeat: count: '10' sequence: - type: brightness_decrease device_id: 8fd8c9cd4efbcdec866f0d97b0f90023 entity_id: light.lamp domain: light - delay: hours: 0 minutes: 1 seconds: 0 milliseconds: 0 mode: restart
I know, this is an Open Source project, so rough edges are to be expected, but was still a very disappointing experience after the very nice article I read. I’m not sure I would advise you to use HA yet, maybe it will improve its user experience. I hope so.