5
49
529
论坛技术达人
01 03 20 00 00 0A CE 0D
01 03 40 00 00 02 D1 CB
if (rawBuffer[2] != 0x1C) { // 另一个节点为 if (rawBuffer[2] != 0x04) { return { payload: { success: false, msg: 'is another' } }; }
sensor: - platform: mqtt name: "power_s" state_topic: "rs485EMDecoded" value_template: "{{value_json['data'].power_s|round(3)*1000 }}" unit_of_measurement: "W" - platform: mqtt name: "power_pf" state_topic: "rs485EMDecoded" value_template: "{{value_json['data'].pf|round(3) }}" unit_of_measurement: " " - platform: mqtt name: "power_voltage" state_topic: "rs485EMDecoded" value_template: "{{value_json['data'].voltage|round(1) }}" unit_of_measurement: "V" - platform: mqtt name: "power_current" state_topic: "rs485EMDecoded" value_template: "{{value_json['data'].current|round(3) }}" unit_of_measurement: "A" - platform: mqtt state_topic: "rs485EMDecoded2" name: "totalkwh" unit_of_measurement: 'kwh' value_template: "{{ value_json['data'].totalkwh|round(1) }}"
utility_meter: monthly_electricity: source: sensor.totalkwh cycle: monthly daily_electricityc: source: sensor.totalkwh cycle: daily
查看全部评分
使用道具 举报
0
58
1173
金牌会员
7
365
1017
15
1516
5150
论坛元老
30
187
1389
6
191
1183
36
453
2545
modbus: name: hf type: tcp host: 192.168.2.10 port: 8899 sensor: - platform: modbus registers: - name: DTS2626_IA hub: hf slave: 33 unit_of_measurement: A register: 3 scale: 0.01 precision: 1
13
154
661
高级会员
evantalk 发表于 2021-2-17 10:51 提个建议,ha直接支持modbus tcp,并不需要mqtt中转
zxlch 发表于 2021-2-17 14:56 直接用8266做一个modbus穿透的网关就可以了,便宜很多
本版积分规则 发表回复 回帖后跳转到最后一页
为论坛做出突出贡献的会员
Archiver|手机版|小黑屋|Hassbian
GMT+8, 2021-3-5 02:28 , Processed in 0.125599 second(s), 38 queries .
Powered by Discuz! X3.4
Copyright © 2001-2020, Tencent Cloud.