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

i bought them from a local webshop here: https://www.wifimedia.eu/nl/icasa-dimmer.html?channable=e5112.MTYxNTY2NDA5

I have found them on alibaba too for a better price but they didn’t want to do business with me, saying i was a retailer…

Me too.
I tried to buy 10 with the objective of using half and reselling the rest on here or on zigbee2mqtt/
Sunricher was not prepared to sell to me unless I was a business with website etc

Hello People,

I recently got Zigbee2mqtt working on my HA that runs ons my Xpenology nas. I put in the usb sniffer and it showed up right away in the VM manager to link to my vm!!

After that i added a new gen Aqara switch, wich works fine for on/off. But i realized it didn’t have the Double and Hold options. So i ordered new ones. The new ones (or rather older ones ?? ) have the three options i want.

Now comes my problem, i want to be able to use one button to controll a Xiaomi Philips Zhirui downlight.

This light has 1 cool white and 1 warm white output. And i aim to tap the switch to turn it on, wich turns the light on in the state it got turned off. And then i like to change cw to ww or vise versa with a double click. Later on i would like to use the Hold.click to change brightness but one step at the time!!

My problem is, i don’t know how to make the double.click into a toggle function to switch between colors. Is there anyone that could help me get going ?

1 Like

I found out all the Tradfri series have very weak antennas. Compared to a Xiaomi temp sensor which is about 7 meters from hassio and having almost full signal, both the lamp and the multibutton I have from IKEA are at most 4 meters and are gasping to find signal.
I had to mod the CC2531 with an external antenna to keep things working properly.
Also to make the bulb go into pairing was a PITA.
If you use a tradfri bulb in between devices it will work as a router so it probably expand the coverage, but that’s just theory on my side as I’ve never tested that to be sure

Do it as an automation. If double click is triggered, change the light to CW or WW.
With the hold button it will be a bit confusing, since you will have to make the brightness go to 100% and recycle, but doable as well.
You can find easily which message the button sends if you go to the mqtt messages log and double click or hold the button.
It would be better though to get a twisting button to have proper brightness setup
For example, this is my automation for one of the buttons I use to turn on/off the light and another to start/stop music and another one to turn on/off living room tv and pc

- id: ButtonLight
  alias: Turn on/off stairlight when button is pressed
  trigger:
  - platform: state
    entity_id: sensor.0x000d6ffffe1f896f_action
    to: toggle
  action:
  - service: light.toggle
    entity_id: light.0x000b57fffe9151b8_light
    
- id: UpMusic
  alias: Play/Stop MPD when button up is clicked
  trigger:
  - platform: state
    entity_id: sensor.0x000d6ffffe1f896f_action
    to: brightness_up_click
  action:
    service: media_player.toggle
    data:
      entity_id: media_player.mpd
      
- id: koditv
  alias: Turn on/off tv and kodi based on state
  trigger:
  - platform: state
    entity_id: sensor.0x000d6ffffe1f896f_action
    to: brightness_down_click
  action:
  - service: script.turn_on
    data_template:
      entity_id: "{% if is_state('media_player.kodi', 'off') %}
      script.lvrmon
        {% else %}
        script.lvrmoff
        {% endif %}"

As you can see for the light and the music I only toggle them as I can physically see/hear if they are working or not, so I don’t care to have checkpoints. For the PC on the other hand, I check for the KODI instanse so it won’t break it when trying to turn off the pc from mains. It calls a script which turns off the TV, the home cinema, the lights surrounding the tv and shuts down the pc

For those starting and looking to flash devices; this gentleman posted a 5 minute video on how to flash the stick utilizing only a raspberry PI. Nothing else required and quite simple.

1 Like

I used this tutorial to flash my CC2531 with a raspberry, but with only downloader cable for 2$ and few extra jumper cables, it looks much cleaner and easier way without any soldering and bending :slight_smile:

