WebThingsIO / thing-url-adapter

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

Gateway shows old data via this adapter when WebThing is reconnected #94

Open madb1lly opened 4 years ago

madb1lly commented 4 years ago

Hello there,

I've suspected this for a while but only got confirmation today: The gateway shows old data from a WebThing (Arduino) which is reconnected via this adapter.

What I mean is, the data which is shown in the Gateway dashboard is not the current data shown in the WebThing's JSON when that device is reconnected after being disconnected for a while.

For example, I had a temperature monitoring WebThing which ran out battery. It took me a few hours to change it and when I did the temperature had changed a lot. When I replaced the battery the Gateway dashboard showed 38 degrees and the WebThing's JSON (via it's URL) showed 24.74 degrees. The value on the Gateway dashboard was the value when the battery went flat and when the WebThing reconnected with a new battery the Gateway didn't update the value on the dashboard to match what the WebThing was presenting via its URL.

For info here is the code the WebThing is running: https://github.com/madb1lly/ESP8266-BME280-WebThing.

I had originally suspected that the Gateway was always showing the previous update from the WebThing rather than the current one (that WebThing updates every 10 minutes) but that doesn't seem to be the case, it only seems to be when the WebThing is reconnected.

Please let me know if you need more info.

Cheers :slightly_smiling_face:

mrstegeman commented 4 years ago

I've seen this in the past as well. I'll try to look at it sometime soon.