在我的 Windows10 上运行 OpenHab2,我无法让 OpenHAB2 从串行端口请求保持寄存器数据。在端口上没有看到 MODBUS 请求。我安装了 NTP 绑定(ntp 时间)(它有效),并尝试了 Modbus 绑定 1.12.0,但似乎只对 OpenHAB1 有效。
我的 OpenHAB2 配置是
.sitemap
sitemap boiler label="My home"
{
Frame label="Date"
{
Text item=Date
Text item=holding1501 label="Holding1501 out[%.1f °C]"
Text item=holding1500 label="Holding1500 out[%.1f °C]"
}
}
。项目
DateTime Date "Date [%1$tA, %1$td.%1$tm.%1$tY %1$tH:%1$tM:%1$tS]" { channel="ntp:ntp:local:dateTime" }
Number holding1501 "Holding1501 [%.1f]" <temperature> {channel="modbus:data:localSerial:holding:holding1501:number"}
Number holding1500 "Holding1500 [%.1f]" <temperature> {channel="modbus:data:localSerial:holding:holding1500:number"}
和 .things
Bridge modbus:serial:localSerial [port="COM6", id=10, baud=19200, stopBits="1", parity="even", dataBits=8, encoding="rtu"]
{
Bridge poller holding [ start=1500, length=1, refresh=1000, type="holding" ]
{
Thing data holding1500 [ readStart="1500", readValueType="int16", writeStart="1500", writeValueType="int16", writeType="holding" ]
Thing data holding15011 [ readStart="1501", readValueType="int16", writeStart="1501", writeValueType="int16", writeType="holding" ]
}
Thing data holding1500 [ readStart="1500", readValueType="int16", writeStart="1500", writeValueType="int16", writeType="holding" ]
Thing data holding15011 [ readStart="1501", readValueType="int16", writeStart="1501", writeValueType="int16", writeType="holding" ]
}
为了让 MODBUS 在 OpenHAB2 中运行,我缺少什么。对一些教程或工作示例的引用将不胜感激。