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

is the flashing process the same?

Hey talondnb, your offer to flash cc2531 still good? I’m in Perth & looking to get the USB sniffer. Would be great if I didn’t need to buy the debugger etc.

found the info

Interested too!! I’m using a several months old firmware. Do newer versions contain any important feature or fix?

I am at Abu Dhabi, UAE. I am also interested to know if talondnb offer is still valid :slight_smile:

I offer modded and flashed cc2531 with antenna and a 3d printed case. You can PM me if interested. I do have cc2530 too.

This is how my devices look.

1 Like

How much did the reception of your zigbee usb adapter was improved with this modification?

1 Like

A couple of quick questions from a new user:

What advantages or disadvantages are there in moving my Hue bulbs from the Hue hub to the Z2M stick? Here are the benefits I see, but are there others?

  • Gain additional routers for endpoint devices on Z2M network
  • Ability to use new group feature (however, is this any different from Hue “rooms”)

Can devices belong to more than one group? For example, could I create a group that consists of three bulbs which are all one physical light fixture, and larger group that includes all bulbs in a room (including those in the fixture group)?

Factory resetting Hue bulbs seems difficult as I don’t have a Hue remote. If I manage to get my bulbs reset and paired with Z2M, what is the process to unpair them and add them back to the Hue hub? Would they need to be factory reset with a Hue remote again? I assume this will be useful for future firmware updates or other situations.

Are there any consideration about zigbee channel regarding what mode bulbs run in? I read on some Smartthings forum post about how channel 11 is ZLL protocol, while 14 is a ZHA or something like that. If using Hue & Xiaomi sensors together, is the default channel 11 optimal?

How smooth is dimming or dim-on/off with Z2M vs Hue hub?

Thanks!

@nfh I did not measure it exactly, so this is not a scientific answer, but I can tell you that the link quality rised from around 10 to arround 35 for both of my routers.
Also I have a ikea dimmer that did not work reliable before, after adding the antenna it works fine now. So I’m quite sure that this isn’t a “placebo”. It helped me network to get more reliable.

@hoffsta
I think you could add the following to the advantage list. Recently it is possible to “bind” devices. I did not try this yet, but what it basically does, is linking two devices directly to each other. This comes in handy if you use a dimmer with a bulb. This way they communicate directly with each other (without the bridge, faster, more reliable).
Personally I don’t have hue bulbs in my zigbee2mqtt network because of two reasons, keep ability to update those bulbs.
And Ambilight+Hue (That’s the main reason).
However if i did not have that feature in my tv I would also add the bulbs to zigbee2mqtt (more routers in network).
Adding only those that are not connected to the Tv is no option for me (all or nothing)

Advantages of zigbee2mqtt:

  • cheaper (doesn’t apply to you, since you’ve already bought the hue hub)
  • one hub for multiple ecosystems like Hue, Xiaomi, Sengled, Sylvania, IKEA, etc (if you only use Hue, this doesn’t apply)
  • no hub that will likely call China/Google/Philips/The Illuminati
  • ability to use all zigbee routers in the same network (for moar bigger network muahahah)
  • Sometimes better (than the manufacturer) support for some devices
  • Support for some devices that are otherwise unsupported

Me, personally, I use what’s best for the application. I don’t have hub-phobia, either, so YMMV.

  • I have a Hue hub. My Hue lights are on it because I like the bulb upgrades. I also like the formulas and routines. With this, I save having to create these things in HASS. I don’t add Hue dimmers to the Hue Hub though, because I lose some control. They go elsewhere.
  • I have a Xiaomi Hub. Support is simple. Pairing is simple. I use this for buttons, temperature sensors, and motion sensors.
  • I have a HUSBZB-1. Sengled lights don’t work very well on zigbee2mqtt. But they work flawlessly on ZHA/HUSBZB-1. I also add my Sylvania lights here. They work fine with zigbee2mqtt, but I need them as routers to reach my sengled bulbs. I also use this for Hue Dimmers. I would use zigbee2mqtt, but I can’t seem to get them to pair. They pair instantly with ZHA.
  • I have zigbee2mqtt. I use this for Xiaomi cubes (because they provide more data than the Xiaomi hub does). I’m also investigating using it for Xiaomi VIbration sensors, since the HASS/Xiaomi implementation for this device is quite poor. I haven’t worked out all the kinks yet.

I could easily get rid of the Xiaomi Hub and use just zigbee2mqtt. It works flawlessly for every Xiaomi device I’ve ever tested. But as it stands now, it works just fine with the Xiaomi hub, I enjoy using the hub as a status light and general notification speaker, and there’s no reason to fix something that isn’t broken. I could probably also get rid of the hue hub. The few extra things I use from the hub are something I could easily duplicate in HASS. But, it works for now.

