Zigbee2mqtt: getting rid of your proprietary Zigbee bridges (Xiaomi, Hue, TRADFRI)

Hi stewxv,

I assumed that the routing would be more dynamic :slight_smile:

Apparently I paired all my devices the wrong way around. I added my Philips Hue bulbs after having added all my other devices!

My Hue dimmer had a signal strength of 3 even though its close to a hue bulb.

After removing and repairing my Hue dimmer it now gets 49 :sunglasses:

Is this somewhere in the set up guide?

I think this is deceiving. I did this with a router and since re-pairing was done very close to the coordinator, linkquality was up there. After a while in its actual location, linkquality dropped considerably again. It retains this info for quite a while though!

You need to re-pair with the router closer than the co-ordinator.
The way the network works is that when you put the router into pairing mode (and/or enable a new item to connect via the co-ordinator), they both are ready to accept a new entry or re-connect if already paired.
When the end device sends out its payload to connect, which ever receives the payload first and responds gets the connection (i.e. closest).
Best to do the pairing right next to each other or with the devices in their actual location.
You could have dynamic repairing, but it means that anyone ā€˜couldā€™ walkpast with a router/co-ordinator with a boosted signal and ā€˜stealā€™ your endpoints, so itā€™s not really used that widely as its not all that safe.
Mind you, you can sniff the transmitted packets anyway so the point is quite moot.

1 Like

Would this device work?

It claims to be a CC2531, but hooks up via Micro USB Cable, instead of having a USB Type A connector, which I prefer.

It depends if they used the reference design for the buttons and LED. Looks like it should work though.

1 Like

Hi

I purchased 3x CC2531 USB sniffers. I am sending them to someone else to flash for me.

Is it correct that the current device limit is 15 per cc2531?

Should i flash 1x cc2531 with the co-ordinator firmware and 2x cc2531 with the router firmware from here - https://github.com/Koenkk/zigbee2mqtt/wiki/Supported-sniffer-devices

Thanks
Kiwi

Iā€™m experiencing a very similar or maybe even the same behaviour. Are you by any chance running 0.77.3? I upgraded today and z2mqtt has rendered useless ever since then. Iā€™m not ruling out a problem on my side, but I donā€™t think I may have changed any relevant stuff

This getting even worse now. Z2MQTT wonā€™t even boot up now. I really donā€™t understand what is going on.

