It has been a while, there were many wasted hours and there is still a way to go - but for everybody who plans to use HA on NanoPi R5S or similar, those are my recommendations.
-
Are you fine with HA Core? Then go with DietPi distro and conveniently select it from the software-dropdown-list. Installs like a charm.
-
Are you fine with the currently not removable (you can ignore them but not solve the underlying issue as of now) cgroup and apparmor warnings? Go DietPi and use Supervised install. Installs like a charm.
-
You want Docker? This is the way I went after going through 1 and 2. Now it gets funny
a) Which OS to use? First I thought “Debian Bullseye is fine” but this turned out to be a nightmare. It may be different for me, for my taste I would never try it again. So I went with “FriendlyWRT with Docker” which is very convenient in some ways but has some things to watch.
b) how to install? Read NanoPi R5S - FriendlyELEC WiKi and go to RK3568-FriendlyElec - Google Drive and then go to “SD-to-eMMC images”. Why? If you use the USB-to-eMMC images you cannot unselect the OverlayFS on the core system which causes trouble later. So I pulled the image “eflasher-friendlywrt-22.02-docker” image, flashed to SD and then started. Important before you install: Connect a mouse to USB and display to DVI before you start. As soon as you start it, hit “Cancel” immediately and select “Disable OverlayFS”, then install.
c) One of the great thing of the R5S is the NVME slot. Use it! Throw in a big SSD and do yourselt a favor and do partitions. This is what I did not do until now and regret it. If I would do it again, I would have p1 approx 100GB for Docker only p2 approx 100GB for potential swap p3 rest for data
d) In some parts, the Wiki file is simply wrong / does not apply to FriendlyWRT. This applies especially to the mounting of the SSD. Forget the part about pulling the device ID and setting it in etc/fstab because FriendlyWRT simply does not use it. The only proper way to set the mountpoints is through the GUI (“System” => “Mount Points”) where it is easy to mount and you can easily select the correct UID. Now you should have something like /mnt/docker in your system that is actually (test it!) on the SSD.
e) now that really (!) the SSD is used, you still have to tell Docker to use it. Again: Don’t do it CLI! Bad idea! Go to “Docker” => “Configuration”, change the root directory, Save&Apply. Do this before you load anything.
d) Generally: If the functionality is available in the GUI, use it there! I did many things in command line / config file… bad idea. FriendlyWRT sometimes is like “we built a nice GUI so we change the underlying system as we like” and then you edit something like the fstab but it has no effect.
e) Now we have a system with Docker and nothing in it. Now we decide how we install it. Until now I do Zigbee2MQTT&MQTT via Docker-Compose, HA via CLI. My next step is to move also HA to the Docker-Compose
f) Networks: One of the reasons I went with R5S and FriendlyWRT is the easy network separation. My next step will be to have strict rules separating between IoT network and general network. This is on my to-do-list, looks quite easy in the GUI.
g) cronjobs and backup: Complete system update, HA config backup and HA update to be done.
All in all I am really happy now, after some frustrating detours finally everything is up&running right now and therefore I wanted to share the points that really made the difference for me.