Zigbee2MQTT @ OpenHab

The same firmware should work with the binding.

1 Like

Odd, the device worked fine on Test RPI that I have with Z2M sotfware.
However the Zigbee binding canā€™t connect to the device. worth writing the firmware from the binding page ?


2020-03-12 17:04:51.745 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_cc2531:ef65986c' changed from UNKNOWN to OFFLINE: Failed to open communications port

2020-03-12 17:04:51.748 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_cc2531:ef65986c' changed from OFFLINE: Failed to open communications port to OFFLINE (COMMUNICATION_ERROR)

2020-03-12 17:05:37.933 [me.event.ThingUpdatedEvent] - Thing 'zigbee:coordinator_cc2531:ef65986c' has been updated.

2020-03-12 17:05:37.948 [hingStatusInfoChangedEvent] - 'zigbee:coordinator_cc2531:ef65986c' changed from OFFLINE (COMMUNICATION_ERROR) to UNKNOWN

2020-03-12 17:05:38.951 [ERROR] [ding.zigbee.handler.ZigBeeSerialPort] - Serial Error: Port null does not exist.

2020-03-12 17:05:38.953 [ERROR] [.cc2531.network.ZigBeeNetworkManager] - Failed to open the dongle.

openhabian@ChuraOH:/$ ls -l /dev/serial/by-id | grep TI
lrwxrwxrwx 1 root root 13 Mar 12 14:22 usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B00194AD80B-if00 -> ā€¦/ā€¦/ttyACM1

You did not configure the serial port for the coordinator Thing.

Wrong copy :slight_smile:

2020-03-12 17:23:29.167 [ERROR] [ding.zigbee.handler.ZigBeeSerialPort] - Serial Error: Port /dev/ttyACM1 does not exist.
2020-03-12 17:23:29.169 [ERROR] [.cc2531.network.ZigBeeNetworkManager] - Failed to open the dongle.

I believe you may need to configure EXTRA_JAVA_OPTS

I followed this one

And now its online. but the binding wiki page is not explain how to discover new items :frowning:

Not sure what wiki page, The official documentation here explains device discovery once the coordinator is online.

Iā€™m looking how to add new device, inclusion mode in Zwave here maybe called discovery, there isnā€™t such switch in the paperUI

Inbox -> Search for Things. -> Zigbee

Nope, nothing pops up

I am not a Zigbee user. Perhaps another user can assist.

Flashed firmware from Zigbee binding page, same things
Controller works, but I canā€™t find how to search for new devices (or its all working and my Aqara device doesnā€™t match or something.

Installed Z2M on test RPI and its able to pair devices.
So, I guess iā€™ll go this path

Hi! You dont need Zigbee bindingā€¦
Install openHAB, mqtt, Z2M, add Z2M user to tty and dialout groups so it can use your usb dongle.
Then configure openHAB and Z2M to use same mqtt broker, all guides on how to configure Z2M(mqtt, adding devices, flashing dongle) are avaliable at https://www.zigbee2mqtt.io/
After that you will be able to see devices in mqtt topics via MQTT Explorer and configure openHAB to control them.
Zigbee binding is cool, but it was not able to work with many devices(xiaomi, aqara, mija) when i gave it a try.
If you are stuck with something specific, feel free to ask, i use it for year and a half, it works quite good.

I actually just finished re-installing everything on Rpi4 last night, with dockers

Hi Everybody,
I set up OpenHab 3.4.1 with a Sonoff Zigbee Dongel.
Everything was working fine Zigbee2MQTT, MQTT Explorer, Mosquitto and I was able to connect all my Zigbee Devices.

Then I had a power outage and my Raspberry Pi 4B hat to restart. Now I am not able to open the Zigbee2MQTT Mask anymore over http://IP:8081

If i ask for the status of zigbee2mqtt.service or mosquitto.service via putty it both gives me the status ā€œactiveā€.
Also MQTT Explorer shows state ā€œonlineā€ via Listener 1883.

Does anybody had the same issue and knows a solution?
Thanks

Check your Zigbee2MQTT configuration.yaml for fontend settings: Frontend | Zigbee2MQTT

Restart and check the logs.

# Stopping Zigbee2MQTT
sudo systemctl stop zigbee2mqtt

# Starting Zigbee2MQTT
sudo systemctl start zigbee2mqtt

# View the log of Zigbee2MQTT
sudo journalctl -u zigbee2mqtt.service -f

To run Zigbee2MQTT as daemon (in background) and start it automatically on boot we will run Zigbee2MQTT with systemctl

I second that @anon71759204 said. Zigbee2mqtt has a frontend that you can view in a browser.

To enable the frontend add the following to your configuration.yaml

Add below to your configuration

frontend:
  #  default 8080 change as required 
  port: 8080

Hey Thanks for the quick reply I think I am already a step closer to finding the solution.

So I adjusted my ā€œzigbee2mqtt.serviceā€ as described in the link.

My ā€œconfiguration.yamlā€ has the input

"
frontend:
  port: 8081
"

I think this is ok right? Because this is my Port for zigbee2mqtt.
With Port 8080 I open the openHAB UI.

After viewing the log as described I got the following error message:
sudo journalctl -u zigbee2mqtt.service -f


Started Zigbee2MQTT.
> zigbee2mqtt@1.30.0 start
 > node index.js
Error: EACCES: permission denied, mkdir '/var/log/zigbee2mqtt'
at Object.mkdirSync (node:fs:1382:3)
at mkdirSyncRecursive (/opt/zigbee2mqtt/node_modules/mkdir-recursive/index.js:199:16)
at mkdirSyncRecursive (/opt/zigbee2mqtt/node_modules/mkdir-recursive/index.js:197:12)
at mkdirSyncRecursive (/opt/zigbee2mqtt/node_modules/mkdir-recursive/index.js:197:12)
at Object.mkdirSync (/opt/zigbee2mqtt/node_modules/mkdir-recursive/index.js:82:10)
at Object.init (/opt/zigbee2mqtt/lib/util/logger.ts:43:12)
at new Controller (/opt/zigbee2mqtt/lib/controller.ts:53:16)
at start (/opt/zigbee2mqtt/index.js:106:18)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
zigbee2mqtt.service: Main process exited, code=exited, status=1/FAILURE
zigbee2mqtt.service: Failed with result 'exit-code'.
zigbee2mqtt.service: Consumed 6.411s CPU time.
zigbee2mqtt.service: Scheduled restart job, restart counter is at 7.
Stopped Zigbee2MQTT.
zigbee2mqtt.service: Consumed 6.411s CPU time.

So I guessed zigbee2mqtt.service had no permission to create a folder.
I created the Folder ā€˜/var/log/zigbee2mqttā€™ by hand.
Afterwards the Error Message changed to

Error: EACCES: permission denied, mkdir '/var/log/zigbee2mqtt/2023-02-02.17-06-53al'

So one step closer I guess. I hope granting permission to zigbee2mqtt.service should do the trick?!
But how? My guess is:

cd /etc/systemd/system/
sudo chown openhab:openhab zibgee2mqtt.service

I did not try it jet because I was not sure. Can anybody confirm that I will not further damage my system :slight_smile:

Thanks in advance

This is not much help but i installed Zigbee2Mqtt via openhabian today and it installed straight away and even recognised the type of dongle i had. It was super easy. No configuration required.