Rpi 4 installation

Have been running mine since Christmas and its a great step up from the 3B+ I was running before. I have a small fan on mine with the speed throttled down with a resistor to make it quieter. Over the past few months I have started to overclock it starting with 1.6 Ghz and now running at 1.8Ghz and it hasn’t missed a beat and still runs quite cool :smiley:

1.8

1 Like

If anyone would like to run Ubuntu on your new RPI4 running from SSD you can read my guide at Ubuntu Bootable SSD for RPI 4

curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh

Prerequisite Installation
apt-get install apparmor-utils avahi-daemon dbus jq network-manager socat -y

and you can run curl -sL https://raw.githubusercontent.com/krdesigns-com/supervised-installer/master/installer.sh | bash -s -- -m raspberrypi4 since currently supervisor is on hold and have a bugs on its scirpts.

Once complete you can check your browser IP:8123

how do you get RPI info??

Using System Monitor and a mini graph card in Lovelace to display the sensors. Here is my code borrowed off someone else

cards:
  - cards:
      - animate: true
        card: null
        entities:
          - entity: sensor.processor_use
            index: 0
        graph: line
        hour24: true
        name: Processor Use
        show:
          extrema: true
          icon: false
        style: |
          ha-card {
            border-radius: 15px;
            transform: scale(0.95);
            background-size: 100% 100%;
            border-style: dotted;
            border-width: 1px;
          }
        type: 'custom:mini-graph-card'
      - animate: true
        card: null
        entities:
          - entity: sensor.memory_use_percent
            index: 0
        graph: line
        hour24: true
        name: Memory Use
        show:
          extrema: true
          icon: false
        style: |
          ha-card {
            border-radius: 15px;
            transform: scale(0.95);
            background-size: 100% 100%;
            border-style: dotted;
            border-width: 1px;
          }
        type: 'custom:mini-graph-card'
    type: horizontal-stack
  - cards:
      - align: center
        animation: auto
        attribute: false
        background_style: false
        card_style: false
        charge_entity: false
        color: '#9932CC'
        decimal: false
        delay: 5000
        direction: right
        entities:
          - entity: sensor.swap_use_percent
        height: 40px
        icon: false
        icon_position: 'off'
        icon_style: false
        indicator: auto
        limit_value: false
        max: 100
        min: 0
        minmax_style: false
        name: Usage
        padding: 4px
        rounding: 3px
        saturation: 50%
        severity: false
        show_minmax: false
        show_value: true
        speed: 1000
        tap_action: info
        target: false
        title: Swap
        title_position: inside
        title_style:
          font-size: 12px
        type: 'custom:bar-card'
        unit_of_measurement: false
        value_style: false
        visibility: false
        width: 100%
      - align: center
        animation: auto
        attribute: false
        background_style: false
        card_style: false
        charge_entity: false
        color: '#40E0D0'
        decimal: false
        delay: 5000
        direction: right
        entities:
          - entity: sensor.memory_use_percent
        height: 40px
        icon: false
        icon_position: 'off'
        icon_style: false
        indicator: auto
        limit_value: false
        max: 100
        min: 0
        minmax_style: false
        name: Usage
        padding: 4px
        rounding: 3px
        saturation: 50%
        severity: false
        show_minmax: false
        show_value: true
        speed: 1000
        tap_action: info
        target: false
        title: Memory
        title_position: inside
        title_style:
          font-size: 12px
        type: 'custom:bar-card'
        unit_of_measurement: false
        value_style: false
        visibility: false
        width: 100%
    type: horizontal-stack
  - align: center
    animation: auto
    attribute: false
    background_style: false
    card_style: false
    charge_entity: false
    color: '#1E90FF'
    decimal: false
    delay: 5000
    direction: right
    entities:
      - entity: sensor.disk_use_home
    height: 40px
    icon: false
    icon_position: 'off'
    icon_style: false
    indicator: auto
    limit_value: false
    max: 100
    min: 0
    minmax_style: false
    padding: 4px
    rounding: 3px
    saturation: 50%
    severity: false
    show_minmax: false
    show_value: true
    speed: 1000
    tap_action: info
    target: false
    title: Used Space
    title_position: left
    title_style: false
    type: 'custom:bar-card'
    unit_of_measurement: false
    value_style: false
    visibility: false
    width: 70%
  - align: center
    animation: auto
    attribute: false
    background_style: false
    card_style: false
    charge_entity: false
    color: '#B22222'
    decimal: false
    delay: 5000
    direction: right
    entities:
      - entity: sensor.disk_free_home
    height: 40px
    icon: false
    icon_position: 'off'
    icon_style: false
    indicator: auto
    limit_value: false
    max: 100
    min: 0
    minmax_style: false
    padding: 4px
    rounding: 3px
    saturation: 50%
    severity: false
    show_minmax: false
    show_value: true
    speed: 1000
    tap_action: info
    target: false
    title: Free Space
    title_position: left
    title_style: false
    type: 'custom:bar-card'
    unit_of_measurement: false
    value_style: false
    visibility: false
    width: 70%
  - align: center
    animation: auto
    attribute: false
    background_style: false
    card_style: false
    charge_entity: false
    color: '#228B22'
    decimal: false
    delay: 5000
    direction: right
    entities:
      - entity: sensor.cpu_temperature
    height: 40px
    icon: false
    icon_position: 'off'
    icon_style: false
    indicator: auto
    limit_value: false
    max: 85
    min: 0
    minmax_style: false
    padding: 4px
    rounding: 3px
    saturation: 50%
    severity: null
    show_minmax: false
    show_value: true
    speed: 1000
    tap_action: info
    target: false
    title: CPU Temp
    title_position: left
    title_style: false
    type: 'custom:bar-card'
    unit_of_measurement: false
    value_style: false
    visibility: false
    width: 70%
  - align: center
    animation: auto
    attribute: false
    background_style: false
    card_style: false
    charge_entity: false
    color: '#483D8B'
    decimal: false
    delay: 5000
    direction: right
    entities:
      - entity: sensor.cpu_speed
    height: 40px
    icon: false
    icon_position: 'off'
    icon_style: false
    indicator: auto
    limit_value: false
    max: 1800
    min: 0
    minmax_style: false
    padding: 4px
    rounding: 3px
    saturation: 50%
    severity: false
    show_minmax: false
    show_value: true
    speed: 1000
    tap_action: info
    target: false
    title: CPU Speed
    title_position: left
    title_style: false
    type: 'custom:bar-card'
    unit_of_measurement: false
    value_style: false
    visibility: false
    width: 70%
  - entities:
      - entity: input_boolean.restart_hass
        name: Restart HA
      - sensor.wan_ip
      - sensor.last_boot
      - sensor.uptime
      - entity: sensor.cert_expiry_bertrum_duckdns_org
        name: Certificate Expiry
      - entity: sensor.mariadb_pi4_size
        icon: 'mdi:database'
        name: MariaDB Pi4
      - entity: sensor.ha_current_version
        name: HA Current Version
      - entity: sensor.hassio_current_version
        name: Hassio Current Version
      - entity: sensor.hacs
        name: Hacs Updates
      - entity: sensor.potential_breaking_changes
      - entity: sensor.rpi_power_status
        name: Pi PSU Status
    type: entities
