Topic: Expose Modes in Control Panel
Generalize the mode concept (night, snooze, wake, attract) and allow the user to configure and create new modes.
Chumby already has the idea of modes, however they are currently hand coded, and users, at least on these forums, have numerous suggestions on how to tweak them. Usually these requests get implemented as Easter eggs or integrated in somewhere (like the dark button on night mode, thanks!), but over time this is going to make the control panel code more complicated and much harder to change.
The Mode specification:
Chumby can be in one mode at a time.
Users can view the current mode and switch to a new mode with a minimum of presses.
A mode specifies:
- What music source to play and at what volume
- The Brightness of the screen
- The channel to view
- How long to stay in the Mode, and what Mode to transition to next
- What to do when the squeeze bar is pressed (show CP, move to next mode)
An alarm is simply a timed mode change.
Widgets should be able to signal the end of a Mode (An "alarm" widget should be able to "turn off" the alarm. Some thinking is needed here if there is a need to select between two options, for instance, "turn off" vs "snooze")
The user should be able to configure a mode and add a new mode.
An out-of-the-box Chumby should have the following configurable Modes:
- attract, no music, no time out, plays the default channel.
- wake, plays beeping sound, no time out, plays the built-in alarm channel.
- snooze, no music, dim, 5 minute timeout, plays the built-in snooze channel
- night, no music, dim or dark, no time out, plays built-in night channel
Example use cases:
1. User would like to fall asleep to music. User adds a mode that plays music with a timeout that transitions to night mode. User selects the new mode before going to sleep.
2. Chumby is in Snooze Mode, but user is now awake and wants to avoid having the alarm go off. User selects Attract mode from the CP.
3. User would like chumby to be dark at night. User configures night mode to be Dark instead of Dim.
4. User would like to listen to music. User adds several modes that each plays a favorite music source. User selects one of the new modes from the CP.
5. User wants to select and interact with widgets. User squeezes chumby and interacts with the CP. Note that this is the typical use case for chumby but usually occurs only during attract mode. Should the CP be customizable per mode? Or can users create widgets that can perform the selection functions (that is the non-privileged aspects) of the CP?
Implementation thoughts:
Currently, the custom Alarms have much of the configuration needed for a mode, it may be possible to refactor the alarm code to decouple the timing aspect from the what to do when the alarm happens aspect.