OS updating Home Assistant on N2+?

Post Reply
T_i_m
Posts: 7
Joined: Sat Apr 03, 2021 8:06 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 0
Contact:

OS updating Home Assistant on N2+?

Post by T_i_m »

Hi all,

I've been running Home Assistant on a RPi3b and slimline Shuttle PC (dev) for a while and recently bought a 4G Odroid N2+ with 64GB eMMC in the UK that came pre-installed with Linux (?) and Home Assistant that I intend to move my HA system onto.

Everything is working ok so far but I saw somewhere (Youtube I think) a mention of 'making sure you update Linux or it won't see it as an N2+, just an N2?

So, I believe it's running on Hassio (I'm an old electronics / hardware not software guy really) so should / would all the layers (base OS? / Hassio / HA (I know HA is)) be covered automatically by the system (*it* notifying me of updates etc) or are there things I would still need to do manually please?

I have accessed the system via the terminal and had a quick mooch about in zha shell (is it?) but whilst it looks to have the structure of Linux and responds to some of the Linux commands (like lsusb), it doesn't seem to have apt so an 'apt update' (or versions thereof) gives a 'bad command'. I did see mention of Debian10 somewhere but I can't see where now?

core-2021.3.4, supervisor-2021.03.6, Home Assistant OS 5.12.

If the base system is ok, up_to_date and all self maintaining I'm happy, just looking for some guidance if not and before I break it etc please. ;-(

Cheers, Tim

mad_ady
Posts: 9373
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: 599 times
Been thanked: 659 times
Contact:

Re: OS updating Home Assistant on N2+?

Post by mad_ady »

As long as you're running hassio, all the updates are included by the HomeAssistant team. It should be straight from the web ui, same as it was for RPI.
If you want to dual/multiboot you can update the petitboot (spi) firmware (which is independent), otherwise you can skip it entirelly.

T_i_m
Posts: 7
Joined: Sat Apr 03, 2021 8:06 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 0
Contact:

Re: OS updating Home Assistant on N2+?

Post by T_i_m »

Hi mad_ady. Thanks for the prompt reply and reassurance.

No, I'm quite happy to have it as it is, as long as it carries on working. ;-)

So, If I ever needed to re-image the eMMC, would you recommend getting one of the USB readers or is the USB / OTG solution ok would you say?

Oh, and also, is there any way to check that it's actually running it as an N2+, not just an N2 do you know please?

Cheers, Tim

mad_ady
Posts: 9373
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: 599 times
Been thanked: 659 times
Contact:

Re: OS updating Home Assistant on N2+?

Post by mad_ady »

For N2/N2+ you can flash the emmc without removing it, by connecting microusb cable between the PC and the otg port on the odroid, flipping the boot switch to SPI and doing a power cycle. Then, via keyvoard/monitor you can exit petitboot and run ums /dev/mmcblk0 to put it into mass storage mode. Then you can use etcher to flash.
If you don't mind popping the emmc, the usb3-emmc adapter from Hardkernel is the best alternative.

Regarding model - I haven't tried hassio on N2, but via shell you can check cat /proc/device-tree/model. Also you should be able to read max cpu frequency via sysfs.

T_i_m
Posts: 7
Joined: Sat Apr 03, 2021 8:06 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 0
Contact:

Re: OS updating Home Assistant on N2+?

Post by T_i_m »

Hi again mad_ady,

Thanks for the feedback on the PC <> N2+ via USB and the adaptor options. I'll probably get the adaptor *anyway* etc.

I must have missed something because when using the SSH terminal add-on and entering those commands I get:

cat: can't open '/proc/device-tree/model' ?

and sysfs gives:

zsh: command not found: sysfs ?

