OHS/Zahrada/Sensor/Temperature/0 23.00 OHS/Zahrada/Sensor/Humidity/0 53.00 OHS/Zahrada/Sensor/Temperature/1 24.04 OHS/Zahrada/Sensor/Pressure/0 998.38 OHS/Dilna/Sensor/Temperature/0 9.48 OHS/Domek/Sensor/Temperature/0 13.02 OHS/Garaz/Sensor/Temperature/0 12.06
Last setting is the group name the sensor belongs to.
Sensors are dynamically added when they first join the network. The Sensor type can be chosen to any possible, as long as its value can be stored i a float variable. Main unit does not care about the sensors at all, it doesn't do any computation with it values, and also it does not verify the content. Main purpose is to act as a gateway for MQTT to NodeRed or similar tool. Only value that indicate the health of the sensor is time-stamp called last OK, that indicates delivery time of last message from sensor.
Sensors are defined in the code by following struct:
uint8_t address; char type; uint8_t number; // |- MQTT publish // ||- Free // |||- Free // |||||||- Group number // |||||||- 0 .. 15 // |||||||- // |||||||- // ||||||||- Enabled // 00000000 uint8_t setting; float value; systime_t last_OK = 0;
In the future, the parameters for sensors, and also for authentication units, will extend as they will be battery monitored. I would like main board to take care of the sensors battery life in form of some flag and also sms.