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

[Solved]: turned out that I didn’t have a Xiaomi Aqara wireless switch, but a Xiaomi MiJia wireless switch. They are not the same!

Do you think that this is something that could be supported by the bridge?

https://us.boschsecurity.com/en/products/intrusionalarmsystems/premiseswireless/zigbee/zigbee_products_56458

they aren’t supported by HA right now. They will pair and show up as the correct sensor but they never trigger an event and then very shortly they disappear from the system and no longer show up in the entities list.

It would be really nice if we someone could get these useable since they are fairly cheap. And many people here already have them since we assumed they would work in HA.

@finity if you have one, you could try it and see what it’s produced. A lot of different support seems to be added for harder to pair devices, so I don’t see why this can’t be done.

I don’t have the equipment to build the bridge so I can’t really try it. And I’d rather not spend the money for the equipment unless I have at least some confidence that it will work. I’ve already got lots of little pieces/parts sitting around from failed attempts at a workaround for other devices that wouldn’t “just work”.

I was hoping someone smarter than me could look at it and give their best educated guess.

1 Like

I don’t see why it wouldn’t, it supports ZHA 1.2 and also works with smartthings: https://community.smartthings.com/t/bosch-motion-sensor-isw-zpr1-wp13-smartthings-v2-hub/115631/13

In case you have the equipment, feel free to open an issue on github so we can help supporting it.

I have the sensor (actually I have 4 of them just waiting for them to be supported somehow) just not any of the equipment to build the controller bridge.

If you think it will be able to be integrated then I could pull the trigger & order the controller equipment. As I understand it from the wiki all I need are:

CC debugger:

CC2531 Zigbee USB Sniffer:

and a downloader cable:

I already have a spare Raspberry Pi laying around.

I really hope it works. It’s not the $25 wasted that bugs me. It’s my wife nagging me about the growing pile of un-usable stuff laying around that I have to keep trying to justify! :laughing:

I know. My wife tidied the office yesterday. “You need to do something about all these wires and bits!”

2 Likes

I have https://nl.aliexpress.com/item/SmartRF04EB-CC1110-CC2530-ZigBee-Module-USB-Downloader-Emulator/32758806132.html?spm=a2g0s.9042311.0.0.27424c4d01Nfvp that is working.

If you have other sensors or things just sitting around, ping the model list, maybe something else can be put in working condition.

You could maybe take on this offer?

The website says that is no longer available.

Right now all I have in a zigbee “flavor” are 4 of the Bosch motion sensors.

I tested this one as well (links from my orders) and it’s working: https://nl.aliexpress.com/item/Free-shipping-SmartRF04EB-CC1110-CC2530-ZigBee-Module-USB-Downloader-Emulator-MCU-NEW/32783177858.html?spm=a2g0s.9042311.0.0.48a94c4dylSqgu

So these are all in one solutions that don’t need a full debugger/cable/sniffer set up?

I’ve ordered a few of these to flash so If you’re interested in one PM me and we can discuss shipping etc and as soon as they arrive to me they’ll be shipped out with custom firmware. I won’t be taking any payments until I physically receive the devices from China.
Hope this helps some people out!

1 Like

If anyone from Romania is interested, I am happy to flash for free their CC2531 (Cluj area).

I’m no longer getting state changes for my xiaomi door sensor. I haven’t changed anything since originally setting up the bridge. Any help figuring out the issue would be helpful.

This is the error i’m getting.

2018-06-07T18:43:51.551Z - warn: Error while starting zigbee-shepherd, attempting to fix... (takes 60 seconds)

I’ve restarted the pi and now it looks like its connected. However, its not publishing any state changes to HA. I also don’t see any state changes in the log.

2018-6-7 19:11:43 INFO Connected to MQTT server
2018-6-7 19:11:43 INFO MQTT publish, topic: 'zigbee2mqtt/bridge/state', payload: 'online'
2018-6-7 19:11:43 WARN `permit_join` set to  `true` in configuration.yaml.
2018-6-7 19:11:43 WARN Allowing new devices to join.
2018-6-7 19:11:43 WARN Set `permit_join` to `false` once you joined all devices.
2018-6-7 19:11:43 INFO Zigbee: allowing new devices to join.