[Info] Configuration file found. Will overwrite configurable               fields with values from add-on configuration
[Info] Configuration written to /share/zigbee2mqtt/configuration.yaml
[2018-09-11T16:15:42.745Z] PM2 log: Launching in no daemon mode
[2018-09-11T16:15:43.640Z] PM2 log: Starting execution sequence in -fork mode- for app name:npm id:0
[2018-09-11T16:15:43.722Z] PM2 log: App name:npm id:0 online
> [email protected] start /zigbee2mqtt-0.1.3
> node index.js
  zigbee2mqtt:info 2018-9-11 16:15:51 Logging to directory: '/share/zigbee2mqtt/log/2018-09-11.16:15:51'
  zigbee2mqtt:info 2018-9-11 16:15:53 Starting zigbee2mqtt version 0.1.3 (commit #unknown)
  zigbee2mqtt:info 2018-9-11 16:15:53 Starting zigbee-shepherd
  zigbee2mqtt:info 2018-9-11 16:16:02 Error while starting zigbee-shepherd, attemping to fix... (takes 60 seconds)
  zigbee2mqtt:info 2018-9-11 16:17:02 Starting zigbee-shepherd
  zigbee2mqtt:error 2018-9-11 16:17:11 Error while starting zigbee-shepherd!
  zigbee2mqtt:error 2018-9-11 16:17:11 Press the reset button on the stick (the one closest to the USB) and start again
  zigbee2mqtt:error 2018-9-11 16:17:11 Failed to start
	{"message":"request timeout","stack":"Error: request timeout\n    at CcZnp.<anonymous> (/zigbee2mqtt-0.1.3/node_modules/cc-znp/lib/ccznp.js:255:22)\n    at Object.onceWrapper (events.js:315:30)\n    at emitOne (events.js:116:13)\n    at CcZnp.emit (events.js:211:7)\n    at Timeout.<anonymous> (/zigbee2mqtt-0.1.3/node_modules/cc-znp/lib/ccznp.js:234:18)\n    at ontimeout (timers.js:498:11)\n    at tryOnTimeout (timers.js:323:5)\n    at Timer.listOnTimeout (timers.js:290:5)"}

every now and then it will eventually come up but then devices wonā€™t respond or update their state. Any ideas what this may be due to?

Just to help rule out 0.77.3, I too am running this version (along with zigbee2mqtt 0.1.3), and all seems to be work ok still. I rebooted the Pi with the zigbee stick and that came up ok. Sorry I canā€™t be of more help.

MQTT Noob hereā€¦ How do I find what attributes a sensor/device will put out (publish?) I have connected a xiaomi sensor and it appears in the log. Whats the next steps? Ive tried reading through the wiki, am I missing something?

Subscribe to every mqtt topic in the command line client and watch the messages go by.

Still working here to with 0.77.3

Honestly, I really canā€™t find an explanation to what happened to me yesterday. It all started with a xiaoli wireless button disappearing of my configuration (I would review the database and it would be gone - though still in my configuration file), then I upgrade to 0.77.3 hoping to fix the problem as I could not re-pair the xiaomi on the previous version, and then it all started. Z2mqtt wouldnā€™t start at all regardless of how many reboots I did, shuffles usb dongles, nothing at all. I give up for several hours, got back to the console, rebooted a few times, swapped my zwave with the 2531 dongle, and BAM! it works again!

I really canā€™t put my finger on what happened :frowning:

Finally had the time to do more testing.

I removed all routers and devices that didnt really work in the places and added those again but with no luck.
put a osram smart plug in the middle of the flat which had the best original linkquality (20) but no other device would pair next to this router or pair but with no improvement of range. I tried the same with the xiaomi plug and the homebrew router but the same.

THe router work fine with acceptable linkquality but does not allow any pairing or extending the range of my network.
Im not sure what else to try.

When you say CLI client what do you mean? I am running HASSIO.

So long you have mqtt auto discovery enabled then all new items will just pop up under your ā€˜overviewā€™ tab.

I do have MQTT discover on. (I have made BRUHS multi sensor and light strip and they just worked) But nothing shows in my entitys list on the dev page. I did rename the sensor in the zigbee2mqtt config yaml. could that be the issue?

If you rename the sensor you will also need to restart HASS if you havenā€™t done so already. Hope that helps.

Hmm still nothing after a restart. Here is my log

[Info] Configuration file found. Will overwrite configurable               fields with values from add-on configuration
[Info] Configuration written to /share/zigbee2mqtt/configuration.yaml
[2018-09-13T19:23:20.608Z] PM2 log: Launching in no daemon mode
[2018-09-13T19:23:21.548Z] PM2 log: Starting execution sequence in -fork mode- for app name:npm id:0
[2018-09-13T19:23:21.628Z] PM2 log: App name:npm id:0 online
> [email protected] start /zigbee2mqtt-0.1.3
> node index.js
  zigbee2mqtt:info 2018-9-13 19:23:30 Logging to directory: '/share/zigbee2mqtt/log/2018-09-13.19:23:29'
  zigbee2mqtt:info 2018-9-13 19:23:32 Starting zigbee2mqtt version 0.1.3 (commit #unknown)
  zigbee2mqtt:info 2018-9-13 19:23:32 Starting zigbee-shepherd
  zigbee2mqtt:info 2018-9-13 19:23:33 zigbee-shepherd started
  zigbee2mqtt:info 2018-9-13 19:23:33 Coordinator firmware version: '20180507'
  zigbee2mqtt:info 2018-9-13 19:23:33 Currently 1 devices are joined:
  zigbee2mqtt:info 2018-9-13 19:23:33 Kitchen Motion (0x00158d000204aa90): unkown - undefined unknown (EndDevice)
  zigbee2mqtt:info 2018-9-13 19:23:33 Connecting to MQTT server at mqtt://homeassistant
  zigbee2mqtt:info 2018-9-13 19:23:34 zigbee-shepherd ready
  zigbee2mqtt:info 2018-9-13 19:23:34 Connected to MQTT server
  zigbee2mqtt:info 2018-9-13 19:23:34 MQTT publish, topic: 'zigbee2mqtt/bridge/state', payload: 'online'

How do I define the sensor?
Apologies for all the noob questions. I appreciate the help. This is a great community!

Via HASSIO itā€™s pretty much impossible.

Get the logs of the sensor from the DB and log from ZB2mqtt and post a thread in the shepherd to get it added.