Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable I2C on the Home Assistant Operating System via import from usb does not work #825

Closed
ArdescoConsulting opened this issue Aug 19, 2020 · 4 comments

Comments

@ArdescoConsulting
Copy link

Home Assistant release with the issue:
Home Assistant 0.114.2
HassOS 4.12

Operating environment (HassOS):
arch | armv7l
chassis | embedded
dev | false
docker | true
docker_version | 19.03.11
hassio | true
host_os | HassOS 4.12
installation_type | Home Assistant OS
os_name | Linux
os_version | 4.19.127-v7l
python_version | 3.8.3
supervisor | 234
timezone | Europe/Brussels
version | 0.114.2
virtualenv | false

Raspberry PI 4 B

Supervisor logs:
20-08-19 07:22:58 INFO (SyncWorker_2) [supervisor.docker.interface] Clean hassio_multicast application
20-08-19 07:22:58 INFO (MainThread) [supervisor.plugins.dns] Stop CoreDNS plugin
20-08-19 07:22:58 INFO (SyncWorker_0) [supervisor.docker.interface] Stop hassio_dns application
20-08-19 07:23:03 INFO (SyncWorker_0) [supervisor.docker.interface] Clean hassio_dns application
20-08-19 07:23:03 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.systemd1.Manager.Reboot on /org/freedesktop/systemd1
[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] udev.sh: executing...
[07:23:29] INFO: Update udev information
[cont-init.d] udev.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
20-08-19 07:23:32 INFO (MainThread) [main] Initialize Supervisor setup
20-08-19 07:23:33 INFO (MainThread) [supervisor.bootstrap] Initialize Supervisor Sentry
20-08-19 07:23:33 INFO (MainThread) [supervisor.bootstrap] Setup coresys for machine: raspberrypi4
20-08-19 07:23:33 INFO (SyncWorker_0) [supervisor.docker.supervisor] Attach to Supervisor homeassistant/armv7-hassio-supervisor with version 234
20-08-19 07:23:33 INFO (MainThread) [main] Setup Supervisor
20-08-19 07:23:33 INFO (MainThread) [supervisor.utils.gdbus] Connect to dbus: org.freedesktop.systemd1 - /org/freedesktop/systemd1
20-08-19 07:23:33 INFO (MainThread) [supervisor.utils.gdbus] Connect to dbus: org.freedesktop.hostname1 - /org/freedesktop/hostname1
20-08-19 07:23:33 INFO (MainThread) [supervisor.utils.gdbus] Connect to dbus: de.pengutronix.rauc - /
20-08-19 07:23:33 INFO (MainThread) [supervisor.utils.gdbus] Connect to dbus: org.freedesktop.NetworkManager - /org/freedesktop/NetworkManager/DnsManager
20-08-19 07:23:33 INFO (MainThread) [supervisor.host.info] Update local host information
20-08-19 07:23:33 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/hostname1
20-08-19 07:23:33 INFO (MainThread) [supervisor.host.services] Update service information
20-08-19 07:23:33 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.systemd1.Manager.ListUnits on /org/freedesktop/systemd1
20-08-19 07:23:33 INFO (MainThread) [supervisor.host.network] Update local network DNS information
20-08-19 07:23:33 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/NetworkManager/DnsManager
20-08-19 07:23:33 INFO (MainThread) [supervisor.host.sound] Update PulseAudio information
20-08-19 07:23:33 INFO (MainThread) [supervisor.host.apparmor] Load AppArmor Profiles: {'hassio-supervisor'}
20-08-19 07:23:33 INFO (MainThread) [supervisor.host.services] Reload local service hassos-apparmor.service
20-08-19 07:23:33 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.systemd1.Manager.ReloadOrRestartUnit on /org/freedesktop/systemd1
20-08-19 07:23:33 INFO (SyncWorker_0) [supervisor.docker.interface] Attach to homeassistant/armv7-hassio-dns with version 9
20-08-19 07:23:33 INFO (MainThread) [supervisor.misc.forwarder] Start DNS port forwarding to 172.30.32.3
20-08-19 07:23:33 INFO (MainThread) [supervisor.plugins.dns] Start CoreDNS plugin
20-08-19 07:25:31 INFO (SyncWorker_0) [supervisor.docker.dns] Start DNS homeassistant/armv7-hassio-dns with version 9 - 172.30.32.3
20-08-19 07:25:31 INFO (MainThread) [supervisor.plugins.dns] Updated /etc/resolv.conf
20-08-19 07:25:31 INFO (SyncWorker_0) [supervisor.docker.interface] Attach to homeassistant/armv7-hassio-audio with version 17
20-08-19 07:25:31 INFO (MainThread) [supervisor.plugins.audio] Start Audio plugin
20-08-19 07:25:36 INFO (SyncWorker_0) [supervisor.docker.audio] Start Audio homeassistant/armv7-hassio-audio with version 17 - 172.30.32.4
20-08-19 07:25:36 INFO (SyncWorker_0) [supervisor.docker.interface] Attach to homeassistant/armv7-hassio-cli with version 25
20-08-19 07:25:36 INFO (MainThread) [supervisor.plugins.cli] Start cli plugin
20-08-19 07:25:42 INFO (SyncWorker_0) [supervisor.docker.cli] Start CLI homeassistant/armv7-hassio-cli with version 25 - 172.30.32.5
20-08-19 07:25:42 INFO (SyncWorker_0) [supervisor.docker.interface] Attach to homeassistant/armv7-hassio-multicast with version 2
20-08-19 07:25:42 INFO (MainThread) [supervisor.plugins.multicast] Start Multicast plugin
20-08-19 07:25:47 INFO (SyncWorker_0) [supervisor.docker.multicast] Start Multicast homeassistant/armv7-hassio-multicast with version 2 - Host
20-08-19 07:25:47 INFO (MainThread) [supervisor.updater] Fetch update data from https://version.home-assistant.io/stable.json
20-08-19 07:25:48 INFO (SyncWorker_0) [supervisor.docker.interface] Attach to homeassistant/raspberrypi4-homeassistant with version 0.114.2
20-08-19 07:25:48 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /
20-08-19 07:25:48 INFO (MainThread) [supervisor.hassos] Detect HassOS 4.12 / BootSlot A
20-08-19 07:25:48 INFO (MainThread) [supervisor.store.git] Load add-on /data/addons/git/a0d7b954 repository
20-08-19 07:25:48 INFO (MainThread) [supervisor.store.git] Load add-on /data/addons/core repository
20-08-19 07:25:48 INFO (MainThread) [supervisor.store] Load add-ons from store: 66 all - 66 new - 0 remove
20-08-19 07:25:48 INFO (MainThread) [supervisor.addons] Found 4 installed add-ons
20-08-19 07:25:48 INFO (SyncWorker_0) [supervisor.docker.interface] Attach to homeassistant/armv7-addon-samba with version 9.2.0
20-08-19 07:25:48 INFO (SyncWorker_2) [supervisor.docker.interface] Attach to homeassistant/armv7-addon-configurator with version 5.0.0
20-08-19 07:25:48 INFO (SyncWorker_1) [supervisor.docker.interface] Attach to homeassistant/armv7-addon-ssh with version 8.6.0
20-08-19 07:25:48 INFO (SyncWorker_3) [supervisor.docker.interface] Attach to homeassistant/armv7-addon-check_config with version 3.4.0
20-08-19 07:25:48 INFO (MainThread) [supervisor.snapshots] Found 0 snapshot files
20-08-19 07:25:48 INFO (MainThread) [supervisor.discovery] Load 0 messages
20-08-19 07:25:48 INFO (MainThread) [supervisor.ingress] Load 1 ingress session
20-08-19 07:25:48 INFO (MainThread) [supervisor.misc.secrets] Load Home Assistant secrets: 1
20-08-19 07:25:49 INFO (MainThread) [main] Run Supervisor
20-08-19 07:25:49 INFO (MainThread) [supervisor.api] Start API on 172.30.32.2
20-08-19 07:25:49 INFO (MainThread) [supervisor.utils.gdbus] Call de.pengutronix.rauc.Installer.Mark on /
20-08-19 07:25:49 INFO (MainThread) [supervisor.hassos] Rauc: A - marked slot kernel.0 as good
20-08-19 07:25:49 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.INITIALIZE' start 0 add-ons
20-08-19 07:25:49 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.SYSTEM' start 0 add-ons
20-08-19 07:25:49 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.SERVICES' start 2 add-ons
20-08-19 07:25:52 INFO (SyncWorker_3) [supervisor.docker.addon] Start Docker add-on homeassistant/armv7-addon-samba with version 9.2.0
20-08-19 07:25:56 INFO (SyncWorker_1) [supervisor.docker.addon] Start Docker add-on homeassistant/armv7-addon-ssh with version 8.6.0
20-08-19 07:26:01 INFO (SyncWorker_2) [supervisor.docker.interface] Start homeassistant
20-08-19 07:26:01 INFO (MainThread) [supervisor.homeassistant] Wait until Home Assistant is ready
20-08-19 07:26:32 INFO (MainThread) [supervisor.homeassistant] Updated Home Assistant API token
20-08-19 07:26:38 INFO (MainThread) [supervisor.homeassistant] Detect a running Home Assistant instance
20-08-19 07:26:38 INFO (MainThread) [supervisor.addons] Phase 'AddonStartup.APPLICATION' start 1 add-ons
20-08-19 07:26:44 INFO (SyncWorker_0) [supervisor.docker.addon] Start Docker add-on homeassistant/armv7-addon-configurator with version 5.0.0
20-08-19 07:26:49 INFO (MainThread) [supervisor.misc.tasks] All core tasks are scheduled
20-08-19 07:26:49 INFO (MainThread) [supervisor.misc.hwmon] Started Supervisor hardware monitor
20-08-19 07:26:49 INFO (MainThread) [supervisor.core] Supervisor is up and running
20-08-19 07:26:49 INFO (MainThread) [supervisor.host.info] Update local host information
20-08-19 07:26:49 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/hostname1
20-08-19 07:26:49 INFO (MainThread) [supervisor.updater] Fetch update data from https://version.home-assistant.io/stable.json
20-08-19 07:26:49 INFO (MainThread) [supervisor.host.services] Update service information
20-08-19 07:26:49 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.systemd1.Manager.ListUnits on /org/freedesktop/systemd1
20-08-19 07:26:50 INFO (MainThread) [supervisor.host.network] Update local network DNS information
20-08-19 07:26:50 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/NetworkManager/DnsManager
20-08-19 07:26:50 INFO (MainThread) [supervisor.host.sound] Update PulseAudio information
20-08-19 07:29:03 INFO (MainThread) [supervisor.api.security] /hardware/info access from core_ssh
20-08-19 07:29:37 INFO (MainThread) [supervisor.api.security] /hardware/info access from core_ssh
20-08-19 07:29:58 INFO (MainThread) [supervisor.api.security] /hardware/info access from core_ssh
20-08-19 07:30:15 INFO (MainThread) [supervisor.api.security] /hardware/info access from core_ssh
20-08-19 07:33:14 INFO (MainThread) [supervisor.api.security] /supervisor/logs access from core_ssh
20-08-19 07:33:47 INFO (MainThread) [supervisor.hassos] Syncing configuration from USB with HassOS.
20-08-19 07:33:47 INFO (MainThread) [supervisor.host.services] Restart local service hassos-config.service
20-08-19 07:33:47 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.systemd1.Manager.RestartUnit on /org/freedesktop/systemd1
20-08-19 07:34:01 INFO (MainThread) [supervisor.api.security] /supervisor/logs access from core_ssh

