Add Zigbee2Mqtt device

From your configuration.yaml file, which you say is empty. You’ll have to find out why that’s empty first. Permissions issue? Are you sure zigbee2mqtt is properly installed and running?

Once you have access, you need to add a friendly_name parameter for your device.

I installed both the binding and the one in the misc tab. What can I do to figure out the issue from here?

Wait a minute: from where? zigbee2mqtt is a 3rd party program: nothing to do with openHAB…

The Mqtt binding and the MQTT Broker Moquette. I also need to install Mqtt on the pi itself?

I think you’re getting confused. Do you want to use the native openHAB Zigbee binding, or do you want to use the 3rd party zigbee2mqtt, and then the native openHAB MQTT binding?

Do you have zigbee2mqtt installed? You need to have zigbee2mqtt installed if you want to use zigbee2mqtt…

Also, remove the Moquette broker and install the 3rd party Mosquitto MQTT broker instead: Moquette is no longer maintained.

Install https://mosquitto.org/documentation/ as you broker on the PI (it is the one broker/server/data passer)

I assume you are running https://www.zigbee2mqtt.io/getting_started/running_zigbee2mqtt.html

Configure zigbee2mqtt to work correctly following the above guide

Install the MQTT Explorer linked in above post.

See if you can see messages from your sensor in the MQTT broker using MQTT Explorer as it will subscribe to all topics.

Then look at openhab as it is a MQTT client using the MQTT binding

Until you get the sensor working with MQTT Explorer stop looking at openHAB as it will not work and you are working blind.

By all means ask as many questions here as you need,

I am attempting to start zigbee2mqtt, but I keep getting the following error:

pi@raspberrypi:/opt/zigbee2mqtt $ npm start

> zigbee2mqtt@1.16.1 start /opt/zigbee2mqtt
> node index.js

Zigbee2MQTT:info  2020-11-23 17:19:39: Logging to console and directory: '/opt/zigbee2mqtt/data/log/2020-11-23.17-19-37' filename: log.txt
Zigbee2MQTT:info  2020-11-23 17:19:39: Starting Zigbee2MQTT version 1.16.1 (commit #4978d09)
Zigbee2MQTT:info  2020-11-23 17:19:39: Starting zigbee-herdsman...
Zigbee2MQTT:error 2020-11-23 17:20:01: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2020-11-23 17:20:01: Failed to start zigbee
Zigbee2MQTT:error 2020-11-23 17:20:01: Exiting...
Zigbee2MQTT:error 2020-11-23 17:20:01: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:94:31)
at Generator.throw (<anonymous>)
at rejected (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:25:65)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zigbee2mqtt@1.16.1 start: `node index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the zigbee2mqtt@1.16.1 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!     /home/pi/.npm/_logs/2020-11-24T01_20_01_315Z-debug.log

I tried editing the config with and tried ttyUSB0 and ttyUSB1, but both still cause the error.

I’ve been doing research and I think my USB Stick isn’t compatible with Zigbee2Mqtt. I have a Nortek USB Stick.

Correct.

If I buy a supported USB Stick how hard is it to transfer the ones on the old one to a new one?

You wouldn’t transfer - just unpair from the Nortek stick, and pair with the new stick.

But I would question why you would do that - you have a perfectly fine Zigbee controller with the Nortek: why not use the Zigbee binding?

If you go with zigbee2mqtt, you need to make sure you read ALL the documentation before you start: for example, you must be aware that you need to flash firmware into the new stick?

My issue is my Zigbee contact sensors die or become out or range and don’t notify me. I researched ones that will alert that and was told Mqtt communicates with them constantly and would alert me when they lose connection.

Is there a better way to do this?

Please describe exactly your current setup, because it’s still not clear to me whether this relates to openHAB at all.

Hardware, software, add-ons, bindings, configurations etc.

I am hosting latest release of openHAB on a Raspberry Pi. I have the Nortek USB stick with Zigbee and Zwave connection. I have 3 contact sensors, two are normal zigbee and the other is a zigbee2mqtt. I am trying to find a system that will alert me when a sensor basically goes missing. Currently, the two zigbee sensors die or sometimes lose signal, I want a notification anytime any of my sensors lose contact with the hub.

What do you mean by this? What makes the sensor “zigbee2mqtt”?

I’m fairly sure you can do this with rules already, with your existing system. What have you tried so far?

Yeah you can detect when a thing goes offline.

@Nexollo
The choice is yours. I recomend using the openHAB binding but ultimatly it is your choice.

Do you want to use mqtt or binding?

I got the Aqara Contact sensor, with the zigbee connection it only gives a switch, but I think with the mqtt connection I get contact, battery, and link quality for the sensor.

Does it take a while though or is it fairly quick? Since the sensors are idle until contact change or a big temperature change, it doesn’t notice while they are gone.

Are either able to work with the Nortek USB, for the mqtt or binding option?

You set the timout value.

I am not sure if the stick will work with both.

Try the hardware you have with the binding first

When you say use the hardware and binding, do you mean the Zigbee2Mqtt sensor and the Mqtt binding? Because I tried following your instructions but I can’t get Zigbee2Mqtt to start

No you have a Nortek USB stick - Hardware
Use the openHAB Zigbee Binding
https://www.openhab.org/addons/bindings/zigbee/