Closed richardwillars closed 8 years ago
@@ master #37 diff @@
==========================================
Files 2 2
Lines 267 267
Methods 57 57
Messages 0 0
Branches 40 40
==========================================
Hits 240 240
Misses 27 27
Partials 0 0
Powered by Codecov. Last update b5d15c1...f38a60d
The underlying ssdp client sends out a single M-SEARCH
request when discover
is called. Devices may or may not respond to it. When writing this code (which has been a while ago) I experienced some Wemo devices not responding to the first UPnP request. That is why this example shows how running a continuous discovery could work.
I'll add this to the docs to make it more clear what discover
actually does.
I have two devices and a script that only called discover() once. I only got both devices on the fourth try. This is UDP, so delivery isn't even guaranteed
Exactly. I just keep this open until this is added to the docs.
Added some details on how discover
works with 6be65fd.
Don't think this second call to the discover method is necessary.. as I understand it discover takes a callback as a param and that callback is called whenever a new device is discovered. If that's the case you shouldn't call discover twice - it makes this example look like discover ends and isn't continuous