This is Part-III of an ongoing series of Ol’e Sopwith’s adventures with a home automation project. Part-1 started off with the ambitious idea of doing a bake-off between openHAB and Home Assistant. In Part-II, I learned the openHAB platform and achieved all of my goals of getting numerous Z-Wave devices on-line. I even took the time to create a detailed openHAB “How-To” to assist those of you that are new to the platform. Very happy with the results.
Here in Part-III, my plan was to do the same with Home Assistant. Dig into the bits and document how it works. My hope was to get all of my Z-Wave devices behaving the same way in Home Assistant (HA) as they were in openHAB.
Not so fast Shirley. From the moment I started to learn HA, I ran into problems. For example, I started on this page, “Install Home Assistant”, and followed the instructions exactly. I burned the image and booted the Pi. Notice the below instructions 6-8.
- Connect your Raspberry Pi to the power supply so it turns on.
- The Raspberry Pi will now boot up, connect to the Internet and download the latest version of Home Assistant. This will take about 20 minutes.
- Home Assistant will be available at http://hassio.local:8123.
What happened next was weird. I had a KVM connected to my Pi and a wired Ethernet connection to the Internet. The Pi did boot and showed a white background with the blue HA logo in the middle of the screen. After a few minutes, the screen went black. No keyboard activity bought the machine to life. <Alt><2> did not give me a new console. The Pi was dead. I was expecting to see a console with the install progress that would take about 20 minutes. Nothing.
At this point, I figured I screwed up burning the image. So, I re-burned the image and got the same result. I headed to Google and found out many others were complaining about the same thing.
Then I found a post that explained the Hass.io image for the Raspberry Pi was a self-contained Docker container. When you boot the image, it immediately fires up a web browser. What you are supposed to do is boot the Pi, then open a browser and head over to http://hassio.local:8123. When I did this the second time around, I saw a white browser page and a banner that said “This will take about 20 minutes.” Aha- the install occurs in a browser!
The Pi3 installed the bits pretty quicky and the system came up. The first thing I wanted to do was ssh to the Pi and set up the locale, timezone, keyboard, etc. Uh-Oh. SSH did not work. Huh? More Googling to discover the Hass.io docker image is completely locked down. You cannot install software on it, or do anything else with it. Black Box. at this point Sopwith is not liking the HA universe right now.
I next discovered that HA does have a Raspian version for the Pi named Hassbian. Terrific. But wait! On this HA web page, it says:
“Hassbian is our customized operating system for the Raspberry Pi 3. It is the easiest way of installing Home Assistant.”
If this is so, why do the instructions on the main install page tell you to install Hass.io? Weird.
I burned Hassbian to an SD card and fired it up. Now this had all the workings of a typical Raspian type install. I got everything configured and then discovered, to my chagrin, there are a lot of missing pieces in the Hassbian release that are in the Hass.io container. So guys, what am I supposed to use? Please don’t leave me hanging here!
I decided to go back to the Hass.io container and build my system from there. As you will find out, this was just the beginning of my trouble.
I spent the next two days literally going insane with this platform. In order to keep this Blog entry to a reasonable length, I will just highlight my unbelievable frustrations.
- The use of yaml as a configuration engine drove me to the loony bin. I spent more than 2 hours trying to get a simple working configuration.yaml file working. Shame on me for not knowing yaml, but hey, every time you change the configuration file you have to “check” the configuration to see if it is valid. This took forever. On top of that, if the configuration check validates, you have to reboot the Pi to see your changes. I can flatly state right here: Unless you are a yaml programmer, you will never get this platform up and running without some serious help.
- The HA documentation on their web site looks nice, but it lacks depth and assumes you know, in detail, the underlying architecture. For example, the third step of the Configuration documentation says you need to create an entry in the configuration.yaml file for each of your devices. I was able to get my Z-Wave devices up and recognized by the system, but below is the example the documentation provides.
- Ok – so I add my devices like it shows. But what platform do I use for a my Z-Wave devices? Where do I find a list of platforms? Lots of Googling determined HA itself does not use the term ‘platform’ in all but a few places. I never did find the list. I did not know how to configure my devices. I ran into this same problem with the documentation everywhere. Examples that were terse and did not work.
- I finally did get my three garage door sensors in a group on the Main page of the application. I would estimate to get to this point took me more that 9 hours of screwing around. To me, this is unacceptable for a platform that is supposed to be a snap to get up and running. And I have 40 years of programming experience.
- Instead of giving up – I decided to try one more “simple” thing. My garage door sensors are binary switches – so they have a state of either “on” or “off”. In the UI this does not make any sense for a garage door. A door is either “open” or “closed” not “on” or “off”. I figured this would be as easy as configuring a map or a python dictionary. Nope. You have to create a Template. I followed instructions from the HA web site and blog posts, but I could not get it to work. I could not figure out how to get a templates output assigned to a control. This absolutely drove me crazy trying to figure it out. I never did get it to work. To have to create a template to do something so simple tells me the Framework is flawed.
Those of you that know me, are very familiar with the fun I have fixing something that is broken – especially right out of the box. This experience of getting HA up and running was truly horrible. I cannot remember having this much frustration on a single project in years.
Now before you HA aficionados started spamming me – this is just one man’s experience. I have no beef with HA. I am not an openHAB homer. It is just a simple fact that I was able to get openHAB up and running with a terrific user interface without any major problems. The documentation is above average and the community is vibrant. HA was a disaster for me. It is a rare day that I walk away from a tech project, but that is what I did here. I just don’t have the time to spend on trying to figure it all out.
Perhaps the most frustrating thing for me, above everything else, was that I never saw a single line of Python code when I was trying to get HA up and running. This platform may be written in Python, but you are going nowhere unless you know yaml and can deal with its crazy indentation and syntax.
I apologize to my readers who were looking forward to a honest comparison between HA and openHAB.