Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mqtt] not reliable after upgrade to 4.2.0 "Command 'NULL' from channel [...] not supported" #17533

Open
MaTr74 opened this issue Oct 9, 2024 · 3 comments
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@MaTr74
Copy link

MaTr74 commented Oct 9, 2024

Expected Behavior

MQTT plugin isn't treat a message/field/command as NULL.

Current Behavior

I have the following MQTT thing configured:

    Thing topic test "Test" {
         Channels:
             Type switch: Status [ stateTopic="tele/wp-zigbee-coordinator-01/SENSOR", transformationPattern="REGEX:(.*ZbReceived.*test.*ZoneStatusChange.*)∩JSONPATH:$..*.ZoneStatusChange", on="1", off="0" ]
             Type number: LinkQuality [ stateTopic="tele/wp-zigbee-coordinator-01/SENSOR", transformationPattern="REGEX:(.*ZbReceived.*test.*LinkQuality.*)∩JSONPATH:$..*.LinkQuality" ]
             Type number: BatteryVoltage [ stateTopic="tele/wp-zigbee-coordinator-01/SENSOR", transformationPattern="REGEX:(.*ZbReceived.*test.*BatteryVoltage.*)∩JSONPATH:$..*.BatteryVoltage", unit="V" ]
             Type number: BatteryPercentage [ stateTopic="tele/wp-zigbee-coordinator-01/SENSOR", transformationPattern="REGEX:(.*ZbReceived.*test.*BatteryPercentage.*)∩JSONPATH:$..*.BatteryPercentage", unit="%" ]
             Type datetime: LastSeen [ stateTopic="tele/wp-zigbee-coordinator-01/SENSOR", transformationPattern="REGEX:(.*ZbReceived.*test.*)∩JS:currentDateTime.js" ]
     }

When I send the following message a second time:

{"ZbReceived":{"0xA7E2":{"Device":"0xA7E2","Name":"test","Cluster":10,"Read":[7],"ReadNames":{"LocalTime":true},"Endpoint":1,"LinkQuality":76}}}

... the following WARN messages appear in the log:

2024-10-12 09:29:52.535 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command 'NULL' from channel 'mqtt:topic:mosquitto:test:LinkQuality' not supported by type 'NumberValue': Character N is neither a decimal digit number, decimal point, nor "e" notation exponential mark.

Steps to Reproduce (for Bugs)

  1. Create docker network sudo docker network create openhab-test
  2. Install docker Mosquitto image (see attached mosquitto-docker-compose.yml)
  3. Install docker openHAB image (see attached openhab-docker-compose.yml)
  4. Install the following openHAB addons:
    • MQTT Binding
    • JSONPATH transformation
    • Regex transformation
  5. Add mqtt.things file to conf/things (file attached)
  6. Send the message above twice to topic tele/wp-zigbee-coordinator-01/SENSOR

Your Environment

  • Version used: openHAB 4.2.0 as docker image

files.zip

@MaTr74 MaTr74 added the bug An unexpected problem or unintended behavior of an add-on label Oct 9, 2024
@lsiepel
Copy link
Contributor

lsiepel commented Oct 9, 2024

Not really sure what is going on there, might be related to the chaining, might be something different. I suspect it is rather introduced into 4.2.0 and not in in 4.2.2 as the changelog does not show something i can tie to this. Maybe @jimtng has some thoughts on this issue?

@MaTr74
Copy link
Author

MaTr74 commented Oct 10, 2024

I went back step by step through the releases and can confirm that the warnings occur with 4.2.0. On 4.1.3 everything is working well. I will fix the title.

@MaTr74 MaTr74 changed the title [mqtt] not reliable after upgrade to 4.2.2 (from 4.2.0) "Command 'NULL' from channel [...] not supported" [mqtt] not reliable after upgrade to 4.2.0 "Command 'NULL' from channel [...] not supported" Oct 10, 2024
@MaTr74
Copy link
Author

MaTr74 commented Oct 12, 2024

I've just created a minimal example and updated the report with which you can reproduce the behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

No branches or pull requests

2 participants