title: Raspberry Pi4
type: 'custom:vertical-stack-in-card'

2 Likes

Please have a look at this solution:

Soooo it looks like USB boot isn’t far off. Currently in beta testing if anyone is feeling brave. Would love to see this come to hassOS soon

1 Like

Sorry this methode does not work, getting mesaages that this is not supported anymore, also i tried to get into home assisten via ip:8123 and nothing happend seems it is not working at all

on. my old raspberry pi3 i had it in venv but i wanted to make it easier and the installation of this should be easy but for somereason… it is or slow on sd card or not easy backup etc.
I would lik e to make easy snapshots because it is a hell to get the files good from my old pi3…
first i want to run this from a ssd and that seems to be impossible…

Minus a couple changes in the install process, this worked perfectly for me to run my rpi 4b off a 500gb USB 3.0 SSD. No SATA adapters, no boot from SD first, just USB 3.0 > USB-C on a Samsung T7 external SSD drive.

As for power, I did toss a 3A power supply on it and also plan to move the USB SSD to a powered USB Hub (just to keep things happy, cool, and powered), also probably toss an ice tower cooler on at some point to; but as of now, it runs 100x better and faster then my SD did — benchmarked at almost 8100. But… as noted, I did have to re-sync all my zigbee devices back into HA after the snapshot restore — Zwave devices weren’t effected though.

Steps:

Basically follow Skeynet01’s guide.

  1. First create a full Snapshot of your HA (minus DuckDNS & LetsEncrypt)

I personally went with buying another $15 64GB SD Card off amazon to attempt this with, so i had a fullproof backup SD if this all went to hell.

  1. I then Flashed my new 64GB SD (using Apple Pie Baker on OSX) with “Raspberry Pi OS (32-bit) Lite“. It’s on the same link as within the guide (if you dont want to scroll up… its Here also, ENABLE SSH!

  2. The next part of the guide takes you to Toms Hardware Tutorial which has been updated recently to reflect the new USB Boot on RPi4. You wont have to keep an SD in to boot anymore. Ill type out the steps here, since TomsHardware page is one of the most AD-riddled pages I’ve ever seen. Typically I’d support sites like this helping people, but there’s a limit. When the site is so ad-flooded it makes reading the content extremely difficult, i draw the line there… 50+ ads is too much, Tom.

3a) So at this point i had a fresh 32bit RaspberryOS Lite installed on my SD, and a blank MacOS Extended (Journaled) (also known as HFS+) formatted 500GB USB 3.0 SSD.

