Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Hobson plugins will also sometimes have to use external entities to communicate with devices. For example, Z-Wave controllers typically require the use of a serial port and Philips Hue bulbs require the use of their a bridge device. Hobson considers refers to such entities to be external as device bridges.

In order to make plugin configuration as simple as possible for the user, the Hobson Hub needs to automatically discover and expose external device bridges that could be used for configuration. An ideal user experience would have the user selecting from a list of serial ports that are available when configuring the plugin rather than having to identify valid serial ports through some other means.

A more complex example would be services that are advertised over SSDP. The knowledge of which SSDP services are useful could be distributed across multiple Hub plugins. For example, each plugin may only be able to identify one particular type of advertised SSDP service. However, it would be inefficient for each plugin to send out SSDP discovery packets as the network could become congested. It is better for a single "gatekeeper" to be in charge of sending/receiving SSDP data and passing it along to objects that know how to analyze it.

This is the premise behind the Hobson Device Bridge mechanism.

Gliffy
nameDisco Concepts

An ExternalBridgeScanner searches for unknown entities that might be important. It doesn't need An DeviceBridgeScanner searches for device bridges via some channel (e.g. local hardware, network, etc.). The scanner doesn't try to make sense of what it discovers – it merely captures it in a consistent way the raw data (in the form of DeviceBridgeMetaData objects) for analysis by another party. This is done by creating an ExternalBridgeMeta which captures the raw data of what has been found.A ExternalBridgeMetaAnalyzer is entity.

All DeviceBridgeDetector objects registered with the runtime are given the opportunity to analyze all ExternalBridgeMeta DeviceBridgeMetaData objects created by ExternalBridgeScannerDeviceBridgeScanners. If it a detector is unable to identify it, it does nothing. However, if it does identify it, it creates an ExternalBridge object that contains DeviceBridge object containing structured information about the discovered entity bridge that can be queried for and used by other Hub mechanisms such as web console configuration.