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

Thats how it worked for mwe too :slight_smile:

Edit:
For security reasons, just remember to set permit_join to false when done adding devices and maybe add the card from github where you can easily set it to true when needed.

thanks for this, 1 question:

You have the topic as “topic: ‘zigbee2mqtt/hue_dimmer_bed2’” where i can see in my logs:

“state_topic”:“zigbee2mqtt/0x001788010670e11c”

Would I just rename the “0x001788010670e11c” to say “hue_dimmer_bed” in home assistant? Or is it something I need to change in mqtt?

Guess it doesn’t really matter other than easier to identify! :slight_smile:

I just renamed the sensors in HA “states” page. No need any mqtt changes.

hi! thanks for sharing the code - I’ve implemented it, works great :slight_smile:
about the icon template not working - maybe it’s because you’ve got wrong entity names?
I’m guessing that your line:

{% if states.sensor.zigbee_installed_version.state == states.sensor.zigbee_github_version.state %}

should look like this:

{% if states.sensor.zigbee2mqtt_installed_version.state == states.sensor.zigbee2mqtt_github_version.state %}

[but I’m not sure, because right now I need to update my zigbee2mqtt so I don’t know if the icon would change, right now I have the outline variant displayed still]

ok, I was happy too fast :wink: it’s working in terms of “showing me that there is a (new) version X.X on github” but it can’t find my installed one.

I’m guessing that cat /opt/zigbee2mqtt/package.json needs a “standard” installation of Home Assistant, and not the HassOS image? my /opt/ folder is totally empty when I ssh to my RPi3…

I’m afraid that it’s balancing on the off-topic line, but is there any way to read version on HassOS/addon installation?

look at this post for more dimming with buttons. I shared my script in that post.

renaming can be done in ziggbee2mqtt (look at the documentation), there’s also a nice node-red dashboard available for that. I renamed at ziggbee2mqtt devices that’s more consistent than only masking the friendly name in hass

Does anyone have an examples of how they have integrated groups into HA? I have configured a Zigbee2Mqtt group:

Now I am unsure of how create an entity I can interact with in HA? An MQTT switch or light for example?

Thank you very much! I even found how to make my Osram bulbs (that are not working with a Philips bridge 1st generation)

Maybe I’ve missed it, but how does this protocol replace a hub with the updating process? I have the Ikea tradfri hub, but want to make sure all my appliances update when new firmware is available. Is that possible with zigbee2mqtt? Or would I need the hub for that any way?

Are you not concerned that future firmware updates could restrict your devices to the very proprietary hub you that you no longer wish to use?

Of course. Before I update, I always check the change log. But most of the times is a fix, and in that case I do like to update the device.

Ok, I wasn’t aware manufactures would warn anyone in a change log before modifying firmware which could enforce proprietary communications between their devices and their hubs.

I don’t think z2m supports firmware update. That’s a disadvantage if you own such devices.

I try to install zigbee2mqtt on hass.io, but I get following errors when starting it first time.
What could be wrong?
I also noticed that there is no zigbee2mqtt folder in /share, should it be automatically created?

