This section lays out the fundamentals of operation of the WebBrick Gateway and how it interacts with other subsystems.
WebBricks use both HTTP and UDP protocols. The WebBrick Gateway mostly uses HTTP to get and set WebBrick information and UDP to acquire WebBrick events. The simple reason for this is that UDP packets will be received by all WebBrick Gateway's on an Intranet and that HTTP is a session based point to point protocol.
The WebBrick Gateway has pages that display automated systems parameters and controls. Once a client browser opens a page it starts running a client-side JavaScript process to keep the page dynamically updated. The Gateway is capable of delivering static pages to devices that do not have the resources for dynamic updates.
The WebBrick Gateway receives requests for updates to displayed pages, validates the request and then collects data from the WebBricks, from local sources (including cached values) or remote resources.
In retrieving this data the WebBrick Gateway and the browser javascript make decisions on the state of the device and therefore how to update the display. The device states may be one of those in the following table of generic states or may be totally unique.
- Device is ON: i.e. the circuit to that object is either ON in the case of Digital, or has some non-zero value in the case of Analogue.
- Device is OFF: i.e. the circuit to that object is either OFF in the case of Digital, or has a zero value in the case of Analogue.
- Pending: The WebBrick Gateway doesn't know the state of the object yet but is waiting to find out. This can occur on first access to a device and immediately after a command has been issue to an object.
- Locked: The device is there, but the device that supports it is in a locked state therefore it cannot be commanded.
- Missing: The device could not be found. The WebBrick Gateway will run through a timeout and then attempt to find the device again.
- Error: There is an error condition at the device, the device can be found but the state is not valid. The WebBrick Gateway will run through a timeout and then attempt to check the device again.
- Unique state: Or Device specific state. An example of this would be a garage door that is currently ajar, neither open or closed.