3b) Before i started doing the updates and such on the SD, i plugged the SSD in.

  1. If you followed Skynet01’s steps you should have enabled SSH to your SD. So now connect to it. “ssh [email protected]”. The default password is “raspberry” (you’ll want to change that later at some point with “passwd”, but not yet)

Run

sudo apt update
sudo apt full-upgrade
  1. Next, Edit the /etc/default/rpi-eeprom-update file and change the FIRMWARE_RELEASE_STATUS value from “critical” to “stable.” You can edit the file by typing:
sudo nano /etc/default/rpi-eeprom-update

Then hit CTL+X and then “Y” to save the edit and exit.

  1. now install the new bootloader by typing:
sudo rpi-eeprom-update -d -a

Now, Reboot

sudo reboot
  1. let the RPi 4 boot up again, then SSH over to it the same way as before.

  2. now check the firmware version to make sure you have the latest one. At the time of writing this, it should say “June 15”, which allows the RPi4 boot from USB

vcgencmd bootloader_version
  1. Now Heres where i had to add a step. I had to run:
sudo rpi-update

You’ll get some warnings etc, just click through them and agree. For some reason i kept getting boot errors regarding start.elf and recovery.elf not being compatible — This fixed that.
No Longer needed after latest update

Now reboot again.

  1. at this point you have a few options; i decided to go with a fresh 32-bit RaspberryOS Lite install on the SSD. I plugged it into my Mac and used “Raspberry Pi Imager” to download and install the OS on the SSD.

  2. Now pop your SD into a computer and copy all the .DAT & .ELF files from the boot folder (on SD remember). I copied these to a folder on my desktop.

  3. Now plug in your SSD and overwrite all the .DAT & .ELF files you took from the SD card. Also, copy over a blank ssh file as well so you can ssh over to the SSD.

  4. Now, plug you SSD into one of the [blue] USB 3.0 slots (leave SD out) and boot up.
    This can either be really quick, or take a really long time depending on how big your SSD drive is. For my 500GB drive, it took about 45min to boot up the first time.

  5. once its booted up, SSH over to it again, and continue to follow Skynet01’s guide above. Skipping over points 3 & 4. No need for the cmdline.txt edit or keeping your SD inserted to boot.
    (If for some reason you cant SSH over to the new SSD, make sure you included that blank ssh file in the main boot dir)

Do those updates on your SSD. Then continue with the Docker install and HA etc as listed.

Once you’re all booted up and accessed your HA instance via IP:8123, you can install the SAMBA ADD-ON and copy your saved snapshot into the BACKUP folder and restore.

Everything restored for me fine, except Zigbee devices. I had to set those up again. I’m using the HUSBZB-1 USB for zwave & Zigbee.

This method worked perfectly for me, and I’m running so much faster then i was before on my SD.

3 Likes

Thank you for this update, worked perfectly for me with a samsung T5 portable drive!

1 Like

PSA: I recently had an issue where the zwave stick (and a spare stick) would start but I couldn’t add any nodes on an Rpi4 using an SSD. After days of diagnosis it turns out that the USB3 ports on the pi seems to put out some interference. It didn’t matter if the stick was in the USB3 or USB2 ports. Using a hub or even a very short USB extension wire solved all of my problems. It only took 2-3" of distance from the port to work.

1 Like

This is a very valid PSA. I also experienced this issue myself; and it took forever to figure out what the problem was. My problem was with ZHA not Zwave networks dropping devices or going offline constantly on my HUSBZB-1 Stick. A simple USB extension (i moved mine 6ft) fixed the issue.

1 Like

Here steps how I did it. Debian 64Bit + SSD + RPI4

Finally got the Debian 10 64Bit image running on SSD on a RPi4
https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2020-05-28/2020-05-27-raspios-buster-arm64.zip

Flash image on a SDCard. Add SDcard and your SSD to your RPi4
You can also add already ssh option and you wifi settings on the /boot/ partition of SDcard

Remove the old dphys version

sudo /etc/init.d/dphys-swapfile stop
sudo apt-get remove --purge dphys-swapfile

Refresh your OS

sudo apt-get update
sudo apt-get full-upgrade

Prepare RPi4 for USB Boot

Refresh your OS with the latest firmware

sudo nano /etc/default/rpi-eeprom-update
sudo rpi-eeprom-update -d -a
reboot

Install RPICLONE (For cloning from SDCard to my SSD, my SSD is /dev/sda, yours can be different)

git clone https://github.com/billw2/rpi-clone.git 
cd rpi-clone
sudo cp rpi-clone rpi-clone-setup /usr/local/sbin
sudo rpi-clone sda

After RPICLONE is done open a new terminal window

