Installing Home Assistant on Ubuntu 18.10

I am using home assistant to control my garden, (temp, watering,humidty, etc.), and unfortunately, all solutions with an rPi seem to be highly unstable and after having it crash and burn several times, (about once a month for the past year), I had to come up with another solution.

So my solution is to take a desktop, install ubuntu, and then install HomeAssistant on that. I’ve tried various methods from comments in the community, but I have yet to find a complete step-by-step tutorial, (with nothing more than a base OS installed at the beginning), that would end up with a working HA install, similar to hassbian, in the end. I’ve run into incomplete instructions for using docker (I’m VERY familiar with linux but know next to nothing about docker), a convoluted setup using the python virtual envinronment (I ended up so far in the weeds following that tut that I couldn’t even remember where I was), and even installing to the base os,(got a working install except ZWave doesn’t appear in the menu and I know my zwave dongle is at /dev/ttyACM0 however HA says it isn’t there).

What would be nice is a tutorial that is clear and complete, or an “All In One” Installer script like they have for the rPi.

Any help would be GREATLY appreciated and thank you for taking the time to read this.

mine is running on a headless debian system and i just followed this manual: https://www.home-assistant.io/docs/installation/raspberry-pi/
to enable autostart at boot: https://www.home-assistant.io/docs/autostart/systemd/

This should help. I plan on using it as a base guide very soon but to install Ubuntu rather than Debian… as a non-Linux person I’m hoping it’s not too difficult to follow it while swapping out the OS…

Do you want hassio or non-hassio? From your post above it seems that you want the non-hassio version. If so I have a procdure I wrote up for myself that installs on debian OS but it would work basically the same on Ubuntu.

I also have a procedure written up for when I installed HA (non-hassio…do you see a trend?) on the same Debian OS in a venv before I switched to Docker. Docker is definitely the way to go for non-hassio installs tho.

Let me know if you’d like to see them.

I

1 Like

Dare I say Docker is the way to go period!

1 Like

Spend 10 minutes to setup docker. Run home assistant in docker per the documentation and see how easy it is.

1 Like

I already had a setup of HA in Docker on Ubuntu 18.10, but recently found this article, read it and thought that it was very well done, this should give you the step-by-step instructions that you are looking for.

1 Like

Yes!!! Absolutely. I would prefer a non-docker solution. Thank You so much!

Why?

Docker is going to be so much easier to manage

I assume hass.io is an example of running it in docker. THat was a NIGHTMARE for me. I quit using it because everything was working fine one night, I woke up the next morning and could no longer use the tool to edit the configuration.yaml and groups.yaml file. SSH barely worked and even when it did, I couldn’t get to the files I needed to edit. Maybe once I’m more familiar with Docker, I might give it a try. Right now though, I just need something stable to manage my garden.

It’s not, but you realize that hassio isn’t the only thing out there, right? You can run just normal home assistant in docker.

So use a normal text editor on your own desktop/laptop? You’re not required to use the editors in add-ons.

If you’re running on your own Linux install you don’t need ssh add-on. Stop relying on or locking yourself into the idea that add-ons are the only way to use the system.

How will you ever get familiar with it if you don’t pick a project and learn it?

It will take you 10 minutes to have the entire thing setup and you won’t have to mess with learning how to switch users and change Python environments…

You’re over complicating this.

I’m a nerd and I’m always willing to try new things and the whole Docker thing has me curious, so I will learn it. But I can’t justify throwing it in place now without understanding it as unexpected results can have a seriously detrimental affect on my garden. My garden is a cannabis garden and I got to the point where hassbian on the pi was so flakey, I had to right a script to make it reboot itself every night or sometimes, (with no changes on my part), the lights just wouldn’t come on when they were supposed to, or they wouldn’t go off when they were supposed. Using Hass.io, all the lights, both in my grow room and in my bedroom and office, (I have zwave LED bulbs in those locations), would flicker every night at midnight.

When using hass.io, once the add-on stopped working to edit those files, I had no way to get to them. Someone posted a tutorial about pulling the sdcard and putting it in another *nix system, mounting the drive, and the editing the files that way. It worked, but sheesh I didn’t want to do that every single time I wanted to make a change.

I’m not against docker, I’m really not. It looks interesting and I can see the value in it. It’s just an unknown to me right now and I’d prefer to learn it with something that doesn’t run the risk of killing my plants. I’ll probably setup a VM to play with it. I actually followed a tut that went through the install of docker.io and using that for HA. Problem is the service wasn’t created, and therefore not started, and while that’s normally not a problem cause I do those things manually, docker through another element into the mix and after about 30 minutes of mucking with it, (still couldn’t get it to start, and then saw I needed to figure out how to expose the ZWave dongle to the docker and that just didn’t work), I just stepped away from it. It doesn’t have to be this complex. Using hassbian on rPi isn’t this complex. It just worked. The only reason I stopped using that is because I was replacing sdcards about once a month because no matter which one I bought, they would eventually fail. I would love to have hassbian install that I could run bare metal on my desktop. I didn’t see anything like that so I am trying to get as close to that as I can.

To be honest if you are relying on HA (in any form: HassIO, Hassbian etc.) as a means of income, I would stop. It is fine to MONITOR, but I wouldn’t risk it as CONTROL. You would be safer using an ESP8266 which could be controlled by HA using MQTT variables, but has enough code within itself to run the automations based on last know values if the HA link fails. This is the exact issue I currently have where I stupidly upgraded HA to 0.86.0 just before flying away for a week… my automations failed to load and I didn’t have time to fix it before I left the house. My garden relies on HA too so I had to get someone to manually water for me until I get back. My revised irrigation system will be as I mentioned above so it still continues even if HA is not running.

1 Like

No. Not using it to make money. Just to grow my own instead of going to a dispensary. Currently I have my lights and feed pumps (I’m growing I’m hydro) on an analog timer cause I just don’t trust HA after all the problems I have had. My environmental controls are what I want to monitor.

There is no service required.

Note the restart: always flag

It’s a single command. Not sure why you are mucking around with anything.

Follow the instructions to install DOCKER-CE from Docker, do not install docker.io.
Add your user to the Docker group.

Either run the single command to get it running, or set up your docker-compose file. Within 15 minutes you will have Home Assistant running in Docker, and have access to the files on the host.

literally covered in the HOME ASSISTANT DOCKER documentation. It’s ONE parameter added to your Docker run command.

Thank you for your advice. I’ll give it a shot. If I can’t get it to work I’ll just find another platform to work with. I do appreciate your help though.

Here are both procedures:

VENV:

https://pastebin.com/YiQWpCm0

Docker:

https://pastebin.com/h5Y4duQ1

1 Like

@finity Thank you sir! I have a little better understanding of Docker now, (I’ve been reading about this a.m.), so I am going to try those Docker instructions when I get home from work. I think this might be a winner. Thank you again my friend!

1 Like

I used the instructions for HASSIO on Linux. Installed it in few minutes, on NUC with Ubuntu 18. Zero issue.
If you have a previous docker install, I red its best to uninstall first.

sudo -i

add-apt-repository universe

apt-get update

apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat software-properties-common

curl -fsSL get.docker.com | sh

curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install" | bash -s
2 Likes

@Klagio THANK YOU THANK YOU THANK YOU!!! Your solution worked PERFECTLY. I have it installed and I can add devices to it now. The only piece left is figuring out management, like how to stop and start the server from the command line instead of the GUI and I am golden! I’m reading more about dockers and containers now, but thank you again sir.