./run.sh: line 10:    10 Segmentation fault      (core dumped) python3 set_config.py 
"$CONFIG_PATH" "$DATA_PATH"
2019-04-07T14:44:05: PM2 log: Launching in no daemon mode
2019-04-07T14:44:05: PM2 log: App [npm:0] starting in -fork mode-
2019-04-07T14:44:05: PM2 log: App [npm:0] online
> [email protected] start /zigbee2mqtt-1.2.1
> node index.js
fs.js:115
throw err;
^
Error: ENOENT: no such file or directory, open '/share/zigbee2mqtt/configuration.yaml'
at Object.openSync (fs.js:439:3)
at Object.readFileSync (fs.js:344:35)
at readYaml (/zigbee2mqtt-1.2.1/lib/util/settings.js:103:29)
at read (/zigbee2mqtt-1.2.1/lib/util/settings.js:111:15)
at getSettings (/zigbee2mqtt-1.2.1/lib/util/settings.js:75:51)
at Object.get (/zigbee2mqtt-1.2.1/lib/util/settings.js:247:52)
at Object.<anonymous> (/zigbee2mqtt-1.2.1/lib/util/logger.js:10:24)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
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-04-07T11_44_11_157Z-debug.log
2019-04-07T14:44:11: PM2 log: App [npm:0] exited with code [1] via signal [SIGINT]
2019-04-07T14:44:11: PM2 log: App [npm:0] starting in -fork mode-
2019-04-07T14:44:11: PM2 log: App [npm:0] online
> [email protected] start /zigbee2mqtt-1.2.1
> node index.js
fs.js:115
throw err;
^
......

A big thanks to all involved in this project!

This was the last ToDo before Burning my Wink hub! Or exploding!. Or dipping in acid! :smiling_imp:

Many Thanks.

I’ve a problem with my xiaomi aqara temp sensor: i see it on HA but temperature is always the same. They don’t update the state!
So i’d like to update/reinstall zigbee2mqtt but now i see there are 2 github repository from my last visit: zigbee2mqtt and zigbee2mqtt.io

What’s the correct one? (i don’t use hassio, but HA on a rasbian)

There are indeed 2 github repositories, 1 for the codebase and 1 for the documentation.
zigbee2mqtt is the one you need.
zigbee2mqtt.io is the documentation as explained in the readme: zigbee2mqtt

Hi all, I have an odd problem with my Osram zigbee plug, i.e. I use it in 2 automations to power on and off 2 internal surveillance cameras if any triggers happens, in particular I used the sensor person with 2 device tracker, 1 gps and 1 wifi (router fritzbox), so when I leave home and the person sensor is set to not home, the plug is switched on, when I return home, the plug is switched off (I have some false positive but are acceptable).
This introduction to expone the problem; I have 1 automation that restarts zigbee2mqtt addon because some xiaomi sensors don’t publish their state and data at hassio restart, and even if I restart manually the zigbee2mqtt addon, the problem is still present: the Osram zigbee plug is switched on, not involving any automation, only for the fact the addon is restarted. I have 4 of those plugs, the othres 3 I use with Alexa and the app, only 1 is integrated with zigbee usb key. I tried many ways but don’t know how to resolve so I ask here.
Thank you.
P.S. @lolorc I saw you use Osram plugs, did you have this problem, if using hassio and zigbee2mqtt addon?

I am having some inconsistencies with a couple of my GE Link Bulbs that seem to be just on the edge of being able to receive the signal from zigbee2mqtt. About 25% of the time my bulb will not switch on/off on the first try - I can then then retry and get it to come on usually after 1 extra attempt. I thought that I would address this issue by setting QOS = 1, like this:

devices:
  '0x7ce52400000b0a8a':
    friendly_name: Garage1
    id: '0x7ce52400000b0a8a'
    qos: 1
    retain: true
  '0x7ce52400000bc363':
    friendly_name: MBR
    id: '0x7ce52400000bc363'
    qos: 1
    retain: true
  '0x7ce52400000c2d23':
    friendly_name: Garage2
    id: '0x7ce52400000c2d23'
    qos: 1
    retain: true
  '0x7ce524000011a510':
    friendly_name: Carolina
    id: '0x7ce524000011a510'
    qos: 1
    retain: true

This does not seem to actually set QOS to 1 - when I look at the message with MQTT.fx - I see this:

image

All show QOS = 0

Am I doing something wrong?

I have a bunch of Aquara Wall Switches (not wireless), both single or double button versions. And I still haven’t found a solution to one problem. Probably someone already solved this one…

In automations, is there a way to differentiate whether the switch was toggled programmatically by some automation or it is toggled manually by human (physically pressed)? Really struggling with this.