iancmcc/ouimeaux

Running ouimeaux on Docker

bobkars opened this issue · 1 comments

I can't seem to get discoveries to work when running Ouimeaux on Docker. I am not a networking expert so I have may have misconfigured something.

Dockerfile:

Use an official Python runtime as a parent image

FROM python:3

Install any needed packages

RUN pip install Flask
RUN pip install flask-socketio
RUN pip install eventlet
RUN pip install ouimeaux

Create app directory

WORKDIR /usr/src/app

Add the files

ADD *.py /usr/src/app/
ADD templates templates

error in ouimeaux for python 3

COPY subscribe.py /usr/local/lib/python3.7/site-packages/ouimeaux

Run main.py when the container launches

#CMD ["python", "main.py"]
CMD [ "/bin/sh"]

I run docker and in the shell I see:
wemo -t 30 -d list
DEBUG:ouimeaux.discovery:Binding datagram server to 172.17.0.2:54321
INFO:ouimeaux.environment:Discovering devices
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900
DEBUG:ouimeaux.discovery:Broadcasting M-SEARCH to 239.255.255.250:1900

I'm not sure how the broadcast works across networks. My Docker network is on 172.17.0.2 and the devices are on 192.168.9.x. Is there are way to get Wemo to scan the 192.168.9.x network?

gst commented

docker run --network host ... ?