iot mqtt json数据包格式

iot json数据包格式

数据类型:

订阅类型    RegisterDevice    DeviceData    DeviceAlert    Acknowledge

发布类型    RegistrationAck    DataPublis    UserCommand

接口协议:
1MQTT主题:/iot/input/json
2、接入格式:
data = '{\ 
"eventType":"DevicesData",\       #事件类型:必填(目前只支持DevicesData"siteToken":"testtoken",\         #站点token(网关填写):必填
"eventDate":"xx",\
"receivedDate":"xx",\        
"hardwareId":"test1234560x",\      #设备ID:必填
"metadata":{"xyx":"zzz"},\
"eventbody":[]\                    #数据必填
}'

#件类型:RegisterDeviceDevicesDataDeviceAlertcknowledge
:(只支持DevicesData)


3、发布格式(格式同接入格式)
MQTT主题:/iot/input/json
data = '{\ 
"eventType":"DevicesData",\       #事件类型:
"siteToken":"testtoken",\         #站点token(网关填写):
"eventDate":"xx",\
"receivedDate":"xx",\        
"hardwareId":"test1234560x",\      #设备ID"metadata":{"xyx":"zzz"},\
"eventbody":[]\                    #数据必填
}'


你可能感兴趣的:(IoT,物联网,iot)