Moving HomeAssistant/Hass.io to new hardware

I thought I would share my experience moving my hass.io configuration from my rpi3+ to a mini pc.

First, why?

Hass.io works great on the Pi3, and if i wasn’t constantly changing things, I would leave it on the Pi3+

For those that haven’t used a Pi3 for hass.io… reloading the configuration (which you have to do for sensors, switches, basically anything that has an entity_id, changes), is extremely slow! were talking up to a minute or more, where as a computer, even a dual core celeron i’m using, is like 5-10 seconds (ssd drive).

Things I did

  1. Have a Computer (second instance of HA) fully running and tested. Lots of great setup instructions in the official documents on how to do this. I chose to do it via Python3.6 Virtual Environment on a Ubuntu 18.10 LTS minimal server install.
  2. Stop HA on both systems.
  3. On the New (Computer ill call it now), delete the “.homeassistant” files (I kept a backup of working test config).
  4. Copy all the files from the Pi3 config directory to the Computer config directory. Don’t forget the “.” hidden folders.
  5. Move the z-wave stick from the Pi3 to Computer
  6. Make sure computer see’s the usb stick as per your configuration, typically /dev/ttyUSB0 (but some i have seen have different names, point is, make sure computer loads it, and has the name in your configuration.yaml file. For some reason, my computer didn’t see the new stick at first).
  7. EDIT configuration.yaml - i forgot this step and had loads of errors/issues at first.
    a. look for any paths that were used, like location of zwave/zigbee configurations, and update the path to the new on on the Computer, typically on Hass.io /config/filename.txt would become /home/username/.homeassistant/filename.txt
    b. remove hassio: line, or comment out.
    c. remove any custom hardware sensors; i.e. i had a command: sensor that pulled cpu information from the Pi3, which of course didn’t work on the Computer, and would cause the startup of HA to hang.
  8. Startup HA on Computer, making sure to watch the log file, or first time do hass --open-ui from a console to watch the output and ensure no errors happen.

After a few hiccups that i think i covered above, things appear to be working on my mini-computer HA environment now exactly as the Pi3, but much faster to load!

Speed UP "Tips"
Other thing i did that appears to make HA web browsing, particularly sensor history, WAY faster, is to setup MySQL as the database, rather than sqllite file, the default. Since i’m now running on a computer, it has plenty of resources to do this. I’ve also setup dockers to run MQTT and Node-Red on the same machine.

Hope this helps someone who is worried about moving hardware, and isn’t sure of the processes.

4 Likes

This is very helpful. I want to move from my pi 3b+ to an old macbook I have. But I was worried about the zwave stick getting messed up when I moved it over.

I already have MySQL running my my pi and it has been working great for about a year. I run raspbian off an external SSD which helps but suddenly the system has become really slow and some zwave devices are taking about 1 min to take action and some are not reporting state back at all. So I need to rebuild.

Thanks for this post!

Awesome write up.

Im going to do the same on the weekend. Speed reasons for me also (but this was on the todo list somewhere waaaaay down the line) … What are accelerated my plans was my SD card giving up so now my pi is dead! Fortunately i was able to mount the disk and get back my config, so all good.

Question though on z-wave - do i have to rebuild the network again? Or does my “controller” (the usb stick) remember the associations etc. ?

Thanks!
Keiran.

So long as you use the SAME usb z-wave stick in the new system and Copy of ALL HA files. it will just work (ensure that the USB port is the same in the new system, or you may have to update the line in the configuration.yaml file)

Nice. I got half of my move done on the weekend. Havent gotten to z-wave yet as i have to work out (1) how to passthru the USB z-wave stick into KVM, and then from there (2) how to map it into docker. The latter i know how to do, as on pi, i was also running hass in docker… i like making life tough for myself it seems :wink: