[
{
“id”: “e0f038b1.5ccd08”,
“type”: “json”,
“z”: “deae99b8.0460c8”,
“name”: “获取数据转换”,
“property”: “payload”,
“action”: “obj”,
“pretty”: true,
“x”: 320,
“y”: 380,
“wires”: [
[
“5829fb34.34c1c4”
]
]
},
{
“id”: “5829fb34.34c1c4”,
“type”: “change”,
“z”: “deae99b8.0460c8”,
“name”: “提取传感器温度”,
“rules”: [
{
“t”: “set”,
“p”: “payload”,
“pt”: “msg”,
“to”: “payload.DS18B20”,
“tot”: “msg”
}
],
“action”: “”,
“property”: “”,
“from”: “”,
“to”: “”,
“reg”: false,
“x”: 540,
“y”: 380,
“wires”: [
[
“c023df4f.4d838”
]
]
},
{
“id”: “b390b73d.6476e”,
“type”: “ioBroker in”,
“z”: “deae99b8.0460c8”,
“name”: “水桶的水温度”,
“topic”: “mqtt.0.tele.tai_yang_neng_xun_huan.SENSOR”,
“payloadType”: “value”,
“onlyack”: “”,
“func”: “all”,
“gap”: “”,
“fireOnStart”: “false”,
“x”: 150,
“y”: 380,
“wires”: [
[
“e0f038b1.5ccd08”
]
]
},
{
“id”: “751b0773.65da38”,
“type”: “debug”,
“z”: “deae99b8.0460c8”,
“name”: “”,
“active”: false,
“tosidebar”: true,
“console”: true,
“tostatus”: false,
“complete”: “payload”,
“targetType”: “msg”,
“statusVal”: “”,
“statusType”: “auto”,
“x”: 940,
“y”: 380,
“wires”: []
},
{
“id”: “89ec098b.0a258”,
“type”: “ioBroker in”,
“z”: “deae99b8.0460c8”,
“name”: “太阳板温度”,
“topic”: “mqtt.0.tele.tai_yang_ban_wen_du_cai_ji.SENSOR”,
“payloadType”: “value”,
“onlyack”: “”,
“func”: “all”,
“gap”: “”,
“fireOnStart”: “false”,
“x”: 140,
“y”: 440,
“wires”: [
[
“b4ba51be.53a3c”
]
]
},
{
“id”: “b4ba51be.53a3c”,
“type”: “json”,
“z”: “deae99b8.0460c8”,
“name”: “获取数据转换”,
“property”: “payload”,
“action”: “obj”,
“pretty”: true,
“x”: 320,
“y”: 440,
“wires”: [
[
“89838f8f.d86cd8”
]
]
},
{
“id”: “89838f8f.d86cd8”,
“type”: “change”,
“z”: “deae99b8.0460c8”,
“name”: “提取传感器温度”,
“rules”: [
{
“t”: “set”,
“p”: “payload”,
“pt”: “msg”,
“to”: “payload.DS18B20.Id”,
“tot”: “msg”
}
],
“action”: “”,
“property”: “”,
“from”: “”,
“to”: “”,
“reg”: false,
“x”: 540,
“y”: 440,
“wires”: [
[
“c023df4f.4d838”
]
]
},
{
“id”: “c023df4f.4d838”,
“type”: “function”,
“z”: “deae99b8.0460c8”,
“name”: “”,
“func”: “return msg”,
“outputs”: 1,
“noerr”: 0,
“initialize”: “”,
“finalize”: “”,
“x”: 710,
“y”: 400,
“wires”: [
[
“751b0773.65da38”
]
]
}
]
需要将两个温度进行存储后比较,因为两个不是同时获取的。不知道iobroker是不是可以在一个流上直接获取两个温度,那样会比较简单。
下面是我写个,传递数据的我用两个inject代替了,我不是用的iobroker。详细的注释我也写了,自己多尝试吧
flows (3).json (1.4 KB)
谢谢 我看看 紫薯布丁