Binding Modbus 2.5.7. Stops working after unsuccessful read attempt

EDIT: openhab 2.5.8 stable has been now released. The stable version is recommended for most users and the instructions below are not needed.

I made these step-by-step instructions (working at least with “manual” installation), hopefully helping others as well

  1. Confirm you have 2.5.7 versions running (Active)
openhab> bundle:list -s|grep modbus
247 │ Active │  80 │ 2.5.7                   │ org.openhab.binding.modbus
248 │ Active │  80 │ 2.5.7                   │ org.openhab.binding.modbus.sunspec
255 │ Active │  80 │ 2.5.7                   │ org.openhab.io.transport.modbus

This is important. The org.openhab.io.transport.modbus-2.5.8-SNAPSHOT.jar will not work with pre-2.5.7 org.openhab.binding.modbus/sunspec.

  1. Unzip 2.5.8-SNAPSHOT zip (see above)
  2. Copy org.openhab.io.transport.modbus-2.5.8-SNAPSHOT.jar to addons folder (for exact location, refer to https://www.openhab.org/docs/installation/linux.html#file-locations)
  3. List bundles and confirm you have 2.5.8 snapshot registered
openhab> bundle:list -s|grep modbus                                                                                                                        
259 │ Active │  80 │ 2.5.7                   │ org.openhab.binding.modbus
260 │ Active │  80 │ 2.5.7                   │ org.openhab.binding.modbus.sunspec
267 │ Active │  80 │ 2.5.7                   │ org.openhab.io.transport.modbus
268 │ Active │  80 │ 2.5.8.202007261630      │ org.openhab.io.transport.modbus
  1. Uninstall older (2.5.7) org.openhab.io.transport.modbus version, using the ID (first column) above
openhab> bundle:uninstall 267
  1. Confirm that old bundle is removed:
openhab> bundle:list -s|grep modbus                                                                                                                        
259 │ Waiting │  80 │ 2.5.7                   │ org.openhab.binding.modbus
260 │ Active  │  80 │ 2.5.7                   │ org.openhab.binding.modbus.sunspec
268 │ Active  │  80 │ 2.5.8.202007261630      │ org.openhab.io.transport.modbus

You can refresh bundle status manually:

openhab> bundle:refresh 259
openhab> bundle:list -s|grep modbus
259 │ Active │  80 │ 2.5.7                   │ org.openhab.binding.modbus
260 │ Active │  80 │ 2.5.7                   │ org.openhab.binding.modbus.sunspec
268 │ Active │  80 │ 2.5.8.202007261630      │ org.openhab.io.transport.modbus
  1. Restart openHAB & confirm that there is no old transport version running, and all the bundles are Active
openhab> bundle:list -s|grep modbus                                                                                                                        
259 │ Active │  80 │ 2.5.7                   │ org.openhab.binding.modbus
260 │ Active │  80 │ 2.5.7                   │ org.openhab.binding.modbus.sunspec
268 │ Active │  80 │ 2.5.8.202007261630      │ org.openhab.io.transport.modbus
5 Likes