is there a way to install spidev support for hass.io on raspberry?
I’m traying to install the adafruit python library for MCP3008 (ADC Converter) in a add-on module, I understand that it is not supported by the kernel.
with this Dockerfile I able to build the docker witout problem:
ARG BUILD_FROM
FROM $BUILD_FROM
ENV LANG C.UTF-8
RUN apk add --no-cache \
build-base \
python \
python2-dev \
linux-headers \
py-pip
RUN pip install --upgrade pip
RUN pip install --no-cache-dir adafruit-mcp3008
# Copy data for add-on
COPY run.sh /
COPY MCP3008.py /
RUN chmod a+x /run.sh
CMD [ "/run.sh" ]
but when I run this I have this error:
raceback (most recent call last):
Traceback (most recent call last):
File “MCP3008.py”, line 18, in
mcp = Adafruit_MCP3008.MCP3008(spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE))
File “/usr/lib/python2.7/site-packages/Adafruit_GPIO/SPI.py”, line 42, in init
self._device.open(port, device)
IOError: [Errno 2] No such file or directory