Allow enabling I2C and 1wire via Home Assistant CLI

There are countless posts on the forum about problems with integrations that require I2C or 1wire.
The main reason for the problems is the complicated procedure of enabling I2C and 1Wire.

Take a look at some I2C instructions/problems:


Same with 1wire:

we have HA CLI that has host and hardware parameters.
Ideally, we should be able to enable/disable I2C and 1wire via CLI, similar to raspi-config (https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c)

I propose adding commands:
ha host i2c - should return information about the current status of I2C
ha host i2c --enable - should enable I2C
ha host i2c --disable - should disable I2C
ha host 1wire - should return information about the current status of 1wire
ha host 1wire --enable - should enable 1wire
ha host 1wire --disable - should disable wire

I imagine this would be quite difficult to implement. By design, HA runs in a series of docker containers and is isolated from the underlying hardware or operating system - other than via the volumes and ports exposed during container creation. raspi-config requires root level access because it modifies /boot/config.txt.

I guess an addon could mount /boot/config.txt but I doubt it would have enough privilege to modify it.

Currently we have Homa Assistant CLI that has option to import settings from USB using ha os import

source is available here: https://github.com/home-assistant/cli/blob/0fecb671cfd6b25c5fc1d9ef74b4eeb390f0785c/cmd/os_import.go

You misunderstood my feature request. I don’t want to have raspi-config, I would like to have more commands in HA CLI.
Extra addon isn’t needed :slight_smile:

Aah, quite right. Apologies @Misiu

1 Like