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] Adding Homeassistant thing: java.lang.NullPointerException: Cannot invoke "String.isBlank()" because "label" is null #15634

Closed
NikolayKash opened this issue Sep 20, 2023 · 0 comments · Fixed by #15427
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@NikolayKash
Copy link

NikolayKash commented Sep 20, 2023

After upgrading to z2m version 1.33.0. I start getting this errors in the logs.

Expected Behavior

No issue when adding mqtt things defined via home assistance definition

Current Behavior

java.lang.NullPointerException: Cannot invoke "String.isBlank()" because "label" is null
	at org.openhab.core.thing.type.ChannelGroupTypeBuilder.instance(ChannelGroupTypeBuilder.java:44) ~[?:?]
	at org.openhab.binding.mqtt.homeassistant.internal.component.AbstractComponent.getType(AbstractComponent.java:213) ~[?:?]
	at org.openhab.binding.mqtt.homeassistant.internal.component.AbstractComponent.addChannelTypes(AbstractComponent.java:145) ~[?:?]
	at org.openhab.binding.mqtt.homeassistant.internal.handler.HomeAssistantThingHandler.accept(HomeAssistantThingHandler.java:283) ~[?:?]
	at org.openhab.binding.mqtt.homeassistant.internal.handler.HomeAssistantThingHandler.accept(HomeAssistantThingHandler.java:1) ~[?:?]
	at org.openhab.binding.mqtt.generic.tools.DelayedBatchProcessing.run(DelayedBatchProcessing.java:110) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]

I tried delete and re-add the thing via the discovery, but still getting this error and some channel is missing

definition of this channel is:

{"availability":[{"topic":"zigbee2mqtt/bridge/state"},{"topic":"zigbee2mqtt/PereneoPlug1/availability"}],"availability_mode":"all","device":{"identifiers":["zigbee2mqtt_0xf4ce369d8a2854f8"],"manufacturer":"Perenio","model":"Power link (PEHPL0X)","name":"PereneoPlug1","sw_version":"1.3.43"},"enabled_by_default":true,"json_attributes_topic":"zigbee2mqtt/PereneoPlug1","name":"Consumed energy","object_id":"pereneoplug1_consumed_energy","origin":{"name":"Zigbee2MQTT","sw":"1.33.0","url":"https://www.zigbee2mqtt.io"},"state_topic":"zigbee2mqtt/PereneoPlug1","unique_id":"0xf4ce369d8a2854f8_consumed_energy_zigbee2mqtt","unit_of_measurement":"W*h","value_template":"{{ value_json.consumed_energy }}"}

Possible Solution

Steps to Reproduce (for Bugs)

  1. Upgrade z2m to 1.33.0
  2. try to add some thing as home assistant thing

Context

Trying to add new mqtt thing as home assistance thing.

could be related to this change in z2m Koenkk/zigbee2mqtt#18678
could be this pr fix this #15427

Your Environment

runtimeInfo:
  version: 4.0.3
  buildString: Release Build
locale: en-RU
systemInfo:
  configFolder: /etc/openhab
  userdataFolder: /var/lib/openhab
  logFolder: /var/log/openhab
  javaVersion: 17.0.8
  javaVendor: Azul Systems, Inc.
  javaVendorVersion: Zulu17.44+15-CA
  osName: Linux
  osVersion: 5.10.103-v7+
  osArchitecture: arm
  availableProcessors: 4
  freeMemory: 45137376
  totalMemory: 389283840
  startLevel: 100
addons:
  - automation-jsscripting
  - binding-airquality
  - binding-astro
  - binding-bluetooth
  - binding-chromecast
  - binding-gpstracker
  - binding-homeconnect
  - binding-http
  - binding-hue
  - binding-icalendar
  - binding-icloud
  - binding-ipcamera
  - binding-logreader
  - binding-miio
  - binding-mqtt
  - binding-netatmo
  - binding-network
  - binding-networkupstools
  - binding-openweathermap
  - binding-speedtest
  - binding-systeminfo
  - binding-telegram
  - binding-zwave
  - misc-metrics
  - misc-openhabcloud
  - persistence-dynamodb
  - persistence-mapdb
  - persistence-rrd4j
  - transformation-exec
  - transformation-jinja
  - transformation-jsonpath
  - transformation-map
  - transformation-regex
  - transformation-scale
  - ui-basic
  - voice-porcupineks
  - voice-voicerss
@NikolayKash NikolayKash added the bug An unexpected problem or unintended behavior of an add-on label Sep 20, 2023
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

Successfully merging a pull request may close this issue.

1 participant