Hi, since a week, i’ve got this error. Can’t find anything about it in this Forum.

    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
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/2019-08-05T12_28_20_318Z-debug.log
2019-08-05T14:28:24: PM2 log: App [npm:0] exited with code [1] via signal [SIGINT]
2019-08-05T14:28:26: PM2 log: App [npm:0] starting in -fork mode-
2019-08-05T14:28:26: PM2 log: App [npm:0] online
> [email protected] start /zigbee2mqtt-1.5.1
> node index.js
  zigbee2mqtt:info 8/5/2019, 2:28:31 PM Logging to directory: '/share/zigbee2mqtt/log/2019-08-05.14-28-29'
  zigbee2mqtt:info 8/5/2019, 2:28:31 PM Starting zigbee2mqtt version 1.5.1 (commit #unknown)
  zigbee2mqtt:info 8/5/2019, 2:28:31 PM Starting zigbee-shepherd
/zigbee2mqtt-1.5.1/node_modules/zigbee-herdsman/dist/cc-znp/index.js:45
                    debug('The serialport ' + self._sp.path + ' is opened.');
                                                       ^
TypeError: Cannot read property 'path' of null
    at Timeout.setTimeout [as _onTimeout] (/zigbee2mqtt-1.5.1/node_modules/zigbee-herdsman/dist/cc-znp/index.js:45:56)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
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/2019-08-05T12_28_32_544Z-debug.log
2019-08-05T14:28:37: PM2 log: App [npm:0] exited with code [1] via signal [SIGINT]
2019-08-05T14:28:37: PM2 log: App [npm:0] starting in -fork mode-
2019-08-05T14:28:37: PM2 log: App [npm:0] online
> [email protected] start /zigbee2mqtt-1.5.1
> node index.js
  zigbee2mqtt:info 8/5/2019, 2:28:42 PM Logging to directory: '/share/zigbee2mqtt/log/2019-08-05.14-28-40'
  zigbee2mqtt:info 8/5/2019, 2:28:42 PM Starting zigbee2mqtt version 1.5.1 (commit #unknown)
  zigbee2mqtt:info 8/5/2019, 2:28:42 PM Starting zigbee-shepherd
/zigbee2mqtt-1.5.1/node_modules/zigbee-herdsman/dist/cc-znp/index.js:45
                    debug('The serialport ' + self._sp.path + ' is opened.');
                                                       ^
TypeError: Cannot read property 'path' of null
    at Timeout.setTimeout [as _onTimeout] (/zigbee2mqtt-1.5.1/node_modules/zigbee-herdsman/dist/cc-znp/index.js:45:56)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
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/2019-08-05T12_28_43_492Z-debug.log
2019-08-05T14:28:47: PM2 log: App [npm:0] exited with code [1] via signal [SIGINT]
2019-08-05T14:28:47: PM2 log: App [npm:0] starting in -fork mode-
2019-08-05T14:28:47: PM2 log: App [npm:0] online
> [email protected] start /zigbee2mqtt-1.5.1
> node index.js
  zigbee2mqtt:info 8/5/2019, 2:28:53 PM Logging to directory: '/share/zigbee2mqtt/log/2019-08-05.14-28-51'
  zigbee2mqtt:info 8/5/2019, 2:28:53 PM Starting zigbee2mqtt version 1.5.1 (commit #unknown)
  zigbee2mqtt:info 8/5/2019, 2:28:53 PM Starting zigbee-shepherd
/zigbee2mqtt-1.5.1/node_modules/zigbee-herdsman/dist/cc-znp/index.js:45
                    debug('The serialport ' + self._sp.path + ' is opened.');
                                                       ^
TypeError: Cannot read property 'path' of null
    at Timeout.setTimeout [as _onTimeout] (/zigbee2mqtt-1.5.1/node_modules/zigbee-herdsman/dist/cc-znp/index.js:45:56)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
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.

REFRESH

My Config is:

{
  "data_path": "/share/zigbee2mqtt",
  "devices": "devices.yaml",
  "groups": "groups.yaml",
  "homeassistant": true,
  "permit_join": false,
  "mqtt": {
    "base_topic": "zigbee2mqtt",
    "server": "mqtt://homeassistant",
    "user": "XXXX",
    "password": "XXXX"
  },
  "serial": {
    "port": "/dev/ttyACM0"
  },
  "advanced": {
    "pan_id": 6754,
    "channel": 11,
    "network_key": [
      1,
      3,
      5,
      7,
      9,
      11,
      13,
      15,
      0,
      2,
      4,
      6,
      8,
      10,
      12,
      13
    ],
    "availability_blacklist": []
  },
  "ban": [],
  "whitelist": [],
  "queue": {}
}

Maybe someone had the same error. My Girlfriend is driving me crazy, because my motion sensors doesn’t turn on the lights anymore. The Situation here is critical :grimacing:

Have you tried unplugging and re-plugging your Zigbee usb stick? I’ve had a similar issue when I rebooted my BeagleBone Black which got resolved by unplug/re-plug.

Ok, i’ve tested it and nothing changes.

I’m not sure, but the Device Name seems not correct for me. It seems to me, that the name is too long :man_shrugging:

I’m using RaspBee as my generic Zigbee bridge

Well I just flashed a router and coordinator with the “not enough tech” video. Removed the plastic cover on the dupont connectors to make space, added a bit of tape to keep isolation. No soldering and all done in minutes as he describes.

@Nerdletics looks like you should reboot and then check the device name. The errors your log showed seem to indicate the devjice name is wrong.

I just started playing with this. I’m running the component in docker and when I included the zigbee-shepherd-converters volume, which is to add “new devices” meaning not already listed in the docs; I got exactly the same error.

Since I’m using already supported devices (Xiaomi sensors) I just unbound (removed ) the volume and error gone. I was able to start adding devices following that.

Thx @nickrout . Reboot doesn’t help. But your help with the device name pointed me in the right direction.
I don’t know, what problem the stick had, but reflashing the stick solves the problem. Now everything works fine again. Thx

Hello everyone,

anybody else having trouble with the latest release of zigbee2mqtt? I’ve seen the comment regarding some breaking changes in 1.5.1 and read the article here: https://github.com/danielwelch/hassio-zigbee2mqtt and I think I managed to partially fix the issues but somethings still don’t work. Anybody else has gone throught the update process and can give me some guidance on this?

These are my questions:

  1. Previously one had the configuration part in the add-on window and a configuration file. The configuration file would overwrite the values contained in that file, otherwise the add-on configuration will be used. Is this still the case? I don’t think it is because when I change something in the add-on it seems to also write that information in the file too.
  2. Devices: do I need to paste the device configuration in the add-on window? I previously had that information in the file and I now don’t know if I should edit the new configuration file, update the add-on. At the momento my configuration does not explicitly display any device
  "devices": "[]",

yet I can confirm I see mqtt messages passing through… I assume the usb stick is somehow keeping track of the previously- paired devices???
3. I’m also under the impression that now zigbee devices use a slightly different sintax but I can’t put my finger on this statement.
4. The add-on keeps complaining about it being unable to ping one of my devices (a xiaomi plug) but it seems to be “actionable” and I can read the consumption off it

 zigbee2mqtt:error 8/8/2019, 10:59:51 PM Failed to ping '0x00158d000--f35ca'

Any feedback would be most appreciated.

Thanks,

For those experiencing troubles, note that with 1.5.1 devices are expected to reside in a separate file called devices.yaml. See: https://www.zigbee2mqtt.io/configuration/configuration.html

I fixed my problems and also managed to address the usb stick via device-by-id :slight_smile:

Hi all,

I have a question regarding zigbee2mqtt and ikea Tradfri GU10 spots.

My Tradfri GU10 bulbs are switched on and off using relays. I have about 60 of these GU10 spots. I know that a coordinate has a limit of 20 direct children. Can those Tradfri GU10 spots be used as routers or not? Since I turn them off using relays, I assume not. So I guess this means I will need to add some ikea Tradfri smart plugs and use these as routers?

Do keep in mind that the Tradfri smart plugs are poor repeaters. I have 3 of them around my house and the signal quality of device messages hopping through them is pretty low. You can give it a try and if it doesn’t help return them to Ikea I guess. Probably best to get a dedicated repeater with a lot more power (e.g. CC2530 + CC2591).

Thx for the tip!