-
Notifications
You must be signed in to change notification settings - Fork 38
BEMOSS OS & Framework Layer
Home | Installation Guide | Get Started | Developer Resources>OS | BEMOSS™ Team | FAQ
In this layer, VOLTTRON™, a distributed agent platform developed by Pacific Northwest National Laboratory (PNNL), is chosen to be an operating system and framework for BEMOSS. If you are new to agent and multi-agent system, here are some background information.
BEMOSS™ agents include the device discovery agent, device agent and other system agents (which are network agent, approval helper agent, app launcher agent and platform monitor agent). Each of these are explained below.
The device discovery agent is one of the first few agents that is launched when BEMOSS is started. As its name suggests, its primary purpose is to discover supported devices in the building. The discovery process for any device is divided into the following steps:
- Detect the presence of a device in the building
- Query the device to find out its model information
- Look up the device in the list of supported devices and check if the corresponding API translator is available
To make this all possible, the device discovery agent uses a database to keep record of discovered devices. This database named bemossdb is a PostgreSQL database for storing BEMOSS™ metadata. The same database is checked by the UI to receive device discovery information for the dashboard page. Specifically, the device discovery agent takes up the following responsibilities:
- Detect the presence of a device in the building
- Query the device to find out its model information and unique device ID (MAC address/UUID)
- Check if the device unique ID already exists in bemossdb to avoid duplicate device entries
- For a newly discovered device, look up the device in the list of supported devices and check if API translator is available
- Create an unique device ID for the device to be recognized within BEMOSS™
- Make an entry for the newly discovered device in bemossdb and fill its information
Click here for Device Discovery Agent Source Code
This is a generic agent available in BEMOSS™ v3.5 for monitoring and control of a lighting/plug load controller detected by the device discovery agent. Compared with BEMOSS™ v2.0, this generic device agent replaces lighting/plug load agents. The reason for this generalization is that most device agents have the same working flow regardless of its device type. This modification makes BEMOSS agent code simpler and clearer, making it easy to manage. All BEMOSS supported devices, except thermostats, can be controlled by this generic device agent. Since a thermostat agent usually requires more functionalities, it is designed to inherit from this generic device agent and add on necessary functions.
Click here for Device Agent Source Code
To facilitate the operation of BEMOSS™, some system agents is running on BEMOSS™ as soon as the platform starts. These system agents are responsible for different tasks. For instance, the device discovery agent takes charge for device discovery and new device information database logging; and the network agent controls the start and stop of a device agent according to the message from the UI. In addition to the discovery agent, this section describe other system agents. They are:
-
Network Agent: The network agent starts as soon as the BEMOSS™ platform starts. It is responsible for launching and stopping device agents, as well as initializing entry for new devices in the device data table.
-
Approval Helper Agent: The approval helper agent helps some devices get approved in BEMOSS system. For devices, like Radio thermostats, as long as their IP address is acquired, they can be controlled by BEMOSS; however, other devices, like Philips Hue, require a hardware authentication, i.e., asking the user to press a button on the hardware. The approval helper agent is used to facilitate this approving process.
-
App Launcher Agent: App launcher agent is used to facilitate the launch of applications. Applications include the scheduling applications of plug loads and lightings, sensor-lighting close-loop control and many others.
-
Platform Monitor Agent: The platform monitor agent is responsible for (i) ensuring that all different agents are running properly in the system. If some agents are found to be crashed, it restarts them. If some agents which are not supposed to run are found running, it shuts them down. This provides another layer of protection for reliable operation of BEMOSS™ and (ii) aggregating, composing and sending email notifications for platform events (i.e., device goes offline/online, BEMOSS core/node goes offline/online, device agent or system agent crash and Cassandra and PostgreSQL database down).
Click here for System Agent Source Code