Suggestion - Widget if a feed is old

Hi folks,

What I’m looking for is something that can indicate on my dashboard when a feed has got too old.
I have various remote Arduino’s sending data using enc28j60 ethernet adapters and it seems these ethernet adapters stop responding quite frequently and so I have to reset them (Yes, I’m also trying coding around this in the Arduino code!).

But what I’m thinking is a widget similar to the LED that will change colour based on the feed updated time/age by setting a threshold (e.g. 2 hours) on it.

I’m going to have a dig in the code and see if I can come up with something, but curious if there is already a way of doing this, or any suggestions please?

Thanks in advance.
Andy

I’m starting to make a little progress on this, I’ve found I can call

/feed/timevalue.json?id=3

And I get a formatted reply:
{"time":"1464984501","value":"13.4"}

So I could calculate from this, but how to make this request/query inside a widget?

Inside a widget you can use this variable: associd[feedid][“time”]

See New widget added to dashboard - `isactivefeed`