Description of problem:
If followed the instruction https://www.home-assistant.io/hassio/enable_i2c/ to the letter.
Tried with multiple sticks in different usb ports.
Clicking the import from USB button just turns it green for 1 second and nothing else happens.
There is a log entry 20-08-19 07:33:47 INFO (MainThread) [supervisor.hassos] Syncing configuration from USB with HassOS
But I2C not available.
The only way to get I2C to work is by doing the updates to the files on the first partition of the SD card via another linux system.

@pvizeli pvizeli transferred this issue from home-assistant/supervisor Aug 19, 2020
@agners
Copy link
Member

agners commented Aug 31, 2020

From what I can tell the script responsible to copy the config.txt file is actually copying a source file named boot-env.txt:
https://github.com/home-assistant/operating-system/blob/dev/buildroot-external/board/raspberrypi/hassos-hook.sh#L12

@pvizeli I guess this comes from the fact that the file is named boot-env.txt in buildroot source. It feels to me that config.txt would be more user friendly, but not sure if people use boot-env.txt today already...

Sorry, just realized the script above is a script running at build time. From what I can tell we do not handle config.txt currently?

@Misiu
Copy link

Misiu commented Sep 2, 2020

@ArdescoConsulting I have the same problem.
Did you follow the instruction carefully? Did you create a folder named /modules (the name should contain slash at the beginning)?
Info from here: https://community.home-assistant.io/t/mcp23017-i-o-expander/170486/20?u=misiu

