主题
Device Attribute API Documentation
Attribute Interface
HTTP Interface
bash
curl -v -X POST --data '{"temperature":35,"humidity":60}' "http://127.0.0.1:9292/api/v1/$ACCESS_TOKEN/attributes" --header "Content-Type:application/json"MQTT Interface
bash
mosquitto_pub -d -q 1 -h "127.0.0.1" -p "9796" -t "v1/devices/me/attributes" -u "$ACCESS_TOKEN" -m '{"temperature":25}'Telemetry Data Interface
HTTP Interface
bash
curl -v -X POST --data '{"temperature":35,"humidity":60}' "http://127.0.0.1:9292/api/v1/$ACCESS_TOKEN/telemetry" --header "Content-Type:application/json"MQTT Interface
bash
mosquitto_pub -d -q 1 -h "127.0.0.1" -p "9796" -t "v1/devices/me/telemetry" -u "$ACCESS_TOKEN" -m '{"temperature":25}'You can obtain the ACCESS_TOKEN from the device details page.
