I did everything as I was advised - now it works !!! I provoked an error several times, the binding “swears”, but when the channel is restored, it continues to work normally. Great job! Thank!
EDIT: users are reporting that these steps do not necessarily work out (missing dependencies)
EDIT2: Added couple of additional steps to finish the installation and resolve the dependency issues EDIT3: openhab 2.5.8 stable has been now released. The stable version is recommended for most users and the instructions below are not needed.
Alternatively, you can now just download SNAPSHOT versions of modbus binding and modbus transport from ci.openhab.org, and just use them
Uninstall 2.5.7 modbus binding, using Paper UI
Confirm uninstallation using bundle:list -s |grep modbus, no bundles should be installed
/repository/org/openhab/addons/bundles/org.openhab.io.transport.modbus/2.5.8-SNAPSHOT/org.openhab.io.transport.modbus-2.5.8-SNAPSHOT.jar modbus transport
Tried following the description above (downloading/extracting jar files), but end up with error relating to missing requirement/import package: org.apache.commons.pool2. Running openHAB 2.5.7 Release version.
Also tried restarting bundle, with error shown below.
Error executing command: Error restarting bundles:
Unable to start bundle 204: Could not resolve module: org.openhab.io.transport.modbus [204]
Unresolved requirement: Import-Package: org.apache.commons.pool2; version="[2.4.0,3.0.0)"
I have only tested using the alternative described in post no 16. Started out having the binding installed via Paper UI, doing a full uninstall/clean tmp and cache etc before installing binding manually (modbus and io.transport). From manual install, the bundles are listed as “Installed”, with only one version of each listed (correct version number), but not able to get them “Active”. Have tried several reboots.
EDIT:
Also tried the approach described in post no 15, although starting out with the 2.5.7 version installed from Paper UI.
After manually installing org.openhab.io.transport.modbus-2.5.8-SNAPSHOT.jar, uninstalling the 2.5.7 version and performing OH reboot, I have the correct setup wrt versions, and the bundles seem to be working.
Please try the other instructions, updating only the transport. Other users as well have reported trouble updating both the binding and transport to snapshot
But after a reboot of the raspberry (I use openhabian) the 2.5.7 transport addon is installed again.
Is it possible that it is installed automatically with the binding 2.5.7?
Thank you. BR
> openhab> bundle:list -s|grep modbus
> 202 x Active x 80 x 2.5.8.202008030359 x org.openhab.io.transport.modbus
> 210 x Active x 80 x 2.5.7 x org.openhab.binding.modbus
> 211 x Active x 80 x 2.5.7 x org.openhab.binding.modbus.sunspec
> 222 x Active x 80 x 2.5.7 x org.openhab.io.transport.modbus
Yes it does stay active. I don`t think that is good I also have some strange behavior like items are not linked to the modbus channels properly.
Do you have an idea why the 2.5.7 of the org.openhab.io.transport.modbus activates itself?
I just wanted to say that I installed v 2.5.8 of the transport as per ssalonen description (the first one) and everything works again and seems to stayed working now for a couple of days.
FYI: I do have the impression that sometimes it is slow. For example, openhab is connected by modbus to my wago plc that in it’s turn is connected to relays for blinds. When I ask openhab to close the blinds, it sets a parameter on the plc and the plc sets the relays. Before the update, I don’t remember that this was the case.
Do you mean that it takes time before blinds start to move after sending the command in openhab?
This is a bit unexpected (no functional changes how commands are processed, at least not in the binding ) but everything is possible . You should be able to verify whether it is the plc or openhab that has the delay by switching the verbose logging. You can see the delay between accepting the command and sending a modbus request to plc.
Ah interesting. I’ll try the verbose logging tonight when the kids are sleeping.
I just found out that the delay is only present after a time of not sending any commands. For example after night this mor ING when I wanted to control the blinds, there was a delay of about 10s before the blinds moved after sending the command to openhab
Oh we are talking that large delay interesting to see the detailed logs.
Do you happen to have rules triggering the modbus command? There’s been discussions on java introducing huge delays in some configurations Rule execution lags, possibly Java GC
This is a frequently reported problem. You can probably see it by reviewing your events.log for the time. What initiates your rule? When does the rule issue a new command?