Problem is, that on Windows we can't create folders with a slash in name.
Can this be changed, so both names (with and without a slash) will work?

This was asked in WTH: https://community.home-assistant.io/t/wth-why-enabling-i2c-is-so-hard/219771

agners added a commit to agners/home-assistant.io that referenced this issue Sep 2, 2020
There is no support of updating config.txt via CONFIG USB flash drive.
Document how to find the hassos-boot partition to configure config.txt
directly on it and use the `hassos-boot` CONFIG method.

Also, instead of using i2c1 use the preferred (according to RPi
documenation) name `i2c_vc`.

Adresses home-assistant/operating-system#825
agners added a commit to agners/home-assistant.io that referenced this issue Sep 2, 2020
There is no support of updating `config.txt` via `CONFIG` USB flash drive.
Document how to find the `hassos-boot` partition to configure `config.txt`
directly on it and use the `hassos-boot` config method.

Also, instead of using i2c1 use the preferred (according to RPi
documenation) name `i2c_vc`.

Adresses home-assistant/operating-system#825
@agners
Copy link
Member

agners commented Sep 3, 2020

This should be addressed by the updated documentation: home-assistant/home-assistant.io#14381.

@agners agners closed this as completed Sep 3, 2020
@Misiu
Copy link

Misiu commented Sep 3, 2020

@agners I'll check that at home. Thank you for updating the docs!
There is still one wrong link on that page. More details in WTH thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants