Home Assistant release with the issue:
0.106.2
Last working Home Assistant release (if known):
Operating environment (Hass.io/Docker/Windows/etc.):
Homeassistant under raspberry PI with Raspbian 9.4(stretch)
Component/platform:
LIRC:
Description of problem:
I want to use raspberry PI's IR sensor to send and receive commands.
I had all this working in a Raspberry PI and it was working fine.
when I write "Lirc:" in the configration.yaml HA report:
Unable to install package python-lirc==1.2.3: ERROR: Command errored out with exit status 1:
command: /srv/homeassistant/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cjb5i9c5/python-lirc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-cjb5i9c5/python-lirc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-muj5ax_0 --python-tag cp38
cwd: /tmp/pip-install-cjb5i9c5/python-lirc/
Complete output (87 lines):
running bdist_wheel
running build
running build_ext
building 'lirc' extension
creating build
creating build/temp.linux-armv7l-3.8
creating build/temp.linux-armv7l-3.8/lirc
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/lirc/ -I/srv/homeassistant/include -I/usr/local/include/python3.8 -c lirc/lirc.c -o build/temp.linux-armv7l-3.8/lirc/lirc.o
lirc/lirc.c: In function ‘PyInit_lirc’:
lirc/lirc.c:4249:3: warning: ‘tp_print’ is deprecated [-Wdeprecated-declarations]
__pyx_type_4lirc_LircConfig.tp_print = 0;
^~~~~~~~~~~~~~~~~~~~~~~~~~~
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /srv/homeassistant/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cjb5i9c5/python-lirc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-cjb5i9c5/python-lirc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-luytsk84/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.8/python-lirc Check the logs for full command output.
and if I try to install python-lirc==1.2.3 on my linux sys, it can be installed.(python3.5.3)
but I can't install it in my virtualenv where HA installed.(python3.8.2)
and I am trying to change the verson of python.
I have known that it doesn't support 3.7.0.
now I am trying 3.6.0
update:with python 3.6.0,python-lirc can be installed!
but 3.7.0 still not support,I don't know why
and 3.6.9 also ok.
Is there anyone who can help me?
I 'm also using venv to manage the hass, fixed the IR issue with following steps
1. python -m pip install --upgrade cpython
2. git clone https://github.com/tompreston/python-lirc.git
3. cd python-lirc/
4. make py3 && python setup.py install
This issue is even worse for Hassos users, since LIRC does not come preinstalled and there is no way to set it up :(
In fact the official documentation asks to run sudo apt-get install lirc liblircclient-dev which turns out is impossible in Hassos :-/
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.