2980020711 发表于 2019-7-24 11:45:41

MQTT 各种json格式模板

{"data":{"wendu":25,"shidu":55}} 平台展示json格式
{"data":{"wendu":"a:1212,b:33","shidu":55}}
{"wendu":25}折线图方式展示温度
{"wendu":"q:121,b:323"}字符串方式数据上传

{
"data":{"wendu":"a:1212,b:33","shidu":55}

,
"dat1a":{"wendu":"a:6666,b:6666","shidu":66}
}

https://www.json.cn/

$crsp/cmduuid回复下发命令
======================================================
{
"datastreams":[
{

"id":"temp",
"datapoints":[
{
"value":25
}
]
}
]
}


{"datastreams":[{"id":"temp","datapoints":[{"value":25}]}]}
type1以折线图方式展示,type3用的json方式展示

=======================================================
{
"datastreams":[
{

"id":"temp",
"datapoints":[
{
"value":25
}
]
},

{

"id":"temp2",
"datapoints":[
{
"value":25
}
]
}

]
}
传多个数据点
=======================================================
增加时间戳
{
"datastreams":[
{

"id":"temp",
"datapoints":[
{
"at":"2013-04-22 22:22:22",
"value":25
}
]
}
]
}
=======================================================
{
"datastreams":[
{

"id":"temp",
"datapoints":[
{
"at":"2013-04-22 22:22:22",
"value":"25"
}
]
}
]
}
=======================================================

{
"datastreams":[
{

"id":"temp",
"datapoints":[
{
"at":"2013-04-22 22:22:22",
"value":"25:ffdfdf"
}
]
}
]
}
=======================================================
{"datastreams":[{"id":"location","datapoints":[{"value":{"lon":106,"lat":29}}]}]}
显示地图,type1显示地图,type3显示json
{"GPS":{"lat":29.62514,"lon":106.48901}}

=======================================================
{
"datastreams":[
{

"id":"temp",
"datapoints":[
{
"value":25
}
]
}
]

,
"datastreams2":[
{

"id":"temp",
"datapoints":[
{
"value":25
}
]
}
]
}

以上为多个数据流
===========================================================

页: [1]
查看完整版本: MQTT 各种json格式模板