If I turn on discovery both on HA and zigbee2mqtt, do devices automatically appear as a sensor on HA?

Within HA configuration.yaml, I have:

mqtt:
  discovery: true

zigbee2mqtt configuration.yaml:
homeassistant: true

I restart Z2M first and then HA. Z2M shows the following in the logs:

Jun 07 20:58:33 zigbeepi npm[934]: 2018-6-7 20:58:33 INFO MQTT publish, topic: 'homeassistant/binary_sensor/0x00158d0001b149eb/contact/config', payload: '{"payload_on":false,"payload_off":true,"value_template":"{{ value_json.contact }}","device_class":"door","json_attributes":["battery","voltage"],"state_topic":"zigbee2mqtt/window_ensuite_velux","availability_topic":"zigbee2mqtt/bridge/state","name":"window_ensuite_velux","unique_id":"0x00158d0001b149eb_contact_zigbee2mqtt"}'

Looking within States on HA, there’s no sensor that looks like this.

Am I misunderstanding how this works? I’m hoping for a sensor entry similar to how Xiaomi works within HA.

I tried the manual method by turning off discover on HA and Z2M, and using the following sensor:

binary_sensor:
  - platform: "mqtt"
    state_topic: "zigbee2mqtt/window_ensuite_velux"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_on: false
    payload_off: true
    value_template: "{{ value_json.contact }}"
    device_class: "door"
    json_attributes:
      - "battery"
      - "voltage"

This just results in the following entry in States:
binary_sensor.mqtt_binary_sensor off friendly_name: MQTT Binary sensor device_class: door

I think I’m misunderstanding something here? :slight_smile:

1 Like

Start HA with with discover mqtt on, then start zigbee2mqtt and HA will get the string you posted over mqtt and create the devices. check the dev state panel < > and filter off the friendly names you put in the zigbee2mqtt configuration and you should see the devices.

Thanks! I’ll try that this evening.

1 Like

Still have no luck getting the door sensor to display the correct status. Is there anyway to unpair the door sensor and try connecting it again?

Hi All,

Not sure what I’m doing wrong here, I have followed the Getting Started Wiki and flashed the USB sniffer. Then followed the instructions to install the Hassio Add-on for zigbee2mqtt. I have added discovery: true to my mqtt component in HA configuration.yaml. Looking at the logs for the zigbee2mqtt add-on, I see the following repeating over and over. Anyone know what’s going on? Have I missed something in the instructions?

[Info] Configuration file found. Will overwrite configurable fields with values from add-on configuration
[Info] Configuration written to /share/zigbee2mqtt/configuration.yaml
[2018-06-08 22:43:38] PM2 log: Launching in no daemon mode
[2018-06-08 22:43:38] PM2 log: Starting execution sequence in -fork mode- for app name:npm id:0
[2018-06-08 22:43:38] PM2 log: App name:npm id:0 online
[email protected] start /app
node index.js
module.js:538
throw err;
^
Error: Cannot find module ‘zcl-packet’
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (/app/lib/zigbee.js:6:19)
at Module._compile (module.js:635:30)
at Object.Module._extensions…js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
npm
ERR! code ELIFECYCLE
npm ERR! errno 1
npm
ERR! [email protected] start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-06-09T05_43_47_403Z-debug.log
[2018-06-08 22:44:05] PM2 log: App [npm] with id [0] and pid [25], exited with code [1] via signal [SIGINT]
[2018-06-08 22:44:05] PM2 log: Starting execution sequence in -fork mode- for app name:npm id:0
[2018-06-08 22:44:05] PM2 log: App name:npm id:0 online
[email protected] start /app
node index.js
module.js:538
throw err;
^
Error: Cannot find module ‘zcl-packet’
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (/app/lib/zigbee.js:6:19)
at Module._compile (module.js:635:30)
at Object.Module._extensions…js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
npm
ERR! code ELIFECYCLE
npm ERR!
errno 1
npm
ERR! [email protected] start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-06-09T05_44_14_045Z-debug.log