Repository navigation
Communications
To allow as much flexibility as possible, as well as having the option in the future to allow external companies support this project, we have decided to divide our project into multiple layers, each with its own purpose. To better understand the partitioning of our project, it is advised to read the System Overview.
Although the project is divided into several layers, each acting on its own, they must communicate to transmit data. There are several ways to send data from one layer to another - in this page we will discuss how this communication is done in this project.
Sensors collect data from the outside world, while the system saves it in an inner database for later use. The communication method for sending the data from the sensors to the system that has been chosen is Internet Sockets. When initialized, the server will open a socket to which all sensors can connect. After connecting to the server, the sensor will send a register message, asking the system core to add the sensor to the system. After registration, the sensor will be able to send update messages to the system, containing relevant data it has collected.
If a sensor wants to join the system, it must send a register message to the system core, asking to join. The message will contain what data the sensor will be gathering, to allow the system to create a new database for that sensor. If the message has been accepted and the sensor has joined successfully, the system core will reply with a success message, notifying the sensor with the id that has been allocated for that sensor - this id will be used in future communications, to allow the system to identify the sensor.
After registration, the sensor will be able to send update messages to the system core, informing of new data that has been collected.
As could be inferred from the explanation above, communication is done by sending messages from one endpoint to another. To keep communications organized and to allow more elegant and uniform handling, we have decided to use the JSON data interchanging format for all kinds of messages.
Applications will be loaded dynamically to the system's run-time. The communication between the application and the system will be done via the SmartHouseApplication API.
Overview
Quick Start
Smarthouse Usage for Owners
Development Manuals
Continuous Development
Misc.