Rpi 4 installation

Well i believe the published ports 8123:8123 is missing looking into the Portainer. Hence i cannot access Home Assistant externally.
I believe something went wrong during the installation and I have not figured out how to add published ports in Portainer. I have tried to enter the homeassistant container…but no luck so far.

Your setup looks just like mine, no ports are published on mine either.

Can you ping the pi from another device on the network?

Are you using wireless setup or Ethernet?

When you are using network = host you won’t see published ports. This is normal and how hassio works, and how home assistant in docker is recommended.

Sounds to me like you have a bad config or wrong image. What do the logs tell you?

1 Like

dankitchen and flamingm0e,
Thanks and how odd, suddenly the direct IP access works from PC, i.e. in my case 192.168.72.250:8123
However i still cannot access via hassio.local:8123 or http://hassio:8123

Found other with similar issues but not sure what to do Can't access hassio.local:8123, only numerical IP address
I have an ASUS Lyra router

Does your router support loopback or hairpin Nat?

Thanks and I’m trying to find out…it is the fairly new “mesh” 3 pack Asus Lyra.
I can access the HA using http://raspberrypi:8123/ so i guess it is working?

that doesn’t indicate hairpin NAT at all. That’s simple name resolution (mDNS, DNS, etc)

I’ve tried installing the latest beta (64 bit RasPi 4) from here. It installs fine and boots up. I can set up an account. Then I copy my snapshot from my Pi3 setup over and restore it. When I reboot, it just gets stuck at “Preparing Hass.io”. Let it sit all night. Same thing. I’ve tried it twice. Any way I can get insight into where it’s failing?

EDIT: Ok, silly me. The return to “Preparing Hass.io” was actually my browser being cached on the original IP. When it rebooted, it got a new IP. But connecting to that new IP is still a non-starter. When I look at the log file, it’s complaining about “sqlite3.DatabaseError: database disk image is malformed”. Going to keep working on it but wanted to make sure I updated my discovery.

I have simply taken the pi 4 image provided and set it going. All works fine.
However I saw mention that this version was not as complete as the pi 3 variety.
Is this still the case ? and if so where can i find the issues list so I don’t bang my head pointlessly as I flounder to add stuff and learn. I am starting from scratch.

You can find it here: https://github.com/home-assistant/hassos/issues . Has anyone tried comparing the speed of Running HA on HassOS vs Native pi + docker on pi4? Trying to see which way I should go

I have it running with the beta and my snapshot from my Rpi3. It’s just that you cannot transfer over the whole config cuz some things are breaking it. I had to ssh into and stop duckdns and some other things for it to start properly. So do a snapshot but choose carefully what you transfer over :slight_smile:

1 Like

Hugh_man’s guide worked perfectly. Now I got Pi4 Rasspbian + hass.io docker + SSD NVMe HD running. Btw, the hassio install script got updated so now you actually don’t have to modify install script.

Oh and just like Alexander above said disable nginx / duckdns addons when you are restoring from snapshot, and just reinstall them again manually. I spent 15 minutes trying to get back in.

Any guide for using SSD with pi 4?

The only way I got SSD booting on Pi4 is to go with Raspbian Buster instead of HassOS and then install Hassio on top.

The caviat is that you will still have to have sd card plugged in to boot but then everything will run of SSD usb. I got a Kingston A2000 NVMe drive (it’s pretty cheap considering the speed you get) and Shinestar adapter for it . While you are there pickup yourself this bad boy heat sink case Pi4 runs much hotter then pi3 and will throttle, and you will be back at pi3 speed :joy:

It was actually pretty easy setup from there

------------ Step by step Pi4 + SSD guide------------

Install Raspbian Buster and Setup SSD handover

  • install official Raspbian Buster Lite version (burn it using BalenaEtcher), (put SSH file on SD boot partition so you can connect to it on boot). Don’t worry about the SSD just yet.
  • boot it up, then plugin your new drive and follow this guide: https://tomshardware.com/news/boot-raspberry-pi-from-usb,39782.html
  • there is a typo in that guide when editing cmdline.txt file, it should be sudo nano /boot/cmdline.txt instead of sudo nano /boot/cmdlinetxt
  • After the reboot you will be running completely of USB, you must have sd card inserted in order for it to boot up though. You can test by running findmnt -n -o SOURCE / it should now say /dev/sda1 or sda2
  • Run an update to get the latest kernel etc sudo apt-get update && sudo apt-get dist-upgrade

(borrowed from hugh_man above)
Install docker (instructions taken from this thread on docker ) :
$ sudo curl -sL get.docker.com | sed 's/9)/10)/' | sh

Install hassio dependencies (instructions taken from here )
$ sudo apt-get install apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat software-properties-common

