25 lines
697 B
Markdown
25 lines
697 B
Markdown
System of monitoring and controlling heating.
|
|
|
|
Modules (called units) send their data via UDP.
|
|
Each datagram contains JSON object of following form:
|
|
{
|
|
"id": "<ID>",
|
|
"ip": "<IP>",
|
|
"v1": "123",
|
|
...
|
|
}
|
|
|
|
Where ID is unit's identifier (MAC address usually),
|
|
IP is unit's current IP address (for server to be able
|
|
to contact it).
|
|
Other values in object are names and values of sensors
|
|
available on the unit.
|
|
|
|
Server could send datagram with some commands to unit.
|
|
For simplicity datagram is simple string with command and
|
|
optional arguments, everything separated with character 0x01.
|
|
|
|
Possible commands are:
|
|
|
|
1. ping - no arguments. Informs unit that server is still alive
|
|
and able to communicate |