N2+ Home Assistant Supervised - OS Agent version

Post Reply
RobRam
Posts: 15
Joined: Wed Oct 20, 2021 8:57 pm
languages_spoken: english
Has thanked: 6 times
Been thanked: 2 times
Contact:

N2+ Home Assistant Supervised - OS Agent version

Post by RobRam »

I'm trying to get Home Assistant installed on N2+ in supervised mode on Debian 11.
- yes it's a pain, and HASS.IO would have been MUCH easier, however I need to integrate an existing CBUS installation which requires python libraries outside of the normal hass.io and it therefore implies I have to get a supervised installation working.

Does anyone have any suggestions on which Home Assistant 'OS Agent' to use for Home Assistant Supervised on N2+ under Debian 11 ?
Here's the list of available options:
https://github.com/home-assistant/os-ag ... /tag/1.2.2
My understanding is that Odroid N2+ needs armv8, which doesn't seem to be available.

Would any of the others work ?

User avatar
mad_ady
Posts: 9979
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 631 times
Been thanked: 780 times
Contact:

Re: N2+ Home Assistant Supervised - OS Agent version

Post by mad_ady »

The aarch64 one! I'm using the docker hassio install in supervised mode (using their docker build for C2, which is also aarch64).
These users thanked the author mad_ady for the post:
RobRam (Sat Nov 27, 2021 8:27 pm)

RobRam
Posts: 15
Joined: Wed Oct 20, 2021 8:57 pm
languages_spoken: english
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: N2+ Home Assistant Supervised - OS Agent version

Post by RobRam »

Rockstar... many thanks !
HA up and running !

RobRam
Posts: 15
Joined: Wed Oct 20, 2021 8:57 pm
languages_spoken: english
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: N2+ Home Assistant Supervised - OS Agent version

Post by RobRam »

So close... but so far...
HA is up and running, but I'm getting the 'You are running an unsupported installation' due to AppArmor not being installed.

I've tried to get it running by following:
https://wiki.debian.org/AppArmor/HowToUse
and specifically:

Code: Select all

$ sudo mkdir -p /etc/default/grub.d
$ echo 'GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT apparmor=1 security=apparmor"' \
  | sudo tee /etc/default/grub.d/apparmor.cfg
$ sudo update-grub
$ sudo reboot
I initially had a 275 error after update-grub, which required I use root to make a grub folder in the boot folder, which sorted that.
...but it still didn't enable after the reboot.

In looking into the grub.cfg file the following 'apparmor=1 security=apparmor' is appended to several lines (although after a double space, unlike the rest which had single spaces).
I'm a little weary of messy with the grub,cfg file.

Any suggestions ?

User avatar
mad_ady
Posts: 9979
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 631 times
Been thanked: 780 times
Contact:

Re: N2+ Home Assistant Supervised - OS Agent version

Post by mad_ady »

Which grub package have you installed? Do you see the kernel listed in petitboot?

User avatar
tobetter
Posts: 8676
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 504 times
Been thanked: 1384 times
Contact:

Re: N2+ Home Assistant Supervised - OS Agent version

Post by tobetter »

mad_ady wrote:
Sat Nov 27, 2021 10:52 pm
Which grub package have you installed? Do you see the kernel listed in petitboot?
Curious if Grub is required to start HA?

RobRam
Posts: 15
Joined: Wed Oct 20, 2021 8:57 pm
languages_spoken: english
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: N2+ Home Assistant Supervised - OS Agent version

Post by RobRam »

mad_ady wrote:
Sat Nov 27, 2021 10:52 pm
Which grub package have you installed? Do you see the kernel listed in petitboot?
The only grub package that I've attempted to install was AppArmor (although I think it was already installed, just not enabled).
It's the enabling that seems to be the problem.

Code: Select all

cat /sys/module/apparmor/parameters/enabled
returns 'N'
I'm wondering why I can't enable it.

HA starts no problem, I'm merely getting "You are running an unsupported installation" on the Supervisor:System screen and the only detail is: 'AppArmor is not enabled on the host'.

RobRam
Posts: 15
Joined: Wed Oct 20, 2021 8:57 pm
languages_spoken: english
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: N2+ Home Assistant Supervised - OS Agent version

Post by RobRam »

tobetter wrote:
Sat Nov 27, 2021 10:55 pm
Curious if Grub is required to start HA?
I'm very new to linux and merely following the instructions to enable AppArmor in the kernel:
https://wiki.debian.org/AppArmor/HowToUse
...which required it to be enabled using grub.

This made me a little weary and hence the request for a bit of help from the experts.

User avatar
tobetter
Posts: 8676
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 504 times
Been thanked: 1384 times
Contact:

Re: N2+ Home Assistant Supervised - OS Agent version

Post by tobetter »

RobRam wrote:
Sat Nov 27, 2021 11:18 pm
tobetter wrote:
Sat Nov 27, 2021 10:55 pm
Curious if Grub is required to start HA?
I'm very new to linux and merely following the instructions to enable AppArmor in the kernel:
https://wiki.debian.org/AppArmor/HowToUse
...which required it to be enabled using grub.

This made me a little weary and hence the request for a bit of help from the experts.
Ah, OK....so I am not expert as @mad_ady, but let's see if I can help.
What's the output of uname -a and how did you install Debian 11?

