WLED icon indicating copy to clipboard operation
WLED copied to clipboard

Detect if no changes (JSON interface) received for a period of time?

Open pjapk opened this issue 2 months ago • 3 comments

I have a use case where I'm displaying LED colours/effects based on outside info, sent to WLED via Node-Red approximately every 5 mins. Occasionally, my data source is offline so I have a "data offline indicator" preset that makes it obvious that the data is out of date. However, I've realised that if WLED itself disconnects from WiFi for any reason, then I have no means of sending a preset command to indicate this.

What I think would be useful is a means of WLED detecting when it was last changed/updated, and if the last update was x mins ago, "do something" (such as set another appropriate indicator preset).

For context, I'm basically displaying an approximation (rounded to nearest integer) of blood glucose levels for Type 1 diabetes, with a rising/falling slightly/quickly effect, with 5-LED segments of different colours to make it easy to see from a distance, the difference between, say, 5 & 15 without having to try to squint/count LEDs, but if WIFI goes offline, I currently can't indicate that the numbers presented are stale due to loss of comms to WLED.

Hopefully this is clear - it's only my second ever feature request on Github! :-D

(Also, thanks to everyone involved for an amazing tool!)

pjapk avatar Apr 18 '24 22:04 pjapk