[Howto] Hass.io on Odroid C1

Post Reply
User avatar
mad_ady
Posts: 9469
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: 604 times
Been thanked: 678 times
Contact:

[Howto] Hass.io on Odroid C1

Post by mad_ady »

I have an old C1+ that I want to give away as a gift to a friend and he wants to use it for home automation, so I installed hass.io on it (HomeAssistant with docker support and some extra modules). Here are some steps if you want to do the same:
1. Start with the ubuntu C1 minimal image. Boot it and let it resize
2. Install hass.io (instructions at the bottom: https://www.home-assistant.io/hassio/installation/). Slightly adapted to run on the C1:

Code: Select all

sudo su -
apt-get install software-properties-common
add-apt-repository universe
apt-get update
apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat
curl -fsSL get.docker.com | sh
curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" > hassio_install.sh
sudo apt install zram-config
service zram-config start
bash hassio_install.sh -m raspberrypi3
3. Wait about ~10 minutes and check http://odroid-ip:8123.

In order to make other Hass.io plugins work (as containers) you need to disable apparmor on the C1, since the kernel is too old to support it properly. Edit /media/boot/boot.ini and add apparmor=0 to bootargs and reboot afterwards.


Old content:

Most things are working - except starting Hass.io modules (e.g. appdaemon), because of problems with AppArmor on the C1:

Code: Select all

19-04-15 08:08:06 ERROR (SyncWorker_1) [hassio.docker] Can't start addon_core_configurator: 500 Server Error: Internal Server Error ("Could not check if docker-default AppArmor profile was loaded: open /sys/kernel/security/apparmor/profiles: no such file or directory")
19-04-15 08:08:07 ERROR (SyncWorker_17) [hassio.docker] Can't start addon_a0d7b954_appdaemon3: 500 Server Error: Internal Server Error ("Could not check if docker-default AppArmor profile was loaded: open /sys/kernel/security/apparmor/profiles: no such file or directory")
This issue seems to be because of C1's old 3.10 kernel: viewtopic.php?t=31369, but I haven't tried mainline because of its reboot/emmc issues.
Last edited by mad_ady on Fri Apr 26, 2019 10:19 pm, edited 3 times in total.
These users thanked the author mad_ady for the post:
Meerone (Mon Apr 06, 2020 3:35 pm)

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

Re: [Howto] Hass.io on Odroid C1

Post by tobetter »

@mad_ady, I suspect the kernel is too old or a couple of kernel features are off to run Docker?

User avatar
mad_ady
Posts: 9469
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: 604 times
Been thanked: 678 times
Contact:

Re: [Howto] Hass.io on Odroid C1

Post by mad_ady »

It seems so, yes. The problem is AppArmor support in the kernel. I tried to fake AppArmor support by mounting something fake over the apparmor sysfs (which worked), but the process tries to set something in apparmor and fails later on. I'll try to boot with apparmor=0

User avatar
mad_ady
Posts: 9469
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: 604 times
Been thanked: 678 times
Contact:

Re: [Howto] Hass.io on Odroid C1

Post by mad_ady »

Ok - update. I added apparmor=0 to bootargs in boot.ini and now the extra containers started without issues. It probably reduces the overall security of the system, but at least it works :D
These users thanked the author mad_ady for the post:
tobetter (Mon Apr 15, 2019 11:44 pm)

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

Re: [Howto] Hass.io on Odroid C1

Post by tobetter »

mad_ady wrote:
Mon Apr 15, 2019 8:54 pm
Ok - update. I added apparmor=0 to bootargs in boot.ini and now the extra containers started without issues. It probably reduces the overall security of the system, but at least it works :D
Coor, good to know. I thought C1's kernel might be ok to run Docker since its version is 3.10 which is minimal kernel version for Docker, I think.

User avatar
mad_ady
Posts: 9469
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: 604 times
Been thanked: 678 times
Contact:

Re: [Howto] Hass.io on Odroid C1

Post by mad_ady »

It seems the github URL for the installer has changed a couple of days ago, so I made a change to the first post.

Cleaner
Posts: 10
Joined: Sat Oct 24, 2015 11:59 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: [Howto] Hass.io on Odroid C1

Post by Cleaner »

@mad_ady
I followed your instructions but for some reason after 15 min I still could not access the interface. Is there any way I can check if hassio is even running?

Thanks

User avatar
mad_ady
Posts: 9469
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: 604 times
Been thanked: 678 times
Contact:

Re: [Howto] Hass.io on Odroid C1

Post by mad_ady »

Can you run sudo docker ps -a and see if there is a homeassistant docker container running. If there is you can run sudo docker logs homeassistant to see what's going on.

romx
Posts: 2
Joined: Tue Dec 30, 2014 2:54 am
languages_spoken: english, russian
ODROIDs: ODROID-C1
Has thanked: 0
Been thanked: 0
Contact:

Re: [Howto] Hass.io on Odroid C1

Post by romx »

Just a comment, regarding installing instruction described above:

Code: Select all

curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" > hassio_install.sh
returned Error 404 now.

Is it possible to fix?

romx
Posts: 2
Joined: Tue Dec 30, 2014 2:54 am
languages_spoken: english, russian
ODROIDs: ODROID-C1
Has thanked: 0
Been thanked: 0
Contact:

Re: [Howto] Hass.io on Odroid C1

Post by romx »

I tried today to use an installation steps above and got fail.

Code: Select all

root@odroid:~# sudo docker ps -a
CONTAINER ID        IMAGE                                   COMMAND             CREATED             STATUS              PORTS               NAMES
afadea085a96        homeassistant/armv7-hassio-supervisor   "/init"             11 minutes ago      Up 8 minutes                            hassio_supervisor
root@odroid:~#

Code: Select all

root@odroid:~# sudo docker logs homeassistant
Error: No such container: homeassistant
root@odroid:~#

User avatar
mad_ady
Posts: 9469
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: 604 times
Been thanked: 678 times
Contact:

Re: [Howto] Hass.io on Odroid C1

Post by mad_ady »

Apparently some things got renamed. See the final part of this guide: https://www.home-assistant.io/hassio/installation/

ranseyer
Posts: 3
Joined: Tue Nov 10, 2015 7:08 pm
languages_spoken: english
ODROIDs: none
Has thanked: 0
Been thanked: 0
Contact:

Re: [Howto] Hass.io on Odroid C1

Post by ranseyer »

...for me Armbian an the the C1+ works as the best...

Its new weith Kernel 5.1: https://www.armbian.com/odroid-c1/

Bad News: No hotplugging of USB Devices possible (you have to plug them and reboot)
no HDMI output (serial console only)
no USB hotplugging, power the board with USB device is needed
eMMC not supported
picky on SD card brand

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 0 guests