RobRam
Posts: 15
Joined: Wed Oct 20, 2021 8:57 pm
languages_spoken: english
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: N2+ Home Assistant Supervised - OS Agent version

Post by RobRam »

tobetter wrote:
Sat Nov 27, 2021 11:42 pm
Ah, OK....so I am not expert as @mad_ady, but let's see if I can help.
What's the output of uname -a and how did you install Debian 11?
Output:
Linux cottage 5.15.0-odroid-arm64 #1 SMP PREEMPT Debian 5.15.2-202111170335~bullseye (2021-11-16) aarch64 GNU/Linux

Installed via your excellent netboot installer.

User avatar
tobetter
Posts: 8676
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 504 times
Been thanked: 1384 times
Contact:

Re: N2+ Home Assistant Supervised - OS Agent version

Post by tobetter »

RobRam wrote:
Sat Nov 27, 2021 11:58 pm
tobetter wrote:
Sat Nov 27, 2021 11:42 pm
Ah, OK....so I am not expert as @mad_ady, but let's see if I can help.
What's the output of uname -a and how did you install Debian 11?
Output:
Linux cottage 5.15.0-odroid-arm64 #1 SMP PREEMPT Debian 5.15.2-202111170335~bullseye (2021-11-16) aarch64 GNU/Linux

Installed via your excellent netboot installer.
Thanks. If your problem is only to AppArmor and need to add apparmor=1 security=apparmor, please refer to the link.
viewtopic.php?p=336306#p336306

If you like to try Grub like Debian official guide, you need to install odroid-grub2 package and must select the boot entry with kernel version in the Petitboot.

Code: Select all

sudo apt update
sudo apt install odroid-grub2
sudo mkdir -p /boot/grub
sudo update-grub2
These users thanked the author tobetter for the post:
RobRam (Sun Nov 28, 2021 12:13 am)

RobRam
Posts: 15
Joined: Wed Oct 20, 2021 8:57 pm
languages_spoken: english
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: N2+ Home Assistant Supervised - OS Agent version

Post by RobRam »

tobetter wrote:
Sun Nov 28, 2021 12:05 am
If you like to try Grub like Debian official guide, you need to install odroid-grub2 package and must select the boot entry with kernel version in the Petitboot.
Tried that with little success, but I was unsure what 'must select the boot entry with kernel version in the Petitboot' meant.

I then ran through your suggestions on: viewtopic.php?p=336306#p336306
Which worked perfectly... Many thanks !

HA now shows no problems in Supervised Mode... Nice !

Apologies for not finding the above thread earlier before posting here.

User avatar
tobetter
Posts: 8676
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 504 times
Been thanked: 1384 times
Contact:

Re: N2+ Home Assistant Supervised - OS Agent version

Post by tobetter »

RobRam wrote:
Sun Nov 28, 2021 12:26 am
tobetter wrote:
Sun Nov 28, 2021 12:05 am
If you like to try Grub like Debian official guide, you need to install odroid-grub2 package and must select the boot entry with kernel version in the Petitboot.
Tried that with little success, but I was unsure what 'must select the boot entry with kernel version in the Petitboot' meant.
This is valid when you install and use GRUB2 and the Petitboot will show you the boot entry like the link.
download/file.php?id=13135
I then ran through your suggestions on: viewtopic.php?p=336306#p336306
Which worked perfectly... Many thanks !

HA now shows no problems in Supervised Mode... Nice !
Glad to know it works...also myself is also appreciate to @mad_ady as well. First time to acknowledge that HA can be installed on top of Debian 11 which is nice. :)
Apologies for not finding the above thread earlier before posting here.
No worries, nothing wrong...but a documentaion is very weak. :(
These users thanked the author tobetter for the post:
RobRam (Sun Nov 28, 2021 1:03 am)

User avatar
mad_ady
Posts: 9979
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 631 times
Been thanked: 780 times
Contact:

Re: N2+ Home Assistant Supervised - OS Agent version

Post by mad_ady »

You fell into the single-board-computer trap :). The debian you're running differs slightly from Debian for PC. It has a different bootloader than grub, called uboot. The kernel parameters, in your case, are appended to boot.scr. But don't edit it directly, since it's a binary file. Edit /etc/default/flash-kernel instead and run sudo update-bootscript and reboot. Check kernel parameters with cat /proc/cmdline


@tobetter note that he's not running HASS.IO OS, but regular Debian.

These users thanked the author mad_ady for the post (total 2):
tobetter (Sun Nov 28, 2021 12:55 am) • RobRam (Sun Nov 28, 2021 1:03 am)

RobRam
Posts: 15
Joined: Wed Oct 20, 2021 8:57 pm
languages_spoken: english
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: N2+ Home Assistant Supervised - OS Agent version

Post by RobRam »

Thanks guys, I appreciate the help.

Next step is trying to get Clipsal CBUS to connect so that I can control my home lighting.
https://cbus.readthedocs.io/en/latest/introduction.html
https://github.com/micolous/cbus

Hence the effort in going the Debian 11 route rather than the more standard HASS.IO route.

...although I'm fast getting to the point of turfing CBUS in favour of KNX or something. Clipsal clearly missed the boat on opening up their communication architecture and are getting left behind with sub-par interface software, proprietary hardware and custom coms systems. Pity as it's a good system underneath.

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 2 guests