[add-on] HassOS I2C Configurator

This is only for configuring Home Assistant OS to enable I2C. You’ll need another addon or integration to communicate with specific devices.

new installation HA -32bit can’t recognize devices I tried 2 different I2C but unsuccessfully send log
2x restart hard
https://paste.ubuntu.com/p/6rs6HNNmWt/

Your logs show i2c-1 device is enabled. Getting i2c to become available is the end of this add-on’s responsibility

I changed my Pi installation from an external USB SSD to an internal M.2 SSD inside the Argon One case (only attached the new bottom). I installed a new HassOS 5.10 and restored a snapshot.
Then I installed your Addon, booted two times and everything is working fine!

Great work! Thank you very much!

I added support for Raspian over the weekend. Should be fully supported.

Hi,

I get the following log after each reboot. Is that normal? What is this “Are you root?” thing?

Thanx

....
I don't see I2C.
mount: permission denied (are you root?)
no sda1 config found
no sdb1 available
no mmcblk0p1 available
This Configurator did it's job. Perform a hard-power-off reboot now.
You will need to reboot twice total, once to place the files, and again to activate the I2C.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Looks like it tried to mount and could not. You can remove this add-on. It’s not needed anymore.

Update to 0.11 and disable protection mode. This is what you should see with protection mode disabled


and this is with protection mode enabled.

I decided to let it try anyway instead of just stopping because I find it more useful.

Due to changes in APIs, you must now disable protection mode. We can no longer mount partitions with access to a device. Protection mode must be disabled to mount a partition.

Looks like they wanted to stop the shenanigans of getting 5 points of security on an add-on which performs dangerous tasks… :frowning:

On the plus side, I was able to ditch device, and privileges, netting this add-on a whole 2-extra points of security.

image

1 Like

I get the following error as a popup when I try to start the add-on. Any ideas?

Failed to start addon
500 Server Error for http+docker://localhost/v1.40/containers/cac3191a46205d98405a0e096606b9c6b0766e0b29a00ee6e24537fb1efc1f1b/start: Internal Server Error (“OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:459: container init caused: apply apparmor profile: apparmor failed to apply profile: write /proc/self/attr/exec: no such file or directory: unknown”)

Hi,
thanks for the immediate response and fix! Argonone active cooling works like a charm. You just saved me from going Karen.
BTW, do you know how to activate auto power on argon one after power cut and restore?

1 Like

What platform are you using?

The V1 does not always have the capability.

Relevant email banter between myself and Argon Forty.



https://www.argon40.com/argon-one-v-2-case-for-raspberry-pi-5.html

1 Like

I can easily confuse myself with the different versions, but I believe this is just plain vanilla Home Assistant OS. No docker, no hassbian. just the standard downloaded image flashed onto an nvme m.2 SSD w/ a RPi4 8GB.

Fixed in v.11a

NVMe? Are you sure?

I’m positive. I’m booting using this SSD via USB. No microSD card inserted at all; that slot sits empty and unused.

Your I2C Addon v.11a update fixed the error message I saw previously and according to the logs, all went well this time around when trying to start it.

I then did the following, twice: sent the command “ha host shutdown,” then did a safe physical shutdown of the RPi4 and waited for the lights to go out, then unplugged the Rpi4’s power, replugged power, got back into HA (then did it again).

I then tried starting the ArgonOne Active Cooling addon, but noticed if I refreshed the add-on page it’d say it was stopped. Checking the logs, I see this:

[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Cannot find I2C port. You must enable I2C for this add-on to operate properly
Error: Could not open file /dev/i2c-1' or /dev/i2c/1’: No such file or directory
[cmd] /run.sh exited 1
[cont-finish.d] executing container finish scripts…
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Ah, Ok! I thought you are using the Argon One M.2 case. :slight_smile:
It’s a little bit overkill I think as the Pi will not work with the speed of the SSD.

Just migrated from sdcard to ssd drive with external HassOS boot. I’m also getting this error, the drive is connected to USB3.0, tested on both USB3.0 ports.

Failed to start addon
500 Server Error for http+docker://localhost/v1.40/containers/cac3191a46205d98405a0e096606b9c6b0766e0b29a00ee6e24537fb1efc1f1b/start: Internal Server Error (“OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:459: container init caused: apply apparmor profile: apparmor failed to apply profile: write /proc/self/attr/exec: no such file or directory: unknown”)

Edit: Using the official method works fine with the same SSD drive connected to the same USB3.0 port.

When did you update the addon? That was a problem for a few hours, about 24 hours ago, but should be fixed. I just uninstalled and reinstalled without any problems.