Skip to content

Instantly share code, notes, and snippets.

@marcelrv
Last active March 31, 2020 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcelrv/fcdebc1d03381ef9dcac081173e60c60 to your computer and use it in GitHub Desktop.
Save marcelrv/fcdebc1d03381ef9dcac081173e60c60 to your computer and use it in GitHub Desktop.
Docker to run python-miio

nano Dockerfile add the following to it:

FROM python:3.8
#FROM python:3.7-alpine
RUN apt-get install  libffi-dev libssl-dev
#RUN apt add --no-cache  libffi-dev libssl-dev
RUN pip3 install python-miio

CMD [ "/usr/local/bin/miiocli", "" ]

build it: docker build -t python-miio .

run it NB... include the host parameter otherwise device is not found!

docker run --network host --rm --name python-miio python-miio miiocli -d airpurifiermiot --ip 192.168.1.149 --token B1111111111111F518839DFE66699E157 status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment