[ { "id": "200c026180f22a70", "type": "tab", "label": "新安国际集中供液", "disabled": false, "info": "", "env": [] }, { "id": "ha_integration_tab", "type": "tab", "label": "HomeAssistant集成", "disabled": false, "info": "集中供液数据发送到HomeAssistant", "env": [] }, { "id": "086467396a2eed2c", "type": "modbus-client", "name": "modbus-slave-新安集中供液", "clienttype": "tcp", "bufferCommands": true, "stateLogEnabled": false, "queueLogEnabled": false, "failureLogEnabled": true, "tcpHost": "192.168.50.91", "tcpPort": "5020", "tcpType": "DEFAULT", "serialPort": "/dev/ttyUSB", "serialType": "RTU-BUFFERD", "serialBaudrate": 9600, "serialDatabits": 8, "serialStopbits": 1, "serialParity": "none", "serialConnectionDelay": 100, "serialAsciiResponseStartDelimiter": "0x3A", "unit_id": 1, "commandDelay": 1, "clientTimeout": 1000, "reconnectOnTimeout": true, "reconnectTimeout": 2000, "parallelUnitIdsAllowed": true, "showErrors": false, "showWarnings": true, "showLogs": true }, { "id": "mqtt_broker_ha", "type": "mqtt-broker", "name": "HomeAssistant MQTT", "broker": "192.168.50.83", "port": "1883", "clientid": "nodered_central_liquid", "autoConnect": true, "usetls": false, "protocolVersion": "4", "keepalive": "60", "cleansession": true, "autoUnsubscribe": true, "birthTopic": "homeassistant/status", "birthQos": "0", "birthPayload": "online", "birthMsg": {}, "closeTopic": "homeassistant/status", "closeQos": "0", "closePayload": "offline", "closeMsg": {}, "willTopic": "", "willQos": "0", "willPayload": "", "willMsg": {}, "userProps": "", "sessionExpiry": "" }, { "id": "72a90d52a45530d0", "type": "function", "z": "200c026180f22a70", "name": "通用解析节点", "func": "\nconst registers = msg.payload;\n// node.warn(`解析${registers}`);\n\n// 检查是否为状态数据(布尔类型或布尔数组)\nif (typeof registers === 'boolean' ||\n (Array.isArray(registers) && registers.length === 1 && typeof registers[0] === 'boolean') ||\n (Array.isArray(registers) && registers.length === 1 && typeof registers[0] === 'number' && (registers[0] === 0 || registers[0] === 1)) ||\n (Array.isArray(registers) && registers.length > 1 && typeof registers[0] === 'boolean')) {\n\n // 处理布尔状态数据\n let boolValue;\n if (typeof registers === 'boolean') {\n boolValue = registers;\n } else if (Array.isArray(registers) && registers.length === 1) {\n boolValue = typeof registers[0] === 'boolean' ? registers[0] : (registers[0] === 1);\n } else if (Array.isArray(registers) && registers.length > 1 && typeof registers[0] === 'boolean') {\n // 对于多个布尔值的数组,取第一个值作为主要状态\n boolValue = registers[0];\n // node.warn(`布尔数组长度: ${registers.length}, 取第一个值: ${boolValue}`);\n }\n\n // 根据 topic 确定状态类型\n let dataType = \"未知状态\";\n let statusValue = boolValue;\n\n if (msg.topic) {\n if (msg.topic.includes(\"工作状态\") || msg.topic.includes(\"work\") || msg.topic.includes(\"Q1.6\")) {\n dataType = \"工作状态\";\n statusValue = boolValue ? \"运行\" : \"停止\";\n msg.workStatus = statusValue;\n } else if (msg.topic.includes(\"报警状态\") || msg.topic.includes(\"alarm\") || msg.topic.includes(\"Q1.5\")) {\n dataType = \"报警状态\";\n statusValue = boolValue ? \"报警\" : \"正常\";\n msg.alarmStatus = statusValue;\n } else if (msg.topic.includes(\"状态\") || msg.topic.includes(\"status\")) {\n dataType = \"设备状态\";\n statusValue = boolValue ? \"激活\" : \"关闭\";\n msg.status = statusValue;\n }\n } else {\n // 如果没有 topic,使用通用状态字段\n msg.status = boolValue;\n dataType = \"状态\";\n }\n\n // 打印解析结果到调试控制台\n // node.warn(`解析${dataType} ---> ${statusValue}`);\n\n // 保留原始的 payload,添加解析后的值\n msg.originalPayload = msg.payload;\n msg.payload = statusValue;\n\n return msg;\n}\n\n// 检查寄存器长度(浮点数解析)\nif (!Array.isArray(registers) || registers.length !== 2) {\n node.warn(\"寄存器数量不足,无法解析浮点数!\");\n return null;\n}\n\n// 处理 Modbus 寄存器数据\n// 寄存器数据按 Big Endian 字序存储,但浮点数需要按 Little Endian 读取\nconst highRegister = registers[0]; // 高16位寄存器\nconst lowRegister = registers[1]; // 低16位寄存器\n\n// 创建一个 4 字节缓冲区\nconst buffer = Buffer.alloc(4);\n\n// 按照 Big Endian 方式写入寄存器数据\nbuffer.writeUInt16BE(highRegister, 0); // 写入高16位到前两个字节\nbuffer.writeUInt16BE(lowRegister, 2); // 写入低16位到后两个字节\n\n// 按照 Little Endian 方式读取 IEEE 754 浮点数\nconst rawValue = buffer.readFloatLE(0);\n\n// 保留两位小数\nconst value = Math.round(rawValue * 100) / 100;\n\n// 根据输入消息的 topic 或其他标识来确定数据类型\nlet dataType = \"未知数据\";\nif (msg.topic) {\n if (msg.topic.includes(\"温度\") || msg.topic.includes(\"temperature\")) {\n dataType = \"温度\";\n msg.temperature = value;\n } else if (msg.topic.includes(\"PH\") || msg.topic.includes(\"ph\")) {\n dataType = \"PH值\";\n msg.ph = value;\n } else if (msg.topic.includes(\"液位\") || msg.topic.includes(\"level\")) {\n dataType = \"液位\";\n msg.level = value;\n } else if (msg.topic.includes(\"电导率\") || msg.topic.includes(\"conductivity\")) {\n dataType = \"电导率\";\n msg.conductivity = value;\n } else if (msg.topic.includes(\"压力\") || msg.topic.includes(\"pressure\")) {\n dataType = \"压力\";\n msg.pressure = value;\n }\n} else {\n // 如果没有 topic,使用通用字段名\n msg.value = value;\n dataType = \"数值\";\n}\n\n// 打印解析结果到调试控制台\n// node.warn(`解析${dataType} ---> ${value}`);\n\n// 保留原始的 payload,添加解析后的值\nmsg.originalPayload = msg.payload;\nmsg.payload = value;\n\n// 返回 msg 对象,供后续节点使用\nreturn msg;\n", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 480, "y": 420, "wires": [ [ "af0930278623437b" ] ] }, { "id": "af0930278623437b", "type": "switch", "z": "200c026180f22a70", "name": "节点分流", "property": "topic", "propertyType": "msg", "rules": [ { "t": "cont", "v": "温度", "vt": "str" }, { "t": "cont", "v": "PH", "vt": "str" }, { "t": "cont", "v": "储液当前液位", "vt": "str" }, { "t": "cont", "v": "电导率", "vt": "str" }, { "t": "cont", "v": "供液一压力", "vt": "str" }, { "t": "cont", "v": "供液二压力", "vt": "str" }, { "t": "cont", "v": "报警状态", "vt": "str" }, { "t": "cont", "v": "工作状态", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 8, "x": 700, "y": 420, "wires": [ [ "fa5417377a61b71e", "link_temperature_out" ], [ "1490bcab1bec54c1", "link_ph_out" ], [ "84475a694e701126", "link_level_out" ], [ "7c6dae0c8ca8c7aa", "link_conductivity_out" ], [ "095d8a5fee72b512", "link_pressure1_out" ], [ "f82ed17f4277b2e2", "link_pressure2_out" ], [ "aff2063ee6398034", "link_alarm_out" ], [ "c44e177352a6f455", "link_work_status_out" ] ] }, { "id": "7bec428b86e8c8bc", "type": "modbus-read", "z": "200c026180f22a70", "name": "中央供液-slave-温度", "topic": "温度", "showStatusActivities": true, "logIOActivities": false, "showErrors": true, "showWarnings": true, "unitid": "1", "dataType": "HoldingRegister", "adr": "23", "quantity": "2", "rate": "5", "rateUnit": "s", "delayOnStart": false, "startDelayTime": "", "server": "086467396a2eed2c", "useIOFile": false, "ioFile": "", "useIOForPayload": false, "emptyMsgOnFail": true, "x": 150, "y": 240, "wires": [ [ "72a90d52a45530d0" ], [] ] }, { "id": "fa5417377a61b71e", "type": "debug", "z": "200c026180f22a70", "name": "debug-温度", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1110, "y": 60, "wires": [] }, { "id": "fb1f1d999f707aa2", "type": "modbus-read", "z": "200c026180f22a70", "name": "中央供液-slave-PH值", "topic": "PH值", "showStatusActivities": true, "logIOActivities": false, "showErrors": true, "showWarnings": true, "unitid": "1", "dataType": "HoldingRegister", "adr": "160", "quantity": "2", "rate": "5", "rateUnit": "s", "delayOnStart": false, "startDelayTime": "", "server": "086467396a2eed2c", "useIOFile": false, "ioFile": "", "useIOForPayload": false, "emptyMsgOnFail": true, "x": 160, "y": 300, "wires": [ [ "72a90d52a45530d0" ], [] ] }, { "id": "1490bcab1bec54c1", "type": "debug", "z": "200c026180f22a70", "name": "debug-PH值", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1110, "y": 100, "wires": [] }, { "id": "bb17984ec96509da", "type": "modbus-read", "z": "200c026180f22a70", "name": "中央供液-slave-储液当前液位", "topic": "储液当前液位", "showStatusActivities": true, "logIOActivities": false, "showErrors": true, "showWarnings": true, "unitid": "1", "dataType": "HoldingRegister", "adr": "128", "quantity": "2", "rate": "5", "rateUnit": "s", "delayOnStart": false, "startDelayTime": "", "server": "086467396a2eed2c", "useIOFile": false, "ioFile": "", "useIOForPayload": false, "emptyMsgOnFail": true, "x": 180, "y": 360, "wires": [ [ "72a90d52a45530d0" ], [] ] }, { "id": "84475a694e701126", "type": "debug", "z": "200c026180f22a70", "name": "debug-储液当前液位", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1120, "y": 140, "wires": [] }, { "id": "805bb39037771c2d", "type": "modbus-read", "z": "200c026180f22a70", "name": "中央供液-slave-电导率", "topic": "电导率", "showStatusActivities": true, "logIOActivities": false, "showErrors": true, "showWarnings": true, "unitid": "1", "dataType": "HoldingRegister", "adr": "84", "quantity": "2", "rate": "5", "rateUnit": "s", "delayOnStart": false, "startDelayTime": "", "server": "086467396a2eed2c", "useIOFile": false, "ioFile": "", "useIOForPayload": false, "emptyMsgOnFail": true, "x": 160, "y": 420, "wires": [ [ "72a90d52a45530d0" ], [] ] }, { "id": "7c6dae0c8ca8c7aa", "type": "debug", "z": "200c026180f22a70", "name": "debug-电导率", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1100, "y": 340, "wires": [] }, { "id": "56e20ad9b8718468", "type": "modbus-read", "z": "200c026180f22a70", "name": "中央供液-slave-供液一压力", "topic": "供液一压力", "showStatusActivities": true, "logIOActivities": false, "showErrors": true, "showWarnings": true, "unitid": "1", "dataType": "HoldingRegister", "adr": "112", "quantity": "2", "rate": "5", "rateUnit": "s", "delayOnStart": false, "startDelayTime": "", "server": "086467396a2eed2c", "useIOFile": false, "ioFile": "", "useIOForPayload": false, "emptyMsgOnFail": true, "x": 170, "y": 480, "wires": [ [ "72a90d52a45530d0" ], [] ] }, { "id": "095d8a5fee72b512", "type": "debug", "z": "200c026180f22a70", "name": "debug-供液一压力", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1110, "y": 380, "wires": [] }, { "id": "2923878ddaa66ef8", "type": "modbus-read", "z": "200c026180f22a70", "name": "中央供液-slave-供液二压力", "topic": "供液二压力", "showStatusActivities": true, "logIOActivities": false, "showErrors": true, "showWarnings": true, "unitid": "1", "dataType": "HoldingRegister", "adr": "116", "quantity": "2", "rate": "5", "rateUnit": "s", "delayOnStart": false, "startDelayTime": "", "server": "086467396a2eed2c", "useIOFile": false, "ioFile": "", "useIOForPayload": false, "emptyMsgOnFail": true, "x": 170, "y": 540, "wires": [ [ "72a90d52a45530d0" ], [] ] }, { "id": "f82ed17f4277b2e2", "type": "debug", "z": "200c026180f22a70", "name": "debug-供液二压力", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1110, "y": 420, "wires": [] }, { "id": "fe307fc992aa444d", "type": "modbus-read", "z": "200c026180f22a70", "name": "中央供液-slave-报警状态", "topic": "报警状态", "showStatusActivities": true, "logIOActivities": false, "showErrors": true, "showWarnings": true, "unitid": "1", "dataType": "Coil", "adr": "13", "quantity": "1", "rate": "5", "rateUnit": "s", "delayOnStart": false, "startDelayTime": "", "server": "086467396a2eed2c", "useIOFile": false, "ioFile": "", "useIOForPayload": false, "emptyMsgOnFail": true, "x": 170, "y": 600, "wires": [ [ "72a90d52a45530d0" ], [] ] }, { "id": "aff2063ee6398034", "type": "debug", "z": "200c026180f22a70", "name": "debug-报警状态", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1100, "y": 460, "wires": [] }, { "id": "5ab73337424b189a", "type": "modbus-read", "z": "200c026180f22a70", "name": "中央供液-slave-工作状态", "topic": "工作状态", "showStatusActivities": true, "logIOActivities": false, "showErrors": true, "showWarnings": true, "unitid": "1", "dataType": "Coil", "adr": "14", "quantity": "1", "rate": "5", "rateUnit": "s", "delayOnStart": false, "startDelayTime": "", "server": "086467396a2eed2c", "useIOFile": false, "ioFile": "", "useIOForPayload": false, "emptyMsgOnFail": true, "x": 170, "y": 660, "wires": [ [ "72a90d52a45530d0" ], [] ] }, { "id": "c44e177352a6f455", "type": "debug", "z": "200c026180f22a70", "name": "debug-工作状态", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1100, "y": 500, "wires": [] }, { "id": "link_temperature_out", "type": "link out", "z": "200c026180f22a70", "name": "发送温度到HA", "mode": "link", "links": [ "link_ha_temperature_in" ], "x": 885, "y": 60, "wires": [] }, { "id": "link_ph_out", "type": "link out", "z": "200c026180f22a70", "name": "发送PH值到HA", "mode": "link", "links": [ "link_ha_ph_in" ], "x": 885, "y": 100, "wires": [] }, { "id": "link_level_out", "type": "link out", "z": "200c026180f22a70", "name": "发送液位到HA", "mode": "link", "links": [ "link_ha_level_in" ], "x": 885, "y": 140, "wires": [] }, { "id": "link_conductivity_out", "type": "link out", "z": "200c026180f22a70", "name": "发送电导率到HA", "mode": "link", "links": [ "link_ha_conductivity_in" ], "x": 965, "y": 340, "wires": [] }, { "id": "link_pressure1_out", "type": "link out", "z": "200c026180f22a70", "name": "发送供液一压力到HA", "mode": "link", "links": [ "link_ha_pressure1_in" ], "x": 965, "y": 380, "wires": [] }, { "id": "link_pressure2_out", "type": "link out", "z": "200c026180f22a70", "name": "发送供液二压力到HA", "mode": "link", "links": [ "link_ha_pressure2_in" ], "x": 965, "y": 420, "wires": [] }, { "id": "link_alarm_out", "type": "link out", "z": "200c026180f22a70", "name": "发送报警状态到HA", "mode": "link", "links": [ "link_ha_alarm_in" ], "x": 965, "y": 460, "wires": [] }, { "id": "link_work_status_out", "type": "link out", "z": "200c026180f22a70", "name": "发送工作状态到HA", "mode": "link", "links": [ "link_ha_work_in" ], "x": 965, "y": 500, "wires": [] }, { "id": "ha_discovery_function", "type": "function", "z": "ha_integration_tab", "name": "HomeAssistant自动发现配置", "func": "// HomeAssistant MQTT 自动发现配置 - 无分割版本\n// 每个传感器单独发送,避免分割节点问题\n\nconst deviceId = \"central_liquid_supply\";\nconst deviceName = \"新安国际集中供液系统\";\nconst baseTopic = \"homeassistant\";\n\n// 设备基本信息\nconst device = {\n identifiers: [deviceId],\n name: deviceName,\n manufacturer: \"新安国际\",\n model: \"集中供液系统\",\n sw_version: \"1.0\"\n};\n\n// 所有传感器配置\nconst allSensors = [\n { type: \"sensor\", name: \"温度\", entity_id: \"temperature\", unit: \"°C\", device_class: \"temperature\" },\n { type: \"sensor\", name: \"PH值\", entity_id: \"ph_value\", unit: \"pH\" },\n { type: \"sensor\", name: \"电导率\", entity_id: \"conductivity\", unit: \"μS/cm\" },\n { type: \"sensor\", name: \"储液当前液位\", entity_id: \"storage_level\", unit: \"L\" },\n { type: \"sensor\", name: \"供液一压力\", entity_id: \"supply_pressure_1\", unit: \"kPa\", device_class: \"pressure\" },\n { type: \"sensor\", name: \"供液二压力\", entity_id: \"supply_pressure_2\", unit: \"kPa\", device_class: \"pressure\" },\n { type: \"binary_sensor\", name: \"工作状态\", entity_id: \"work_status\", device_class: \"running\" },\n { type: \"binary_sensor\", name: \"报警状态\", entity_id: \"alarm_status\", device_class: \"problem\" }\n];\n\nnode.warn(`开始处理 ${allSensors.length} 个传感器配置`);\n\n// 逐个发送传感器配置\nallSensors.forEach((sensor, index) => {\n const config = {\n name: sensor.name,\n unique_id: `${deviceId}_${sensor.entity_id}`,\n state_topic: `${deviceId}/${sensor.type}/${sensor.entity_id}/state`,\n device: device\n };\n\n // 根据传感器类型添加特定配置\n if (sensor.type === \"sensor\") {\n config.state_class = \"measurement\";\n if (sensor.unit) config.unit_of_measurement = sensor.unit;\n if (sensor.device_class) config.device_class = sensor.device_class;\n } else if (sensor.type === \"binary_sensor\") {\n config.device_class = sensor.device_class;\n config.payload_on = sensor.entity_id === \"work_status\" ? \"运行\" : \"报警\";\n config.payload_off = sensor.entity_id === \"work_status\" ? \"停止\" : \"正常\";\n }\n\n const mqttTopic = `${baseTopic}/${sensor.type}/${deviceId}_${sensor.entity_id}/config`;\n const mqttPayload = JSON.stringify(config);\n\n node.warn(`发送配置 ${index + 1}/${allSensors.length}: ${sensor.name}`);\n node.warn(` 主题: ${mqttTopic}`);\n\n // 立即发送MQTT消息\n node.send({\n topic: mqttTopic,\n payload: mqttPayload,\n retain: true\n });\n\n // 添加小延迟,确保消息按顺序发送\n setTimeout(() => {\n if (index === allSensors.length - 1) {\n // 最后发送设备状态\n node.send({\n topic: `${deviceId}/status`,\n payload: \"online\",\n retain: true\n });\n node.warn(\"所有自动发现配置已发送完成\");\n }\n }, index * 100);\n});\n\nreturn null; // 不通过return发送,直接通过node.send发送\n", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 240, "y": 140, "wires": [ [ "25565ecbf48f0308", "ha_discovery_mqtt" ] ] }, { "id": "ha_discovery_mqtt", "type": "mqtt out", "z": "ha_integration_tab", "name": "发送自动发现配置", "topic": "", "qos": "0", "retain": "true", "respTopic": "", "contentType": "", "userProps": "", "correl": "", "expiry": "", "broker": "mqtt_broker_ha", "x": 610, "y": 120, "wires": [] }, { "id": "ha_discovery_trigger", "type": "inject", "z": "ha_integration_tab", "name": "启动自动发现", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": "5", "topic": "", "payload": "", "payloadType": "date", "x": 120, "y": 80, "wires": [ [ "ha_discovery_function" ] ] }, { "id": "ha_data_processor", "type": "function", "z": "ha_integration_tab", "name": "数据处理器", "func": "// 处理来自集中供液系统的数据\nconst deviceId = \"central_liquid_supply\";\nconst topic = msg.topic;\nconst value = msg.payload;\n\n// 根据 topic 确定实体类型和 ID\nlet entityType = \"sensor\";\nlet entityId = \"\";\nlet stateTopic = \"\";\n\nif (topic.includes(\"温度\")) {\n entityId = \"temperature\";\n stateTopic = `${deviceId}/sensor/${entityId}/state`;\n} else if (topic.includes(\"PH\")) {\n entityId = \"ph_value\";\n stateTopic = `${deviceId}/sensor/${entityId}/state`;\n} else if (topic.includes(\"电导率\")) {\n entityId = \"conductivity\";\n stateTopic = `${deviceId}/sensor/${entityId}/state`;\n} else if (topic.includes(\"配液当前液位\")) {\n entityId = \"mixing_level\";\n stateTopic = `${deviceId}/sensor/${entityId}/state`;\n} else if (topic.includes(\"储液当前液位\")) {\n entityId = \"storage_level\";\n stateTopic = `${deviceId}/sensor/${entityId}/state`;\n} else if (topic.includes(\"供液一压力\")) {\n entityId = \"supply_pressure_1\";\n stateTopic = `${deviceId}/sensor/${entityId}/state`;\n} else if (topic.includes(\"供液二压力\")) {\n entityId = \"supply_pressure_2\";\n stateTopic = `${deviceId}/sensor/${entityId}/state`;\n} else if (topic.includes(\"工作状态\")) {\n entityType = \"binary_sensor\";\n entityId = \"work_status\";\n stateTopic = `${deviceId}/binary_sensor/${entityId}/state`;\n} else if (topic.includes(\"报警状态\")) {\n entityType = \"binary_sensor\";\n entityId = \"alarm_status\";\n stateTopic = `${deviceId}/binary_sensor/${entityId}/state`;\n} else {\n node.warn(`未知的数据类型: ${topic}`);\n return null;\n}\n\n// 记录数据处理信息\nnode.warn(`处理数据: ${topic} = ${value} -> ${stateTopic}`);\n\n// 创建输出消息\nconst outputMsg = {\n topic: stateTopic,\n payload: String(value),\n retain: false\n};\n\nreturn outputMsg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 300, "y": 300, "wires": [ [ "ha_data_mqtt", "ha_data_debug" ] ] }, { "id": "ha_data_mqtt", "type": "mqtt out", "z": "ha_integration_tab", "name": "发送数据到HA", "topic": "", "qos": "0", "retain": "false", "respTopic": "", "contentType": "", "userProps": "", "correl": "", "expiry": "", "broker": "mqtt_broker_ha", "x": 540, "y": 300, "wires": [] }, { "id": "ha_data_debug", "type": "debug", "z": "ha_integration_tab", "name": "HA数据调试", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 550, "y": 400, "wires": [] }, { "id": "link_ha_temperature_in", "type": "link in", "z": "ha_integration_tab", "name": "接收温度数据", "links": [ "link_temperature_out" ], "x": 105, "y": 180, "wires": [ [ "ha_data_processor" ] ] }, { "id": "link_ha_ph_in", "type": "link in", "z": "ha_integration_tab", "name": "接收PH值数据", "links": [ "link_ph_out" ], "x": 105, "y": 240, "wires": [ [ "ha_data_processor" ] ] }, { "id": "link_ha_level_in", "type": "link in", "z": "ha_integration_tab", "name": "接收液位数据", "links": [ "link_level_out" ], "x": 105, "y": 280, "wires": [ [ "ha_data_processor", "0b8146b6074f206f" ] ] }, { "id": "link_ha_conductivity_in", "type": "link in", "z": "ha_integration_tab", "name": "接收电导率数据", "links": [ "link_conductivity_out" ], "x": 115, "y": 360, "wires": [ [ "ha_data_processor" ] ] }, { "id": "link_ha_pressure1_in", "type": "link in", "z": "ha_integration_tab", "name": "接收供液一压力数据", "links": [ "link_pressure1_out" ], "x": 105, "y": 320, "wires": [ [ "ha_data_processor" ] ] }, { "id": "link_ha_pressure2_in", "type": "link in", "z": "ha_integration_tab", "name": "接收供液二压力数据", "links": [ "link_pressure2_out" ], "x": 115, "y": 420, "wires": [ [ "ha_data_processor" ] ] }, { "id": "link_ha_alarm_in", "type": "link in", "z": "ha_integration_tab", "name": "接收报警状态数据", "links": [ "link_alarm_out" ], "x": 115, "y": 460, "wires": [ [ "ha_data_processor" ] ] }, { "id": "link_ha_work_in", "type": "link in", "z": "ha_integration_tab", "name": "接收工作状态数据", "links": [ "link_work_status_out" ], "x": 115, "y": 500, "wires": [ [ "ha_data_processor" ] ] }, { "id": "25565ecbf48f0308", "type": "debug", "z": "ha_integration_tab", "name": "debug 2", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 490, "y": 60, "wires": [] }, { "id": "0b8146b6074f206f", "type": "debug", "z": "ha_integration_tab", "name": "debug 1", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 310, "y": 240, "wires": [] } ]