Meadow .NET IoT timer

Channel:
Subscribers:
42
Published on ● Video Link: https://www.youtube.com/watch?v=MKNM8CQRi9w



Duration: 0:38
42 views
1


I made an IoT timer with Wilderness Labs' Meadow. Integrated it with my trusty Runner.

There's a backend the runner invokes to add the countdown, and the Meadow polls upcoming alarms from it via Wi-fi, while also syncing it's time (in a rather simple way). All alarms are tied to the server's time. For this reason the 15 seconds in this example starts at a lesser value, as some of that time has already passed even before the device is aware of the alarm. Multiple alarms are supported.

I'm trying very hard to ship something that ISN'T perfect, so didn't yet add event support in Meadow; it's dumb polling. Was afraid that additional libraries could use too much memory. I but I guess I could add Redis, or replace HTTP with WebSockets. Or just plain long polling. My aim is to support multiple alarming devices at once, so once a device thinks an alarm should be sounded, it communicates that state to the server (hence the delay in the end; aiming to make it async at some point as this is quite dumb). In the future this would allow only a single device to sound the alarm if it is able, with the other devices serving as a fallback.

The network stack is quite unstable at the moment, so I'm leaning heavily on the watchdog to keep things running. Partly the reason why I didn't want to add any more networking than I "had" to. As a bonus, the device protocol itself is able to recover from all situations, even missed alarms, so the instability is mostly a cosmetic issue.

#meadow #meadowiot







Tags:
meadow
iot
http
countdown
wilderneslabs wilderness labs
wildernes labs
meadow iot