[
{
"id": "b7765ab3393b31ac",
"type": "websocket out",
"z": "de0de8a7f80fa31e",
"name": "Lock",
"server": "",
"client": "75686c82f9066504",
"x": 835,
"y": 340,
"wires": [],
"l": false
},
{
"id": "24101c5d7889f977",
"type": "inject",
"z": "de0de8a7f80fa31e",
"name": "Ping",
"props": [],
"repeat": "50",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 230,
"y": 340,
"wires": [
[
"18ae6859891c15c0"
]
]
},
{
"id": "3985280296e9b9ef",
"type": "uuid",
"z": "de0de8a7f80fa31e",
"uuidVersion": "v1",
"namespaceType": "",
"namespace": "",
"namespaceCustom": "",
"name": "UUID组件生成Ping消息的MessageId",
"field": "payload.header.messageId",
"fieldType": "msg",
"x": 650,
"y": 340,
"wires": [
[
"b7765ab3393b31ac"
]
]
},
{
"id": "18ae6859891c15c0",
"type": "function",
"z": "de0de8a7f80fa31e",
"name": "构造Ping数据",
"func": "msg.payload = { \n "header": { \n "namespace": "Iot.Application", \n "name": "Ping", \n "messageId": "", \n "payloadVersion": 1 \n } \n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 380,
"y": 340,
"wires": [
[
"3985280296e9b9ef"
]
]
},
{
"id": "75686c82f9066504",
"type": "websocket-client",
"path": "wss://wsapi.kiwiot.com/?access_token=",
"tls": "df5f6c97c8337f73",
"wholemsg": "false",
"hb": "0",
"subprotocol": ""
},
{
"id": "df5f6c97c8337f73",
"type": "tls-config",
"name": "UnSafeTLS",
"cert": "",
"key": "",
"ca": "",
"certname": "",
"keyname": "",
"caname": "",
"servername": "",
"verifyservercert": false,
"alpnprotocol": ""
}
]
这个是Ping的逻辑, 依赖了一个UUID组件,