I have installed HA on my Raspberry Pi 3 running Debian Jessie (OSMC install) and all appears to work fine - it starts and runs fine with no errors in the log file. However, when adding RPi GPIO into “configuration.yaml” (as per https://home-assistant.io/components/switch.rpi_gpio/), they do not appear on the front end web page (after restarting). Adding the “kodi” component appears as expected.
How can I check if the rpi_gpio component is actually installed or loaded?
I came across something about rpi_gpio only being accessable by root. I have a startup script (/etc/init.d/hass-deamon) with RUN_AS=“root”. Is there some other setting that needs to be changed?
I also tried to add the HA user to the group “gpio”, but the group does not exist.
Searching the net did not really find others with this problem, so any pointers would be appreciated.
Upon further investigation, I do find errors in the log:
“Attempting install of netdisco==0.7.1”
“Attempting install of RPi.GPIO==0.6.1”
“Attempting install of pychromecast==0.7.2”
Attempting to manually install these modules with “sudo pip3 install netdisco”, appears to download and install with “setup.py”, but eventually fails with:
netifaces.c:1:20: fatal error: Python.h: No such file or directory #include <Python.h>
compilation terminated.
error: command ‘arm-linux-gnueabihf-gcc’ failed with exit status 1
and a bunch of red text:
“Command “/usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-1cqtf0in/netifaces/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-ba3llj8a-record/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-build-1cqtf0in/netifaces/”
Please help - what do I need to do to get this to work?
Okay, with some more playing around I got it all working.
The libpython3.4-dev package was missing and I installed it with “sudo apt-get install python-dev”, after which the manual installation and compilation of netdisco, RPi.GPIO and pychromecast was successful.
I found it somewhat frustrating that no documentation exists describing how all this is meant to work, particularly what modules (python or otherwise) are required, especially when things are quoted as “There is no setup needed for the component itself…” (https://home-assistant.io/components/rpi_gpio/). Why did it need to be installed manually then?