Luligu / matterbridge-zigbee2mqtt

Matterbridge zigbee2mqtt plugin
https://github.com/Luligu/matterbridge-zigbee2mqtt/blob/main/README.md
Apache License 2.0
78 stars 9 forks source link

Error after starting up #77

Closed Slyke closed 3 weeks ago

Slyke commented 1 month ago

matterbridge-zigbee2mqtt version: Update v.2.1.19 to v.2.2.1 (Note: Updating doesn't seem to work, even after restarting MatterBridge, no errors, just it doesn't update).

MatterBridge version: v.1.5.10

Here's my error logs:

nfo - [19:32:20.206] [PluginManager]: Enabled plugin matterbridge-zigbee2mqtt
info - [19:32:20.209] [PluginManager]: Loading plugin matterbridge-zigbee2mqtt type DynamicPlatform
info - [19:32:20.213] [Matterbridge zigbee2mqtt plugin]: Initializing platform: matterbridge-zigbee2mqtt v
info - [19:32:20.213] [Matterbridge zigbee2mqtt plugin]: Loaded zigbee2mqtt parameters from /root/.matterbridge/matterbridge-zigbee2mqtt.config.json:
info - [19:32:20.214] [Matterbridge zigbee2mqtt plugin]: Connecting to MQTT broker: mqtt://mosquitto.mqtt.svc.cluster.local.:1883
info - [19:32:20.219] [Matterbridge zigbee2mqtt plugin]: MQTT broker at mosquitto.mqtt.svc.cluster.local.:1883 connected
info - [19:32:20.220] [Matterbridge zigbee2mqtt plugin]: MQTT broker at mosquitto.mqtt.svc.cluster.local.:1883 subscribed to: zigbee2mqtt/#
notice - [19:32:20.220] [PluginManager]: Loaded plugin matterbridge-zigbee2mqtt type DynamicPlatform (entrypoint /usr/local/lib/node_modules/matterbridge-zigbee2mqtt/dist/index.js)
info - [19:32:20.220] [PluginManager]: Starting plugin matterbridge-zigbee2mqtt type DynamicPlatform
info - [19:32:20.221] [Matterbridge zigbee2mqtt plugin]: Starting zigbee2mqtt dynamic platform v2.2.1: The plugin has been enabled
info - [19:32:20.260] [Matterbridge zigbee2mqtt plugin]: zigbee2MQTT is online
error - [19:32:30.722] [Matterbridge zigbee2mqtt plugin]: The plugin did not receive zigbee2mqtt bridge info. Check if zigbee2mqtt is running and connected to the MQTT broker.
error - [19:32:30.722] [Matterbridge zigbee2mqtt plugin]: The plugin did not receive zigbee2mqtt bridge devices/groups. Check if zigbee2mqtt is running and connected to the MQTT broker.
error - [19:32:30.723] [PluginManager]: Failed to start plugin matterbridge-zigbee2mqtt: Error: The plugin did not receive zigbee2mqtt bridge state or info or devices/groups. Check if zigbee2mqtt is running and connected to the MQTT broker.
error - [19:32:30.723] [PluginManager]: Plugin matterbridge-zigbee2mqtt not started

Here's my config file:

{
  "host": "mosquitto.mqtt.svc.cluster.local.",
  "port": 1883,
  "protocolVersion": 5,
  "blackList": [],
  "whiteList": [],
  "switchList": [],
  "lightList": [],
  "outletList": [],
  "featureBlackList": [],
  "postfixHostname": true,
  "debug": false,
  "unregisterOnShutdown": false,
  "name": "matterbridge-zigbee2mqtt",
  "type": "DynamicPlatform",
  "username": "matterbridge",
  "password": "************",
  "topic": "zigbee2mqtt",
  "deviceFeatureBlackList": {}
}

I've confirmed that my credentials with by connecting to Mosquitto with MQTT Explorer with these credentials.

Luligu commented 1 month ago

Hi, this "mosquitto.mqtt.svc.cluster.local.", can be a valid host? You are not receiving the data from MQTT, even if the connection to the broker apparently was successful...

For the update can you send a complete log from the beginning after restarting and after the update for a few minutes please?

https://github.com/Luligu/matterbridge?tab=readme-ov-file#how-to-send-the-debug-log-files

Check it.

Slyke commented 1 month ago

It's a valid host. I'm running this inside my Kubernetes cluster and that's the service FQDN for Mosquitto.

I'm seeing some logs come through:

notice - [19:38:56.542] [Matterbridge]: Package matterbridge-zigbee2mqtt installed correctly
info - [19:38:56.542] [Matterbridge]: Plugin matterbridge-zigbee2mqtt installed. Full restart required.
info - [19:38:56.544] [PluginManager]: Plugin matterbridge-zigbee2mqtt already registered
info - [19:40:44.655] [Matterbridge zigbee2mqtt plugin]: zigbee2MQTT sent 6 devices
info - [19:40:44.657] [Matterbridge zigbee2mqtt plugin]: zigbee2MQTT sent device_announce device: ************* ieee_address: ***********
notice - [20:32:55.052] [Matterbridge]: The plugin matterbridge-zigbee2mqtt is out of date. Current version: 2.1.19. Latest version: 2.2.1.

Even though it's saying the plugin is in error state and not started: image

image

Luligu commented 1 month ago

It seems that the update is successful... Try to restart with the debug on file and send me the log please.

Teagan42 commented 4 weeks ago

I encountered a problem similar to the error messages in the original issue report. It turned out that the username and password were set to empty strings by default, which messed things up with my EMQX broker since authentication is turned off. Because of that, a user with the username '' couldn't connect.

I fixed it by changing the defaults to undefined and putting together a pull request (#81) to resolve the issue.