WebThingsIO / thing-url-adapter

Proxy adapter for Web Thing API endpoints
Mozilla Public License 2.0
21 stars 18 forks source link

Handle disconnected devices properly #81

Closed PPCM closed 4 years ago

PPCM commented 4 years ago

After the issue #80 I notice an other issue now. The device is registred with its URL and it responds correctly.

When I plug off the device, it is still actice on the gateway. I can change its state, but if I reload the page, the state of the device stay on the state when it was unplugged. Not ideal ...

mrstegeman commented 4 years ago

The problem is that a serviceDown mDNS message is not being sent by the ESP. I believe if you wait a little while (maybe up to a minute), one will occur automatically, and the device should be marked as offline (i.e. dimmed in the UI). Is that true?

PPCM commented 4 years ago

It's true, but I have to wait more than 10mn Thanks for the answer...

mrstegeman commented 4 years ago

90 should reduce the maximum timeout to roughly 30 seconds.

PPCM commented 4 years ago

Thanks