Currently the WebBrick Gateway is configured by editing text files containing either XML configuration data or xhtml/XML page templates (kid files). There are also some application configuration files that are used to configure the operating environment for the WebBrick Gateway.
The location of these files may move but on the Linux platform the user editable files are typically installed under /opt/webbrick. To support multiple configurations there is normally a site dependant sub directory off of this location.
System configuration
The defaults for system configuration can be overidden by entries in an environment specific configuration file, this will typically be stored as prod.cfg in the site directory. This name and location of this file is passed as a parameter to the startup of the gateway or is expected to be in the current working directory.
Refer to the contents of the default gateway.cfg and in gateway.example.cfg for the entries that may be modified.
The main entries of interest are:
| Entry | Section | Purpose |
|---|---|---|
| configDirectory | [gateway] | |
| despatchConfig | [gateway] | Location of event despatch XML files. |
| mediaAccessConfig | [gateway] | Location of media access control file. |
| heatingConfig | [gateway] | Schedule/heating control file, must be in the Event Despatch directory. |
| templateDir | [gateway] | Alternate location for page templates (KID files) |
| webbrickDirectory | [wbcnf] | Where to store saved webbrick configurations. |
| network | [wbcnf] | Webbrick network address and subnet mask. |
| [redirect] | This section provides URLs for information that is sourced from elsewhere on the network and embedded in user interface pages. These are typically accessed as /redirect/camera1etc. in a web browser IFrame. | |
| static_filter.root | [global] | Chnage to move most of the static files to a new location, copy the existing ones first. |
| static_filter.dir | [/static/css] | Change to relocate just the css files. Note the directory is not absolute then static_filter.root is prepended |
| static_filter.dir | [/static/images] | Change to relocate just the image files. Note the directory is not absolute then static_filter.root is prepended |
| static_filter.dir | [/static/images/background] | Change to relocate the background image files. Note the directory is not absolute then static_filter.root is prepended |
| static_filter.dir | [/static/flash] | Change to relocate just the flash resource files. Note the directory is not absolute then static_filter.root is prepended |
| static_filter.dir | [/static/xhtml] | Change to relocate just the static xhtml files. Note the directory is not absolute then static_filter.root is prepended |
logging
This is not heavily documented here, refer to prod.cfg for possible changes.
Event Despatch (XML configuration)
The XML configuration files are primarily in the despatchConfig directory specified in the gateway section. All files whose names end in .xml are used to configure the despatch processing within the WebBrick Gateway, see section on EventDespatch for further details. Any syntax errors in these files will cause a load error and the WebBrick Gateway will not fully start up. (Note: An easy way to check the syntax is to start Firefox or Internet Explorer and then drag and drop the file you want to test onto the web browser to open it.
The file named against heatingConfig should also exist in this directory as it dynamically updated from the browser, but needs loading as part of the event dispatching.
If media integration is being provided then a mediaAccess.xml file will exist, this is used to configure media server locations and will exist in the location as specified in gateway.cfg file above.
XHTML template configuration, .kid files
This group of files is used to define the user interface pages that the user can access. Location is in templateDir and /static/xhtml
A sample of the files that may exist follows, they can be broken into 3 groups:
-
those that provide generic formatting and display elements, i.e. master.kid
master.kid -
those that provide pages configured to suit the user, i.e. welcome.kid.
garage.kid guide.kid heating.kid lighting.kid mediapanel.kid overview.kid sched_heating.kid security.kid welcome.kid -
those that provide data formatting for dynamic updates, singleValue.kid
singleValue.kid values.kid
Updates to master.kid control the display of standard data on the pages, i.e. the standard header bar and the footer with time and messages in it.
The welcome.kid is the home page that is accessed when pointing a browser just at the WebBrick Gateway, i.e. http://myhome/ .
Some of the other pages depend on the WebBrick Gateway providing data to be filled into the page, i.e. mediapanel.kid and others do not require any data from the WebBrick Gateway.
The WebBrick Gateway is built around the Model View Controller (MVC) paradigm, this means that the display control is separated from the business logic (the action of controlling the system). This makes it easier to change the visual presentation of the system without breaking the control logic.
