We need a way to track if a screen is offline or online per #122.
Is the last IP information relevant for everyday clients or should we leave that reporting to the hardware plugin? Maybe we just need a heartbeat time here.
We should also be logging an activity and sending an email when the screen state changes - if the owning group members want that.
@bamnet My thought is to have 2 more columns on screens - last_seen_at and is_online - a timestamp and a boolean. last_seen_at would be updated when the screen hit the frontend setup action. We would then update is_online accordingly when a certain amount of time elapsed with the screen either being seen or not.
This would allow the frontend screen numbers to be reasonable and would allow email (only once per outage) and activity triggers to happen.
This depends on two things - screens checking in with some backend code (which they'd need to do to get template updates?) and some means of repeatedly checking the last_seen_at column and judging if an outage has occurred.
For that, we'll need some cron-esque thing. But given that we don't want to use straight cron (not portable) and doing this with delayed_job will be evil. How about Clockwork (https://github.com/tomykaira/clockwork)? It's yet another daemon, but seems more rational than the alternatives.
Hmm-not sure if I see how a scope of method would provide the needed persistency to record screen status. But tracking the scope at the position level as well could provide some value.
Track an updated timestamp for the screen per #157.
Close #157 for now.