Hello, everybody,
I try to use Openhab2 to read out a charge control from Phoenix Contact via Modbus and control it later.
I did the following:
-I installed the binding for Modbus in the paper UI
-I wrote the following modbus.things file:
Bridge modbus:tcp:wallbe [ host=“192.168.178.8”, port=502, id=255 ] {
Bridge poller Wallbe_Data [ start=315, length=4, refresh=1000, type="holding" ] {
Thing data EV_IP_1 [ readStart="315", readValueType="int16", writeStart="315", writeValueType="int16", writeType="holding" ]
Thing data EV_IP_2 [ readStart="316", readValueType="int16", writeStart="316", writeValueType="int16", writeType="holding" ]
Thing data EV_IP_3 [ readStart="317", readValueType="int16", writeStart="317", writeValueType="int16", writeType="holding" ]
Thing data EV_IP_4 [ readStart="318", readValueType="int16", writeStart="318", writeValueType="int16", writeType="holding" ]
}
}
-I wrote the following modbus.items file:
Number IP_Adress_1 "IP-Adresse 1. Byte [%d]" { channel="modbus:data:wallbe:holding:EV_IP_1:number" }
Number IP_Adress_2 "IP-Adresse 2. Byte [%d]" { channel="modbus:data:wallbe:holding:EV_IP_2:number" }
Number IP_Adress_3 "IP-Adresse 3. Byte [%d]" { channel="modbus:data:wallbe:holding:EV_IP_3:number" }
Number IP_Adress_4 "IP-Adresse 4. Byte [%d]" { channel="modbus:data:wallbe:holding:EV_IP_4:number" }
I get the following errors with the LOG Viewer:
2019-11-14 19:57:13.707 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model ‘modbus.things’ has errors, therefore ignoring it: [2,33]: no viable alternative at input ‘?’
[2,36]: missing ‘]’ at ‘192’
[2,40]: no viable alternative at input ‘168’
[2,44]: no viable alternative at input ‘178’
[2,48]: no viable alternative at input ‘8’
[2,54]: no viable alternative at input ‘port’
[2,59]: no viable alternative at input ‘502’
[2,64]: no viable alternative at input ‘id’
[2,67]: no viable alternative at input ‘255’
[11,1]: extraneous input ‘}’ expecting EOF
What am I doing wrong? Maybe someone can help me.
Greetings and thanks, Karsten