Adds the ability to define green/orange/red thresholds in the controlpanel. Fixes #158.