I think the problem might be in the directory structure of the USB. In the documentation it tells you to put the config.txt edits in the root of the USB but I think I read somewhere else, but can’t find it now, that the config.txt needs to be in a folder such as /boot or similar.
Not sure what might be the problem. For some users this works ok, some have a lot of problems (https://github.com/Misiu/argon40/issues/4)
Maybe the files must be put in the correct folders, maybe the file encoding is the problem.
I just found one very interesting thing.
According to this comment we must create folder called /modules
(with a slash at the beginning).
Problem is that on windows this isn’t possible.
Can this be changed? So both /modules
and modules
would work?
If this is the reason why importing config from USB isn’t working (for Windows users) then this would solve the problem once and for all.
A directory called /modules just means create a directory called modules in the root directory of the drive. The language in the documentation is a bit double defined as it says to create it in the root directory.
In windows terminology assuming your USB drive appears as D: it would be a directory called D:\modules
I’ve tried enabling I2C via Import from USB and I had no success.
Many users of my integration and of this forum have exact same problem.
There is no error message, no success message.
I had this challenge with directory name started with “/”.
Not possible to do with Windows I have tried different names and no success.
Finally I use Mac laptop where such name is possible and it worked from the first try.
Also was readonig that it is possible to make in Linux - no experience…
Thank you for confirming.
This is frustrating that this doesn’t work on windows
The /
in /modules
only stands for the root of the drive. /
is the path separator in Linux and cannot be part of a directory name.
That being said, the description really does not work as is today. I am working on fixing this.
I’m willing to try the changes on fresh systems on Pi3 and Pi4.
Please let me know when you have something ready.
@Misiu the new documentation is now public: https://www.home-assistant.io/hassio/enable_i2c/. I did test it on a RPi 4, more feedback/testing welcome
In the first part there is a ling to enable I2C using USB stick.
Problem is that I get page not found when trying to navigate.
Could you please take a look at this?
I just noticed one thing.
The link in the docs has hassio in it. Shouldn’t that be changed to hassos?
Not sure if this is a bug and where should I report that?
@agners do you think there should be another section about 1-Wire there? Now configuration (description of how to enable it) is part of integration description - https://www.home-assistant.io/integrations/onewire/#raspberry-pi-set-up
Having a page https://www.home-assistant.io/hassio/enable_1wire/ would make things consistent.
Hm, I think we should remove that link, its basically the same information again in a different format.
1-Wire: Yeah would be nice I guess. There is a whole slew of embedded interfaces which could be described I guess…
The docs in the repo (https://github.com/home-assistant/operating-system/blob/a2a4cf8668c3c333b4641da264d5eed18a786179/Documentation/boards/raspberrypi/README.md#i2c) mention usb stick method, which isn’t supported right now, so it should be removed in both places (docs you recently changed and on github).
1-Wire: moving the descriptions on how to enable interfaces into one place would make docs more consistent I guess.
So first step would be to create a new page under https://www.home-assistant.io/hassio/enable_1-wire/ with the content of https://www.home-assistant.io/integrations/onewire/, then replacing the original content with a link to the new page.
The USB stick method does work for just modules, it doesn’t work for config.txt
. In theory, you can edit config.txt
on the SD, and then use a USB stick to create the modules configuration file, but that is a bit silly since you can just create another CONFIG
folder in the boot partition directly today…
But anyway, the documentation on Github really is more development focused. There is not a lot of value with that link. I sent a merge request to remove it.
I’ll check your new instruction on Pi3 and Pi4 today.
I hope this will solve the issue once and for all
@agners one question: Do we need to create files with special encoding or line ending? Like when importing ssh keys (https://developers.home-assistant.io/docs/operating-system/debugging/#home-assistant-operating-system)
If yes, then I think this info should be added to the instruction.
@agners I found another place that is still referring to a USB stick: https://github.com/home-assistant/operating-system/blob/a2a4cf8668c3c333b4641da264d5eed18a786179/Documentation/configuration.md
According to it the “Import from USB” should work fine.
So maybe there is an error in that method after all?
The USB import method works fine for the files listed there. It only fails for the RPi specific config.txt
… That is not handled by the /usr/sbin/hassos-config
script.
There are essentially two cases handled by /usr/sbin/hassos-config
:
- USB flash drive with name
CONFIG
- Directory called
CONFIG
inhassos-boot
partition on the SD card
In both cases the same functionality is provided (importing modules, network config etc…). However, in both cases config.txt
is not handled…
And because config.txt
is not handled, it needs to be manually edited on the hassos-boot
partitions root directory.
I wrote an addon that makes i2c easy!