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.homeassistant] Switch channels are not created #18020

Closed
NikolayKash opened this issue Jan 2, 2025 · 6 comments
Closed

[mqtt.homeassistant] Switch channels are not created #18020

NikolayKash opened this issue Jan 2, 2025 · 6 comments
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@NikolayKash
Copy link

NikolayKash commented Jan 2, 2025

Expected Behavior

Switch channels are created

Current Behavior

I have several Plugs of different vendors

Mi, Pereneo, Tuya

After upgrade to new version of MQTT binding part of 4.3.1, switch channels are not created and I see this message in the log

2025-01-02 17:09:12.179 [WARN ] [transport.mqtt.internal.Subscription] - A subscriber of type 'class org.openhab.binding.mqtt.homeassistant.internal.DiscoverComponents' failed to process message '7B22617661696C6162696C697479223A5B7B22746F706963223A227A6967626565326D7174742F6272696467652F7374617465227D2C7B22746F706963223A227A6967626565326D7174742F4D69506C7567312F617661696C6162696C697479227D5D2C22617661696C6162696C6974795F6D6F6465223A22616C6C222C22636F6D6D616E645F746F706963223A227A6967626565326D7174742F4D69506C7567312F736574222C22646576696365223A7B226964656E74696669657273223A5B227A6967626565326D7174745F307830303135386430303032326461643636225D2C226D616E756661637475726572223A225869616F6D69222C226D6F64656C223A224D6920736D61727420706C756720285A4E435A30324C4D29222C226E616D65223A224D69506C756731222C227669615F646576696365223A227A6967626565326D7174745F6272696467655F307830303132346230303036326363656537227D2C226A736F6E5F617474726962757465735F746F706963223A227A6967626565326D7174742F4D69506C756731222C226E616D65223A6E756C6C2C226F626A6563745F6964223A226D69706C756731222C226F726967696E223A7B226E616D65223A225A6967626565324D515454222C227377223A22312E34322E30222C2275726C223A2268747470733A2F2F7777772E7A6967626565326D7174742E696F227D2C227061796C6F61645F6F6666223A224F4646222C227061796C6F61645F6F6E223A224F4E222C2273746174655F746F706963223A227A6967626565326D7174742F4D69506C756731222C22756E697175655F6964223A223078303031353864303030323264616436365F7377697463685F7A6967626565326D717474222C2276616C75655F74656D706C617465223A227B7B2076616C75655F6A736F6E2E7374617465207D7D227D' to topic 'homeassistant/switch/0x00xxx00022dxxx/switch/config'.

I reset mqtt and deleted all topics, but the issue still exist.

Config:

I edited id of device to 0x00xxx00022dxxx

{
  "availability": [
    {
      "topic": "zigbee2mqtt/bridge/state"
    },
    {
      "topic": "zigbee2mqtt/PereneoPlug1/availability"
    }
  ],
  "availability_mode": "all",
  "command_topic": "zigbee2mqtt/PereneoPlug1/set",
  "device": {
    "identifiers": [
      "zigbee2mqtt_0x00xxx00022dxxx"
    ],
    "manufacturer": "Perenio",
    "model": "Power link (PEHPL0X)",
    "name": "PereneoPlug1",
    "sw_version": "1.3.43",
    "via_device": "zigbee2mqtt_bridge"
  },
  "json_attributes_topic": "zigbee2mqtt/PereneoPlug1",
  "name": null,
  "object_id": "pereneoplug1",
  "origin": {
    "name": "Zigbee2MQTT",
    "sw": "1.42.0",
    "url": "https://www.zigbee2mqtt.io"
  },
  "payload_off": "OFF",
  "payload_on": "ON",
  "state_topic": "zigbee2mqtt/PereneoPlug1",
  "unique_id": "0x00xxx00022dxxx_switch_zigbee2mqtt",
  "value_template": "{{ value_json.state }}"
}

Possible Solution

Steps to Reproduce (for Bugs)

Context

Your Environment

Zigbee2MQTT version

1.42.0 commit: bc6eccf6

Openhab:

runtimeInfo:
  version: 4.3.1
  buildString: Release Build
systemInfo:
  javaVersion: 17.0.13
  javaVendor: Ubuntu
  osName: Linux
  osVersion: 6.8.0-50-generic
  osArchitecture: amd64
addons:
  - automation-jsscripting
  - binding-airquality
  - binding-androidtv
  - 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-inmemory
  - persistence-mapdb
  - persistence-rrd4j
  - transformation-exec
  - transformation-jinja
  - transformation-jsonpath
  - transformation-map
  - transformation-regex
  - transformation-scale
  - ui-basic
  - voice-voicerss
@NikolayKash NikolayKash added the bug An unexpected problem or unintended behavior of an add-on label Jan 2, 2025
@NikolayKash NikolayKash changed the title [mqtt.homeassistant] Thing switch channels are not discoverable [mqtt.homeassistant] Switch channels are not created Jan 2, 2025
@lsiepel
Copy link
Contributor

lsiepel commented Jan 5, 2025

I guerss this is fixed already here: #18021 should be available in 4.3.2.
Maybe @ccutrer can confirm? As the JSON shows a null name, but the errror is somewhat different.

@NikolayKash
Copy link
Author

NikolayKash commented Jan 6, 2025

Hi @lsiepel , the new version of binding mentioned fixed the issue.

Thanks!

@NikolayKash
Copy link
Author

fixed in 4.3.2

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/zigbee-devices-are-not-loaded-correctly-during-autodiscovery/161428/5

@bit-factor
Copy link

out of curiosity, any idea when 4.3.2 will be available?

@lsiepel
Copy link
Contributor

lsiepel commented Jan 7, 2025

out of curiosity, any idea when 4.3.2 will be available?

A date has not yet been decided on. I would assume max 3 weeks.

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

4 participants