nano /mnt/clone/boot/cmdconfig.txt

Add rootdelay=5 cgroup_memory=1 cgroup_enable=memory to the line and save the file.
Exit the terminal

shutdown now

Remove the SDCard and boot from SSD now.
Correct location and timezone

raspi-config

Install Docker

sudo -i
apt-get install software-properties-common -y
apt-get update
apt-get install modemmanager
reboot now

Reason I install modem manager first and reboot, because when do with network-manager my RPi freeze

apt-get install network-manager
apt-get install apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq socat bash curl 
curl -fsSL get.docker.com | sh

Install Hass.io

systemctl stop ModemManager
systemctl disable ModemManager
curl -sL https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh | bash -s -- -m raspberrypi4

DONE

1 Like

Thanks for this, used it on raspbian, worked fine.

Hi

I’m trying to install Hassio with docker on a Rpi4 8GB

I’ve been running an external USB3.0 SSD for a while now and also a number of containers but unable to get Hassio working

I’ve followed the instructions on here even installed a fresh OS and still no luck

I’m running Raspberry Pi OS (64 bit)

I’ve installed docker and all the apt-get updates and software

apt-get install network-manager
apt-get install apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq socat bash curl 
curl -fsSL get.docker.com | sh

Then run the following command

systemctl stop ModemManager
systemctl disable ModemManager

The error I get is below when running the following script

curl -sL https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh | bash -s -- -m raspberrypi4-64

[warn]
[warn] If you want more control over your own system, run
[warn] Home Assistant as a VM or run Home Assistant Core
[warn] via a Docker container.
[warn]
[warn] If you want to abort, hit ctrl+c within 10 seconds…
[warn]
[info] Creating NetworkManager configuration
[info] Restarting NetworkManager
[info] Install supervisor Docker container
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.0.1:53: dial udp 192.168.0.1:53: connect: network is unreachable

The NetworkManager is odd, as sometimes accessing the Rpi4 via remote SSH it drops out when running script and must take over the TCP/IP stack

The WLAN0 interface then has no IP address and unable to access

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether ca:28:44:e9:0f:5e txqueuelen 1000 (Ethernet)
RX packets 406 bytes 95365 (93.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 181 bytes 23460 (22.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

So if I run the script from the Rpi4 console/terminal its running local but still fails

The error 192.168.0.1:53 is my gateway and also DNS server. I’ve overwritten this with 8.8.8.8 and still doesn’t work.

I can pull down other docker containers and the Rpi4 has been working fine for months

Its just running this script

Any ideas please

@miniwilliams did a couple rpi’s last few weeks for myself and others.
Didnt saw these issues.

Maybe its something with the hw network layer of your rpi wrong?
can you test if it stable?

Hello, is anybody using Rpi4 1 Gb with Docker and HA?
Mine worked ok for 4 months until yesterday, now it is not responding anymore, CPU is all the time 100%.
Is the Rpi4 1Gb too weak for HA or what could be the problem?
How I am thinking to save the backups from the SSD and redo the whole installation from scratch but this will take a while.

I just updated RaspiOs (I am updating regulary since I have RPI4) and the HA did not started. I am using instalation mensioned in this thread - Home assistant on Docker on Raspbian. Any clue?

1 Like

Can confirm this. I am using Raspbian Buster, RPI 4 8GB.

Performed sudo apt update and then sudo apt upgrade and then rebooted. Now, I can’t reach my Homeassistant anymore.

image

If I loock at running containers, there are just one???

[email protected]:~ $ sudo docker ps
CONTAINER ID   IMAGE                                           COMMAND   CREATED       STATUS          PORTS                  NAMES
103256927bdd   homeassistant/armv7-hassio-observer:2020.10.1   "/init"   8 weeks ago   Up 46 minutes   0.0.0.0:4357->80/tcp   hassio_observer

I could bet that there should have been more?

Another output (docker cointainer ls):

[email protected]:~ $ sudo docker container ls
CONTAINER ID   IMAGE                                           COMMAND   CREATED       STATUS          PORTS                  NAMES
103256927bdd   homeassistant/armv7-hassio-observer:2020.10.1   "/init"   8 weeks ago   Up 59 minutes   0.0.0.0:4357->80/tcp   hassio_observer

Do I need to start from scratch again? Format SSD/reinstall OS/reinstall Hassio? Can I use my full backup?

Something really fishy is going here?

1 Like

There is an alert about the latest docker. See here https://alerts.home-assistant.io/#docker_2010.markdown

2 Likes

This might also be a good opportunity to look at changing to a supported installation, using the official HA OS image available here, HA Container available here, HA Core available here or using Debian 10 for HA Supervised.

Continued changes are being made to the HA Supervisor and your installation may break at any time due to this. It’s worth at least looking into and planning a new install now to prevent future issues with your installation.

1 Like