Within the WebBrick Gateway it is possible to create context sensitive backgrounds. This would be done for a number of reasons:
- Visual Comfort A user could operate a touch screen display at any time of day or night. The energy saving features in our touch screens mean that for the majority of their operating time the actual viewing screen will be powered down. When awoken the touch screen will typically display the last used page. With eyes accustomed to darkness, starting a bright screen could be unpleasant. Therefore you can configure the WebBrick Gateway to have a different background between sunset and sunrise.
- Alarm Indication It is quite possible to configure different backgrounds for differing conditions around a home. For example the WebBrick Gateway could have a particular background set whilst ground floor doors and windows are open. This would remind the home users of this state, which is not necessarily an alarm condition.
- Decorative It is a fairly simple matter to load images onto the WebBrick Gateway that match the decor or underlying themes of a home.
Background images can be found at the directory specified for /static/images/background in the configuration file.
This is supported by the boilerplate page template as the body type has a widget type (wbType) of Background and a uri that provides the name of the current background image. So periodically the page will request the background uri from the WebBrick Gateway and update the page. It is possible to setup dynamic backgrounds for different page elements other than the body which corresponds to the whole browser display.
Configuration Example
Here's a example configuration that changes the background every 15 minutes.
<eventInterfaces>
<eventInterface module='EventHandlers.EventMapper' name='EventMapper' category='debug'>
<eventtype type="">
<!-- periodically change the background on the user interface. -->
<!-- This could be done on second/minute/hour intervals as well. -->
<eventsource source="time/minute" >
<event>
<params>
<testEq name='minute' value='0' />
</params>
<newEvent type="http://id.webbrick.co.uk/events/state" source="background">
<other_data val='/static/images/backgrounds/WebBrickGatewayBackDrop1.png'/>
</newEvent>
</event>
<event>
<params>
<testEq name='minute' value='15' />
</params>
<newEvent type="http://id.webbrick.co.uk/events/state" source="background">
<other_data val='/static/images/backgrounds/WebBrickGatewayBackDrop2.png'/>
</newEvent>
</event>
<event>
<params>
<testEq name='minute' value='30' />
</params>
<newEvent type="http://id.webbrick.co.uk/events/state" source="background">
<other_data val='/static/images/backgrounds/WebBrickGatewayBackDrop3.png'/>
</newEvent>
</event>
<event>
<params>
<testEq name='minute' value='45' />
</params>
<newEvent type="http://id.webbrick.co.uk/events/state" source="background">
<other_data val='/static/images/backgrounds/WebBrickGatewayBackDrop4.png'/>
</newEvent>
</event>
</eventsource>
</eventtype>
</eventInterface>
</eventInterfaces>
