Closed twobraids closed 6 years ago
@twobraids We intentionally didn't support adding servers with multiple things manually, as the UI would get pretty goofy.
Is it possible your LAN isn't behaving well with mDNS? I've never personally seen this issue, so debugging will be... difficult.
That said, you can add the things from the multiple-things example by addressing them individually, i.e. http://
I can understand that debugging will be difficult for mDNS. I've got no other problems on my network with mDNS services - the Apple devices find and communicate with the Linux machines and vice versa without any appreciable trouble.
As for the multi-device server problem, we need to make the error message more useful and then document how to add the devices piecemeal.
@twobraids Can you post a log somewhere that has a failed mDNS discovery? I'd like to see if there are any relevant errors.
after about a billion reboots, I've narrowed down the behavior to this:
If the Python-Thing (single-thing.py) software is started (on Linux workstation) when the Things Gateway (on RPi) is already running, then the mDNS based discovery will fail 90% of the time. See the annotated log attached below for a connection refused error. To test if this is a timing issue, in some runs, I waited up to 30 minutes after starting the Python-Thing, before attempting to add it to the Gateway. In all cases, the program avahi-browse (run anywhere on my network) was able to see the Python-Thing immediately.
If the Python-Thing (single-thing.py) is already running when the Things Gateway is started OR if the Things Gateway is rebooted after the Python-Thing is started, then the mDNS discovery will succeed 90% of the time.
Annotated Failure run-app.log: annotated-failed-run-app.log
Successful run-app.log: success-run-app.log
I see the same thing on my Mac, but I know mine is because OS X is waiting for me to approve of Python listening on a port before it will actually start listening. We need to do one (or both) of the following:
thing-url-adapter
and retry the connection a couple of times.
I'm finding that mDNS is very unreliable, now fewer than 1 out of 10 times will the Things Gateway find my things via mDNS. I usually have to resort to typing in the URL myself, this usually works. However, if the thing being added via URL has more than one thing in it, the result is always a fail with a "invalid thing description" error. The example in the images below is an attempt to pair the
![mdns-fail3](https://user-images.githubusercontent.com/581227/39400369-c3600140-4ae3-11e8-99a5-36566796bf80.png)
webthing-python/examples/multiple-things.py
example.