1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-24 09:13:04 +02:00

Created MQTT support (markdown)

OliE
2019-10-26 11:43:20 +02:00
parent ea5095c6ea
commit ac2cbddc4f

29
MQTT-support.md Normal file

@@ -0,0 +1,29 @@
The payload is formatted in JSON notation. The measurement reference is the Unix date/time in milliseconds.
Currently only the weight of an user is transmitted. You could test the openScale sync MQTT support for example using [CloudMQTT](https://www.cloudmqtt.com/).
_Note: openScale supported only MQTT 3.1 **not** MQTT 5.x_
**Adding a measurement**
topic `openScaleSync/measurements/insert`
payload `{"date":1572082380000,"weight":80.0}`
**Update a measurement**
topic `openScaleSync/measurements/update`
payload `{"date":1572082380000,"weight":120.0}`
**Delete a measurement**
topic `openScaleSync/measurements/delete`
payload `{"date":1572082380000}`
**Clear all measurements**
topic `openScaleSync/measurements/clear`
payload `true`