I try to access my WAGO Controller through openhab 2.4, modbus and homekit.
I’ve done this in an earlier version of openhab and it worked, but with the new version of the modbus binding I
didn’t get it running
The first step is that I can read and write Integers to the WAGO.
How can I do that ?
16030-16035 are States and 16036-16040 are commands to turn on the light.
To turn on a light I just need a 1 in the register, the wago controller turns on the light and turns the register to 0.
If you are going to specify byte read type values, you also need to specify which part of the modbus register word to look at. There are examples in the docs.
It’s really going to help if you can tell us what you see in openhab.log and events.log
So the binding can read, because ff and 18 are values which I forced in the controller.
And this is the event.log
modbus:poller:Light:Licht' changed from UNINITIALIZED to INITIALIZING
modbus:poller:Light:Licht' changed from INITIALIZING to ONLINE
modbus:data:Light:Licht:Lichter' changed from UNINITIALIZED to INITIALIZING
modbus:data:Light:Licht:Lichter' changed from INITIALIZING to OFFLINE (CONFIGURATION_ERROR)
modbus:data:Light:Licht:Test' changed from UNINITIALIZED to INITIALIZING
modbus:data:Light:Licht:Test' changed from INITIALIZING to OFFLINE (CONFIGURATION_ERROR)
We can see two different .things files. Which one is it? And when providing logs you should enable DEBUG. And please use code fences for configurations also as you did with events.log.
I think you don’t need two separate things for reading and writing to/from holding registers. See binding documentation once more and get yourself familiar with full examples.
The last one is the actual one.
I turned on DEBUG for the 3 important packages, but I thought that was the importantest part.
I checked the documentation several times and I always get the CONFIGURATION_ERROR
I also tested adding a item via paperUI and this is working.
The problem is that the .json files are different to the .thing and .item files and I can’T compare them
No they can’t be compared side by side. So the connection works as you prooved with PaperUI. Then it must be a typo in your .things file. Pick up your magnifying glass and work your way through the file and compare to docs. You’ll find it eventually
Found the Failure…
When I switched the debugging to Trace the openhab.log tells me readStart=NULL …
The Configuration is casesensitive and I wrote readstart instead of readStart
In the previous Screenshot you can also see the working .things File. After it was working I changed it to my belongings.
The CONFIGURATION_ERROR doesn’t show what is wrong in the configuration
If I turned the log:level to trace the openhab.log shows that readStart is NULL and that gives me the hint