;-(

Cheers, Tim

mad_ady
Posts: 9373
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: 599 times
Been thanked: 659 times
Contact:

Re: OS updating Home Assistant on N2+?

Post by mad_ady »

I haven't tried it on hassio, but here's how it looks like on an N2 (with android):

Code: Select all

$  cat /sys/bus/cpu/devices/cpu4/cpufreq/scaling_max_freq                                    1800000                                                     
 $  cat /proc/device-tree/model
Hardkernel ODROID-N2
$ cat /proc/cpuinfo | grep Hardware
Hardware        : Hardkernel ODROID-N2

T_i_m
Posts: 7
Joined: Sat Apr 03, 2021 8:06 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 0
Contact:

Re: OS updating Home Assistant on N2+?

Post by T_i_m »

Hi again mad_ady,

I wonder if the issue is that you are running Android and me Linux / (Debian?)

The top command gave me 2208000

The second gives 'no such file or directory (although it looks like device-tree is there (in turquoise, folders are in dark blue?)

'cat /proc/cpuinfo' works and suggests the are 6 CPU's (0-5) but no mention of the hardware.

Does any of that make sense to you?

Cheers, Tim

User avatar
odroid
Site Admin
Posts: 37281
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1747 times
Been thanked: 1127 times
Contact:

Re: OS updating Home Assistant on N2+?

Post by odroid »

The N2 stock clock is 1.8Ghz while the N2+ is 2.2Ghz.

Since the Home Assistant OS is a sort of BuildRoot based embedded Linux which is fully maintained by Home Assistant developers, the system node information might be different from the generic Ubuntu/Debian/Android OS images.
Consider posting questions on the Home Assistant forum to get more accurate answers.
These users thanked the author odroid for the post:
T_i_m (Mon Apr 05, 2021 5:25 pm)

mad_ady
Posts: 9373
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: 599 times
Been thanked: 659 times
Contact:

Re: OS updating Home Assistant on N2+?

Post by mad_ady »

Since the top command returned 2.2GHz, it means the system runs as an N2+, so no need to worry.
Yes, their environment is quite different than ubuntu, but I had expected they had device-tree exposed under /proc. Oh, well...
These users thanked the author mad_ady for the post:
T_i_m (Mon Apr 05, 2021 5:26 pm)

T_i_m
Posts: 7
Joined: Sat Apr 03, 2021 8:06 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 0
Contact:

Re: OS updating Home Assistant on N2+?

Post by T_i_m »

Hi and thanks for the reply and info. I'll ask the HA boys. ;-)

Cheers, Tim

T_i_m
Posts: 7
Joined: Sat Apr 03, 2021 8:06 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 0
Contact:

Re: OS updating Home Assistant on N2+?

Post by T_i_m »

Hi mad_ady, thanks again for the reply and confirmation (that the OS sees it as an N2+).

As mentioned I'm really a hardware / electronics tech (ex datacomms Field Support guy > IT Trainer) and whilst I have dabbled with Linux over many years I'm more interested in what an OS can do, rather than it itself ('a means to an end' etc).

So most of the progress I've made in practical usage of Linux, outside of installing the likes of Ubuntu / Mint on a desktop PC are from plenty of Googling and standing on the shoulders of giants (like you guys). ;-)

What I have learned though is that because there are *so* many variables, kernel, distro, DE etc, in many cases my copy > paste solution fails from even the most thorough walk-through because my setup is *slightly* different from the one I'm using as a guide (and this is me copying a Linux guide for a Linux install, let along Android > Linux etc), causing it to fail. I can *sometimes* get a positive result now by trying alternative combinations or Googling to others seeing the same issue but if I don't document the solution I will have forgotten next time. ;-(

Cheers, Tim

mad_ady
Posts: 9373
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: 599 times
Been thanked: 659 times
Contact:

Re: OS updating Home Assistant on N2+?

Post by mad_ady »

Surely you are familiar with this saying:
Image

chewitt
Posts: 107
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 97 times
Contact:

Re: OS updating Home Assistant on N2+?

Post by chewitt »

The u-boot used in the HomeAssistant image contains code for auto-detecting the N2 model (N2/N2+) and setting the correct device-tree to use. This code is also committed to upstream u-boot so can be used with u-boot 2021.04 onwards. Just use FDTDIR in extlinux.conf not FDT, and have both DTBs in the named directory.

T_i_m
Posts: 7
Joined: Sat Apr 03, 2021 8:06 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 2 times
Been thanked: 0
Contact:

Re: OS updating Home Assistant on N2+?

Post by T_i_m »

Hi chewitt and thanks for the reply.

I understood and enjoyed reading the "contains code for auto-detecting the N2 model (N2/N2+)" bit but the rest whooshed me I'm afraid.

My new CC2652R coordinator should be on the way to replace the 2531 and then I can start migrating everything (35) Zigbee devices off the RPi and onto the N2+. ;-)

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 0 guests