concerto / concerto-hardware

A Rails Engine for managing Bandshell-powered Concerto hardware
Other
7 stars 2 forks source link

explain "force off" usage please #12

Closed mfrederickson closed 10 years ago

mfrederickson commented 10 years ago

Can someone tell me what this is for? When it would be used? And when it is reset?

mikldt commented 10 years ago

Example: a screen in a cafeteria that is being used for a performance. A bright screen could be undesirable in the darkened room, so the screen owner might want to shut it down for the day (often it is undesirable to have the power button readily accessible).

It expires at midnight local time on the day it was set, so at most the override can last for one hour.

A more elegant implementation would be some sort of on/off "remote control" interface ... but I don't think the responsiveness one might expect from that sort of interface is forthcoming in our first pass at the polled player api.

mfrederickson commented 10 years ago

That makes sense. So bandshell will have a background job to check and reset this? Does bandshell poll for its screen on/off functionality or does it read a configuration once when it starts?

augustf commented 10 years ago

The bandshell daemon itself will poll every so often, so the config can change during runtime.

mikldt commented 10 years ago

Bandshell polls concerto-hardware for settings (currently every 5 minutes). Note this is new in the repo, the image doesn't have this function yet. Right now the only player setting is a list of rules governing on/off behavior. Their format is laid out under "Player API" in this repo's wiki.

As a result of these rules, no background work required. The model just records the current date in the database as the condition of a new "force off" rule. So for the rest of the day, bandshell sees the matching date and turns off the screen. After midnight, the date will no longer match, so bandshell ignores that rule.

The expired but harmless rule will fall away next time someone edits the player. On Dec 20, 2013 11:25 PM, "Marvin Frederickson" notifications@github.com wrote:

That makes sense. So bandshell will have a background job to check and reset this? Does bandshell poll for its screen on/off functionality or does it read a configuration once when it starts?

— Reply to this email directly or view it on GitHubhttps://github.com/concerto/concerto-hardware/issues/12#issuecomment-31056523 .