itavero / homebridge-z2m

Expose your Zigbee devices to HomeKit with ease, by integrating 🐝 Zigbee2MQTT with 🏠 Homebridge.
https://z2m.dev
Apache License 2.0
309 stars 49 forks source link

[Feature] Catch more log details from zigbee2mqtt + device recognition improvement #47

Closed warevlc closed 3 years ago

warevlc commented 3 years ago

Hi @itavero First of all, congrats for the plugin, it works stable (which is highly appreciated) and very good. I hope not to disturb you but I have a couple of needs that perhaps are already solved, if this is the case: sorry. I am new using zigbee2mqtt + homebridge-z2m but I have quite experience (as user) using deconz + homebridge-hue. I was happy with raspbee II but I wanted to sold myself a cc2538 in a rpi shield and check how was it. Anyway, I am telling this just to tell you a couple of aspects that I found very useful when I was using the deconz + hb hue combination.

Problem description

  1. I miss seeing more mqtt info in the homebridge.log, for example, in hb hue plugin, when I "manually" switch off or on a plug, it is shown in the log while hb z2m only shows if the action is done via homekit. Is there perhaps a deeper level that I don't know how to activate it?

  2. One of the things I like more in zigbee2mqtt vs deconz is the autojoin of the devices. I wanted to test it with the most automatic for the user perspective or experience, it is true then in homekit the device would appear with the "ugly :)" IEEE name but it can be easily renamed there. I found then that mqtt shows the kind of device, but then when I first restart hb z2m, the plugin also detects and pulls the device but -as first- unrecognized. I have then to configure something like the Friendly name and after a bit then homekit detects the kind of device. Is there any step or something to improve this?

Suggested solution For issue #1. Catch and show more coming from the mqtt. For #2. Perhaps to check some other parts of the mqtt to detect which kind of device is before showing it as unknown?

Describe alternatives you've considered I don't want to turnback to deconz and hb hue, I consider both excellent products but I feel I can understand and learn more with zigbee2mqtt and hb z2m.

Additional context For the second issue described, here are the logs. In zigbee2mqtt it shows the kind of device while in hb z2m log the get comes null. zigbee2mqtt info 2021-01-30 10:16:08: Device '0x588e81fffef787f5' is supported, identified as: Lidl Livarno Lux smart LED light strip 2.5m (HG06104A) info 2021-01-30 14:43:03: 0x588e81fffef787f5 (0x588e81fffef787f5): HG06104A - Lidl Livarno Lux smart LED light strip 2.5m (Router)

homebridge-z2m [1/30/2021, 18:28:00] [zigbee2mqtt] Publish to 'zigbee2mqtt/0x588e81fffef787f5/get': '{}' [1/30/2021, 18:28:00] [zigbee2mqtt] Publish to 'zigbee2mqtt/bridge/config/devices/get': ''

Are you willing to contribute to this feature? Yes, but as an advance user and I dont know to code this plugin... of course any I can do, I will try.

Thanks Best Regards Ware

itavero commented 3 years ago

Looking at the log messages in your issue, I think you are using the "old" version of the plugin. Please have a look at the new version, which can be installed via homebridge-z2m@next. This will be published to the latest channel in the coming weeks. It does require that you run at least Zigbee2MQTT v1.17.0

I think the new version solves your second issue, if I understand you correctly.

With regards to the first issue, turning on the debug mode in Homebridge should give you a bit more logging. Not 100% sure what you are looking for exactly.

warevlc commented 3 years ago

Hi

Thanks for your quick response. Indeed updating to next worked for me. I then tried to pair a new device and it worked 100% transparent, amazing.

Just to clarify I was using the version 0.0.10. I will give a try to the debug mode you suggested, I just find interesting to see or to find the devices variations (on/off, temp changes, sensor changes, etc) in the hb log... it must be a common practice from when I was using deconz + hb hue.

Keep doing so well please!

Cheers Ware

itavero commented 3 years ago

@warevlc Thanks for the feedback. I'm still a bit "anxious" about putting this major release on latest, as it will very likely "break" someone's current setup. Messages like this give me confidence that it will (generally) be alright πŸ‘