IoT Center Public Docs
All information and how to about devices on the IoT Center.
How to add sensors to your MQTT device
Before adding sensors to your IoT Center device you should have created an MQTT device through the IoT Center website or app.
To add the sensors you need to publish your device's data to our MQTT broker. You can connect to it on mitkov.selfhost.eu:1883. Then publish on the following topic: /v2/<user-id>/<device-id>.
You can get your user id and device id from the device settings on the IoT Center website and app.
Here is an example of device data json:
[{"event":4,"msgcntr":235},{"channel":1,"type":"battery","unit":"V","data":[{"value":3.51}]},{"channel":2,"type":"rssi","unit":"dBm","data":[{"value":-35}]},{"channel":3,"type":"temp","unit":"\u00b0C","data":[{"value":18.97}]},{"channel":4,"type":"humidity","unit":"%rH","data":[{"value":65.97}]},{"channel":5,"type":"gyr","unit":"\u00b0\/s","data":[{"value":-0.05,"stype":"ax"},{"value":-0.12,"stype":"ay"},{"value":-0.1,"stype":"az"}]},{"channel":6,"type":"acc","unit":"m\/s^2","data":[{"value":-0.19,"stype":"gx"},{"value":0.05,"stype":"gy"},{"value":9.77,"stype":"gz"}]},{"channel":7,"type":"pressure","unit":"hPa","data":[{"value":497.53}]}]
How statuses work
Devices can have 5 different statuses
Note that some of the statuses can be combined so that e.g a device status can be ONLINE and WARNING and ERROR at the same time.
Here are the statuses and their explanations:
- ONLINE - device is receiving data within the time frame defined by the DUTY CYCLE setting.
- WARNING - one or more of the sensors have a value that is under or over a threshold as set in the device settings.
- ERROR - you need to check the sensors of the device, as there is a problem with one or more of the sensors.
- OFF DUTY - more time has passed than the DUTY CYCLE allows since the device received data.
- OFFLINE - at least 24 hours have passed since last receiving data.