WebThingsIO / thing-url-adapter

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

Adapter caches found devices (until restart?) #8

Closed Timmeey closed 6 years ago

Timmeey commented 6 years ago

The Setting: I have a remote WebThing announcing itself The Gateway has the thing-url-adapter enabled

I want to add remote web things

Expected:

  1. Turn on the remote webthing server (make it announce itself)
  2. on the Gateway UI search for new devices
  3. wait until the webthing shows up
  4. click done (do not add the device)
  5. Shutdown the remote webthing server
  6. Wait a bit until the announcement is not there anymore (check via avahi-browse)
  7. on the Gateway UI search for new devices
  8. NO device should be found, since no webthings are available

Actual:

  1. Step 1-7 are the same
  2. The previously found device still shows up in the "Add device" UI, eventhough it is not announcing itself anymore
  3. Restart the gateway software
  4. on the Gateway UI search for new devices
  5. The device doesn't show up anymore

Since a restart fixes the issue, i assume that the once found webthings are cached until restart, which makes developing and testing very hard (when you change something on the remote-webthing and restart the server, i need the thing-url-adapter to find/show the updated webthing, but it still shows the "cached" value.)