I’d love to move all my Hue/Ikea/Xiaomi devices to Z2M, but having to re-pair all my devices after a firmware update on the CC2531 puts me off going higher than the current ~25 devices currently on there. :frowning:

Thanks for the input! Anyone know if Z2M allows bulbs to belong to multiple or nested groups? The reason I ask is that Hue doesn’t support the ability to group several bulbs as a single fixture (so they dim on/off together), while also belonging to a room (so they all dim on/off together).

If Z2M can do that, it would be worth transitioning to! If not, I don’t see the benefit for my personal setup.

I think the latest version now supports groups (link below takes you to the 1.1.0 release notes):

@jarrah Thanks. Digging into the “groups” discussion on the github page gives me the impression that bulbs can belong to multiple groups, which is huge. Allows for the creation of fixtures inside rooms that Hue hub can’t do! I’ll have to test this out.

Hoping someone can point out someone obvious here, its doing my nut in at the moment.

Made the mistake of doing some config and cleanup while at work today. Updated HA, z2m etc and redid some of the code as I hit some breaking changes along the way.

Now all my automations related to z2m have stopped working and for the life of me cannot figure out why.

This is one example with my Hue remote, I have the same issue with Xiamoi buttons and door sensors connected through it. HA seems to be ‘ignoring’ automations connected to MQTT triggers.

I copied the new sensor and automation code directly from the github config pages as it has been updated since I first put them in. It works, HA sees it and changes the sensors state perfectly fine, it just will not trigger any actions attached to it!

(script.bedside_toggle = working fine on its own and when connected to FLIC button event)

z2m Config:
  '0x0017880104091dba':
    friendly_name: hue_remote_master_bedroom
 
HA YAML
sensor:
  - platform: "mqtt"
    name: HUE Remote - Master Bedroom  
    state_topic: "zigbee2mqtt/hue_remote_master_bedroom"
    availability_topic: "zigbee2mqtt/bridge/state"
    icon: "mdi:gesture-double-tap"
    value_template: "{{ value_json.action }}"
    force_update: true

automation:
  - alias: Bedside Toggle
    hide_entity: false  
    trigger:
      platform: mqtt
      topic: 'zigbee2mqtt/hue_remote_master_bedroom'
    condition:
      condition: template
      value_template: "{{ 'off' == trigger.payload_json.action }}"
    action:
      - service: script.turn_on
        entity_id: script.bedside_toggle

I can see it in the z2m logs:
zigbee2mqtt:info 2019-2-15 22:11:31 MQTT publish: topic 'zigbee2mqtt/hue_remote_master_bedroom', payload '{"battery":100,"linkquality":97,"last_seen":"2019-02-14T20:54:16.623Z","elapsed":1003052,"action":"off"}'

I can see it in HA logs
2019-02-15 22:11:31 DEBUG ... Received message on zigbee2mqtt/hue_remote_master_bedroom: b'{"battery":100,"linkquality":97,"last_seen":"2019-02-14T20:54:16.623Z","elapsed":1003052,"action":"off"}'

2019-02-15 22:11:31 DEBUG ... <Event state_changed[L]: entity_id=sensor.hue_remote_master_bedroom, old_state=<state sensor.hue_remote_master_bedroom=off; friendly_name=HUE Remote - Master Bedroom, ... @ 2019-02-15T22:10:10.396659+00:00>, new_state=<state sensor.hue_remote_master_bedroom=off; friendly_name=HUE Remote - Master Bedroom, ... @ 2019-02-15T22:11:31.182320+00:00>>

But the script does not get run, no mention of it in HA logs at all.

Now this is the absolute kicker, using the other hue remote events (on, press-up, press-down) in the exact same yaml, literally changing ‘off’ to one of the others…it works perfectly…

:japanese_goblin: absolutely killing me this is :speak_no_evil:

Check the status of your automation, it might be accidentally switched off.

1 Like

Check if your automations are on. If you don’t have initial_state set to on in the automations, they are probably off now after upgrading to the new version.

1 Like

Make the state_topic in the sensor and automatisme part the same as the topic topic of z2m.

zigbee2mqtt/0x0017880104091dba

1 Like

O.M.G. I could kiss all of you.

They were all off except the working one. I didn’t even think to look at the state of the automations themselves…

I could cry :rofl:

1 Like

@wixoff could you please confirm the flashing process (and firmware to use) for this device? Thank you in advance.