本帖最后由 ghdong 于 2023-2-23 15:58 编辑
市面上正泰无论是ddsu 单相表还是dtsu三相表485出厂协议有两种DL/T645-2007 和modbus rtu 三相带通讯价格在200左右,modbus好像会贵个十几 二十块钱,单相强烈建议购买出厂协议为modbus的。因为新款单相的虽然有按键了,但只有一个按键,不能修改只能查看。 三相的有三个按键 可以通过按键菜单修改协议和其他参数。
1. type可以填tcp 和rtuovertcp ,如果网关转换就填tcp ,否则就由ha 转换填rtuovertcp
2.网关每个端口智能一个客户端连接,否则数据会错乱,要多个连接,就要新建一个端口
3.address 可以填十进制也可以填16进制 ,16进制以0x开头,直接抄说明书地址即可不用转换,更方便。
4.当显示数字很大很小的时候可以调整 scale 如:0. 01 0.1 1000等
5.slave 为电表地址,串接多个设备时需要调整设备地址
6.precision 为小数点精度
7. data_type 为float32 , float16我试了不行
8. state_class: total device_class: energy 如果要在能源中使用 请设置这两个参数
9,网关的波特率,位数,停止位,必须和电表一致。
modbus:
- type: tcp
host: 192.168.1.136
port: 9998
name: "net1"
sensors:
- name: "电压AB"
address: 0x2000
scale: 0.1
slave: 1
count: 2
precision: 2
unit_of_measurement: V
data_type: float32
unique_id: "330421101"
- name: "电压BC"
address: 0x2002
scale: 0.1
slave: 1
count: 2
precision: 2
unit_of_measurement: V
data_type: float32
unique_id: "330421102"
- name: "电压CA"
address: 0x2004
scale: 0.1
slave: 1
count: 2
precision: 2
unit_of_measurement: V
data_type: float32
unique_id: "330421103"
- name: "电压A"
address: 0x2006
scale: 0.1
slave: 1
count: 2
precision: 2
unit_of_measurement: V
data_type: float32
unique_id: "330421104"
- name: "电压B"
address: 0x2008
scale: 0.1
slave: 1
count: 2
precision: 2
unit_of_measurement: V
data_type: float32
unique_id: "330421105"
- name: "电压C"
address: 0x200A
scale: 0.1
slave: 1
count: 2
precision: 2
unit_of_measurement: V
data_type: float32
unique_id: "330421106"
- name: "瞬时总有功功率"
address: 0x2012
slave: 1
count: 2
precision: 2
scale: 0.1
unit_of_measurement: W
data_type: float32
unique_id: "330421110"
- name: "A相有功功率"
address: 0x2014
slave: 1
count: 2
precision: 2
scale: 0.1
unit_of_measurement: W
data_type: float32
unique_id: "330421111"
- name: "B相有功功率"
address: 0x2016
slave: 1
count: 2
precision: 2
scale: 0.1
unit_of_measurement: W
data_type: float32
unique_id: "330421112"
- name: "C相有功功率"
address: 0x2018
slave: 1
count: 2
precision: 2
scale: 0.1
unit_of_measurement: W
data_type: float32
unique_id: "330421113"
- name: "电网频率"
address: 0x2044
slave: 1
scale: 0.01
count: 2
precision: 2
unit_of_measurement: Hz
data_type: float32
unique_id: "330421114"
- name: "有功总电能"
address: 0x1028
slave: 1
count: 2
precision: 2
state_class: total
device_class: energy
unit_of_measurement: kWh
data_type: float32
unique_id: "33042115"
|