Greeting for all HA community! I’m new to Home Assistant and this is my first post. I just came from openHab after using it for long time and have to say I’m amazed how cool is HA! So much cool stuff work out of the box! And its a complete joy to use it!
However I faced some troubles from the beginning, and thanks the community I could resolve most of them just googling. But for this question I didn’t find anything, and have to create this topic, hope I did it right way.
So I have this cool cooling fan from Yahboom (http://www.yahboom.net/study/RGB_Cooling_HAT) in my Raspberry PI 3B and it was working in my old OH setup, but I cant get it to work in my new Home Assistant. The instructions from website are made for phyton, so I suppose it also should work in HA.
I wen through installation process for phyton as it’s described in manufacturer website, enabled I2C from HA, placed all phyton files in /config/custom_components and when I try to run manually the script, and got next error:
➜ rgb_fan python RGB_Cooling_HAT.py
Traceback (most recent call last):
File "/config/custom_components/rgb_fan/RGB_Cooling_HAT.py", line 1, in <module>
import Adafruit_GPIO.I2C as I2C
ModuleNotFoundError: No module named 'Adafruit_GPIO'
Then I understood that I’m missing that library, (actually that was a first steep from the guide and I missed it) so I started to install rest of things:
➜ rgb_fan sudo python -m pip install --upgrade pip setuptools wheel
Requirement already satisfied: pip in /usr/lib/python3.10/site-packages (22.3.1)
Requirement already satisfied: setuptools in /usr/lib/python3.10/site-packages (65.6.0)
Collecting setuptools
Downloading setuptools-65.6.3-py3-none-any.whl (1.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 2.3 MB/s eta 0:00:00
Collecting wheel
Downloading wheel-0.38.4-py3-none-any.whl (36 kB)
Installing collected packages: wheel, setuptools
Attempting uninstall: setuptools
Found existing installation: setuptools 65.6.0
Uninstalling setuptools-65.6.0:
Successfully uninstalled setuptools-65.6.0
Successfully installed setuptools-65.6.3 wheel-0.38.4
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Then the library itself:
➜ rgb_fan sudo pip install Adafruit-SSD1306:
Collecting Adafruit-SSD1306
Downloading Adafruit_SSD1306-1.6.2.tar.gz (5.2 kB)
Preparing metadata (setup.py) ... done
Collecting Adafruit-GPIO>=0.6.5
Downloading Adafruit_GPIO-1.0.3.tar.gz (24 kB)
Preparing metadata (setup.py) ... done
Collecting adafruit-pureio
Downloading Adafruit_PureIO-1.1.9.tar.gz (26 kB)
Preparing metadata (setup.py) ... done
Collecting spidev
Downloading spidev-3.6.tar.gz (11 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: Adafruit-SSD1306, Adafruit-GPIO, adafruit-pureio, spidev
Building wheel for Adafruit-SSD1306 (setup.py) ... done
Created wheel for Adafruit-SSD1306: filename=Adafruit_SSD1306-1.6.2-py3-none-any.whl size=5848 sha256=d04dd4fc817a2b0732a0c40fa5a056e15a87ba54981a1318e5fdbf46d0902851
Stored in directory: /root/.cache/pip/wheels/64/b9/82/f1a45d07c454665aec1ca200e68d663b76103e10fee03047c0
Building wheel for Adafruit-GPIO (setup.py) ... done
Created wheel for Adafruit-GPIO: filename=Adafruit_GPIO-1.0.3-py3-none-any.whl size=38124 sha256=d4b7a479743cebf3b1af43f76af31470163045c78d01d231ea9d68db63e0fe08
Stored in directory: /root/.cache/pip/wheels/73/78/b5/7f839cd5de456f19542fe9b5cb369e5fcc1d01afde8dfa2a69
Building wheel for adafruit-pureio (setup.py) ... done
Created wheel for adafruit-pureio: filename=Adafruit_PureIO-1.1.9-py3-none-any.whl size=11586 sha256=b4b3ee93c0f09eba101eaaa1a5403810693c321d3cc3d57d75465637ddd3df80
Stored in directory: /root/.cache/pip/wheels/cc/ae/37/1f9b605e179d0b53afb51281083745b8a76927e64beac09202
Building wheel for spidev (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for spidev (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
/tmp/pip-build-env-fnuyihr8/overlay/lib/python3.10/site-packages/setuptools/dist.py:770: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running bdist_wheel
running build
running build_ext
building 'spidev' extension
creating build
creating build/temp.linux-aarch64-cpython-310
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Os -g -O2 -Os -g -O2 -Os -g -O2 -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/python3.10 -c spidev_module.c -o build/temp.linux-aarch64-cpython-310/spidev_module.o
error: command 'gcc' failed: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for spidev
Successfully built Adafruit-SSD1306 Adafruit-GPIO adafruit-pureio
Failed to build spidev
ERROR: Could not build wheels for spidev, which is required to install pyproject.toml-based projects
I see some errors in installation, but decided tu reboot and run it manually again, and got same error as in the beginning.
Now I’m completely lost and don’t know what to do. The last library installation ended up with error, but previous message says that «Adafruit-GPIO» was saccesfully built.
Maybe you can point me in right way, what I can do to make it work?