Wrong state to description mapping in NUT binding

I am having strange issue with the NUT binding running on Openhab 3.2.0 stable installed from .deb packages on Ubuntu 20.04.3 LTS. The binding is connected to the NUT server and gets all the status information fine, just the mapping between state and description for the upsStatus channel seems wrong. For example OL ups status should be mapped to description Online, but here it is mapped to: CHRG LB \u003d Online, charging, low battery. I have checked the source code at: Channels.xml and it is correct - OL = Online. Here is the REST dump for the upsStatus channel mapped to an Item:

{"link":"http://192.168.1.12:8080/rest/items/AEGUPS_UPSStatus","state":"OL","stateDescription":{"pattern":"%s","readOnly":true,"options":[{"value":"OFF","label":"Off"},{"value":"OL","label":"CHRG LB \u003d Online, charging, low battery"},{"value":"OB","label":"On battery"},{"value":"LB","label":"Low battery"},{"value":"CHRG","label":"Charging"},{"value":"OL CHRG","label":"Online, charging"},{"value":"OL LB","label":"Online, low battery"},{"value":"OL CHRG LB","label":"Online, charging, low battery"},{"value":"RB","label":"Replace battery"},{"value":"OVER","label":"Overload"},{"value":"TRIM","label":"Voltage trim"},{"value":"BOOST","label":"Voltage boost"},{"value":"CAL","label":"Calibration"},{"value":"BYPASS","label":"Bypass"},{"value":"NULL","label":"Null"}]},"commandDescription":{"commandOptions":[{"command":"OFF","label":"Off"},{"command":"OL","label":"CHRG LB \u003d Online, charging, low battery"},{"command":"OB","label":"On battery"},{"command":"LB","label":"Low battery"},{"command":"CHRG","label":"Charging"},{"command":"OL CHRG","label":"Online, charging"},{"command":"OL LB","label":"Online, low battery"},{"command":"OL CHRG LB","label":"Online, charging, low battery"},{"command":"RB","label":"Replace battery"},{"command":"OVER","label":"Overload"},{"command":"TRIM","label":"Voltage trim"},{"command":"BOOST","label":"Voltage boost"},{"command":"CAL","label":"Calibration"},{"command":"BYPASS","label":"Bypass"},{"command":"NULL","label":"Null"}]},"editable":true,"type":"String","name":"AEGUPS_UPSStatus","label":"UPS Status","category":"","tags":["Point"],"groupNames":["AEGUPS"]}

Any help and guidance is very welcome!
Stefan

See:

The fix is to download the 3.3.0-SNAPSHOT version as mentioned in another message in the topic mentioned.

1 Like