Howdy,
I’ve been running Home Assistant for the past year on a Raspberry Pi 3 (AIO Installer) and I’ve certainly grown past the experimental phase. Has anyone had any experience with completely migrating their Pi setup (ARM) to a different platform? Between MQTT, OpenZ-Wave, LetsEncrypt, and AppDaemon, I really don’t want to start from scratch. I really just want to move to a more faster, and reliable hardware platform such as an ESXi environment.
I know I can copy my entire configuration directory over, but I’d still have to re-configure all of the external services and everything. Has anyone ever tried a P2V move of a Pi? What about starting with HASS.IO and moving everything over?
Migration was simple. I used docker so config was minimal.
OZW is part of docker build so zwave mostly just worked.
Nginx I have separate docker for so config copy was only needed. Nginx reverse proxy all containers or directly connect with docker command during container build
Letsencrypt has docker that I run only to renew cert then destroy
HA container is separate so Copy config files from pi into approx appropriate folder
Start container
MQTT also separate container
Appdeamon I have no experience with
EDIT
I did small migration for friend. Same as above.
Took 1hr download, install and upgrade Debian. Took 15 minutes to have HA,zwave,nginx,mqtt up and fully functioning (most of this time was unneeded changes to groups and config because different layout was wanted and new components wanted)
So for some additional context- yesterday I loaded up a new Debian 9 VM on my ESXi server. I have a separate vm with MariaDB ready to go for the database, so I can cut that over sooner while HA is still on the Pi. I’m not super familiar with Docker, but i’ve heard a lot of users who go that route. I’ve been pretty comfortable using the Python Virtualenv and Raspbian. How has using the USB Z-stick been with a docker container? I’ve got to pass that through the VMWare host to the VM, so I wonder if I’ll have any other complications from that.
Thanks again for the info! I’ll look into the Docker route.
Hassbian is venv so that may help you if you go venv route
Docker just require
1.Docker install
2.at command line run "docker run --name=Hass -p 8123:8123 --device=/dev/usb0 -v /config_file_location:/config home-assistant/homeassistant:0.59.1
3.HA is running, start setting up config
“–device” define zwave device
“-v” define the volumes accessible to docker on server:and where they mount in docker container
“-p” server port you want to map:docker container port to be mapped
There are other commands and options for docker but that’s basically it.
I’ve heard some mention using both venv+docker on freenas forums but never saw a need
EDIT
Once zwave stick added to docker container, it works just like running on server. I don’t see any limitations
I run two instances on HA, one on a pi that runs mostly its gpio and some critical devices and I use state stream to connect it to a mac HA that does most the automations, internet devices (google calendar etc) and the front end. The pi does the automation that I need to always work (alarms / gate / doorbell ) and the mac HA can be down without interrupting the critical house operations. I work on the mac HA almost exclusively while never touching the pi HA except to upgrade ever now and then.
@RobDYI… your multi-homed approach is very appealing to me, simply for safety’s sake with the “always has to work” group of services. I honestly haven’t searched for any details on how to do this (as it just occurred to me upon reading your post), but would you care to share a few details to lead a (normally inquisitive (and decently techy)) fellow down the right path to achieve this?
FWIW, this may help the next fledgling HA enthusiast find the path without asking
Please let me know if you need more detail than this short version.
1. Put the statestream component on each HA instance, choose a easy name to identify
mqtt_statestream:
base_topic: mac
2. To duplicate any sensor from another HA instance, use mqtt sensors like this, use the easy name from step 1.
sensor:
- platform: mqtt
name: cell__data_used
state_topic: "mac/sensor/cell_data_used/state"
3. To control any switch / script etc, use shell command like this
shell_command:
gate: curl -X POST -H "x-ha-access:" -H "Contentype:application/json" -d '{"entity_id":"script.gate"}' http://192.168.2.186:8123/api/services/homeassistant/turn_on