OpenHab in Docker on Raspberry Pi 3 can't find Things

Dear Community!

So I’m building my “smarthome” and I find the OpenHab the best solution for me. However now I got stucked, and I can’t even find someone with an issue like that. So here is what happened:
I have installed OpenHab just for testing purposes on my Windows machine. The whole setup prodecure was so easy… Now as I wanted to extend this and make it stable, I have installed OpenHab 2.2 on my Raspberry Pi 3 in a Docker container. Everything seems working right, except one thing: I can’t add my Sonoff (Wemo binding) switch to OpenHab. In Windows even without searching found (and still finds!) the switch, but this is not the case in Pi 3. When I try to add manually, it doesn’t help… seems like it can’t connect to this device, however pinging inside the Docker and also outside of the Docker container the IP address of the switch, it gets response from the switch… Also, the Yahoo Weather, HomeKit, and OpenHabCloud (Google Assistant) works fine…

Anyone can suggest some info, who could I solve this?


Are you running with the --net=host parameter?

How did you ping from inside the container? Unless this had changed recently, ping of not installed in the image.

Yes, I’m running with that parameter.
I just copied a ping command because as you said, no ping command was available in the container

Even with --net=host I do think that the container gets its own IP in the docker subnet.

I don’t use this binding but it is possible that it can’t autodiscover anything not on the same subnet.

But it should work if I add it manually, am I right? I have also tried this, but didn’t help…
Ps.: Interesting, because it seems that it works with everything else besides this switch. I could pair my Harmony Hub, Google things (chromecast, google home), but not this Sonoff switch

I know nothing of this binding so couldn’t begin to say one way or another.

I was able to add it just now! It has two modes, working as WeMo switch and a Philips Hue (simulating…) I have changed to Hue and I was able to add it… it seems that it uses UPnP for discovery and connection(?) and somehow it fails to work on my Raspberry…