- 积分
- 210
- 金钱
- 178
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
中级会员
 
- 积分
- 210
- 金钱
- 178
- HASS币
- 0
|
发表于 2024-12-25 23:43:27
|
显示全部楼层
示例1:读 命令 03
发送:010300000001840A 就是读取温度测量值,
其中:01: 仪表地址 (我们电路里,地址参数值,默认Ad=01)
03: 读命令
0000: 温度测量值位址
0001: 读一个数据
840A: CRC校验码
如果回复
01 03 02 08 83 FE 25
0883是目前显示的温度
下边是我的两种写法,都有错误
- platform: modbus_controller
modbus_controller_id: CL_chiller
id: CL_chiller_temperature
name: "Temperature"
register_type: holding
address: 0x0000
register_count: 1
value_type: U_WORD
# filters:
# - multiply:
unit_of_measurement: "°C"
accuracy_decimals: 0
- platform: modbus_controller
modbus_controller_id: CL_chiller
id: CL_chiller_temperature
name: "Temperature"
custom_command: [0x1, 0x3, 0x0, 0x0, 0x0, 0x1, 0x84, 0x0A
unit_of_measurement: "°C"
value_type: U_WORD
accuracy_decimals: 2
filters:
- multiply: 0.01
|
|