Install hassio borrowed from here

  1. Save hassio installer to file: $ curl -sL "https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh" >> hassio_install.sh

  2. Run install script: `$ sudo bash hassio_install.sh -m raspberrypi4’
    or you can do raspberrypi4-64 if you are feeling adventures.

Restore HA Snapshot
All done, you should now be able to access Home Assistant from your pi ip. Login and restore your snapshot. I would also uncheck nginx or duckdns addons if you had those and reinstall them manually. I had to edit my local host file just to get back in because of them.

Also it appears that HA doesn’t get started automatically after the snapshot restore, you will have to start it up by connecting your homeassistant docker container and running “hassio ha start” , I gave it 15min and then started it (or you can reboot your Pi4 that should start it up again)

If you used Zwave Aeotec Z-Stick Gen5 stick on Pi3
Buy the Sabrent 4 port USB2.0 adapter. Otherwise your Zwave Aeotec stick won’t work, more info on this here. I tried 2 different ones some of them sort of work but they glitch, this one has been solid for a few days. Make sure you get the USB2.0 version, plug it in to a usb2.0 port. I got 50+ zwave devices on this thing and they are all humming along. You can also switch to HUSBZB-1 (if you don’t want to deal with the hub) and will give you Zigbee as well. The only issue is that you will have to remove all your Zwave devices one by one and then re-add them back to the new stick one by one (no thank you). If anyone knows away around this I would LOVE to hear it.

Remove ModemManager from Rasspbian apparently this conflicts with Zwave devices
From the main pi (not from hassio ).
Run sudo systemctl disable ModemManager
Followed by sudo apt-get purge modemmanager

If you used GPIO ports, some now are disabled
I was using about 10 ports for my home alarm reed sensors. Pi4 has the same Gpio layout however for some reason ports don’t get set to pull up resistor which is needed to read the switches. They still show up active under hardware menu but will be useless without the pull up resistor (this happend on HassOS as well btw). The workaround is you have to manually set them to “pull up” during boot inside raspbian. Here is a guide on how to do that

Pi4 + SSD Performance Difference
The performance with that drive is huge! I’ve been getting score of 9500 with that drive vs 300. You can benchmark yourself, while you are in Raspbian run:
curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash

You can see other’s people benchmarks here: https://jamesachambers.com/raspberry-pi-storage-benchmarks/
In the real world it means no more waiting when clicking between screens. Recorder and Event log is actually usable, you click it and things instantly show up. Before I had to count to 10 to get it to show up.

Raspbian vs HassOS difference
For those who are wondering if Raspbian OS is faster then HassOS !

  • benchmark with HassOS
    pi4-hassos-blank
  • with Raspbian
    pi4-raspbian
    so pretty much the same thing
34 Likes

Thanks for the great instructions @skynet01!

I’ve currently been running manual installation of HA because I have couple of local python scripts that are polling for GPIO changes and reporting the data to HA via depricated homeassitant.remote.

My question is, can I use the same process when running HA in docker image and does it support local python scripts?

not sure about local python scripts. But it’s pretty much no difference between Raspbian +Hass.io and Hassos + Hass.io . For both of them gpio pins work as i use those myself.

Currently I’m with Pi 3 with HassOS + Hass.io and I was wondering if I want to keep it that way or go with RAspbian + Hass.io. Because there is no noticeable performance benefit from hassos ( just the simple setup ) I definitely will prefer Raspbian as Im old school linux user.

Raspbian vs HassOS difference
For those who are wondering if Raspbian OS is faster then HassOS !

Yep I found the network benchmark faster in HassOS vs Raspbian also, however checking config and restarting HA is far far faster using Raspbian.

I’m talking 5 seconds to check config in Raspbian vs over 2 minutes in HassOS!

Thanks for the guide and buying tips. I didn’t know about the cool pi-4 heat sync case. I had the little heat sinks and fan, I upgraded :wink: Bought the SSD and adapter too. Nice!

I had a few hiccups:
Formatted SSD fat32 used mini tool partition wizard
From Tom’s Shareware link, several items are a bit different on latest buster. One missing (.) slowed me down for a bit.{ sudo nano /boot/cmdline**.**txt (was missing (.)}

This link helped me with just the boot cmdline.txt edit.

Looks like I have docker, Hassio supervisor, and DNS installed, but hassio won’t run. Do I need to edit the hassio_install.sh script?

Thanks,
Alan

pi@raspberrypi:/ $ hassio ha start
-bash: hassio: command not found
pi@raspberrypi:~ $ sudo docker ps
CONTAINER ID        IMAGE                                   COMMAND                  CREATED             ST                                                                        ATUS              PORTS               NAMES
f6a72fbee8ed        homeassistant/armv7-hassio-dns:1        "coredns -conf /conf…"   10 minutes ago      Up                                                                         10 minutes                           hassio_dns
ed0580e47968        homeassistant/armv7-hassio-supervisor   "/bin/entry.sh pytho…"   21 minutes ago      Up                                                                         10 minutes                           hassio_supervisor
pi@raspberrypi:~ $ docker --version
Docker version 19.03.2, build 6a30dfc