Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge πŸŒ‰, get rid of your proprietary Zigbee bridges πŸ”¨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.09k stars 1.68k forks source link

Zigbee2mqtt is not working on the iHost #19222

Closed christianbalz closed 1 year ago

christianbalz commented 1 year ago

What happened?

I've installed three Docker containers on iHost, including HA, eclipse-mosquitto and zigbee2mqtt. All of them are up and running.

I've made numerous attempts, installations and flashed Tasmota on two Sonoff Zigbee Bridge devices, one regular and the other PRO.

I can't perform many checks from iHost and I can only gather information from the logs.

iHost version 1.10.1 Home Assistant 2023.10.0 eclipse-mosquitto version 2.0.18 Zigbee2MQTT version 1.33.1 Sonoff Bridge Tasmota Version 13.1.0 (zbbridge)

configuration.yaml

frontend:
  port: 8099
  host: 0.0.0.0
  auth_token: admin
homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://192.168.15.95:18883
serial:
  port: tcp://192.168.15.7:8888
  adapter: ezsp
advanced:
  log_level: debug
  channel: 20
  pan_id: 6760
  network_key: GENERATE

Any suggestions on what might be happening?

What did you expect to happen?

Zigbee2mqtt is not accessing the specified IP and port, showing 'ERR_CONNECTION_REFUSED.'

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.33.1

Adapter firmware version

13.1.0

Adapter

Sonoff Bridge Tasmota Version 13.1.0 (zbbridge)

Debug log

debug 2023-10-08 21:57:38: Loaded state from file /app/data/state.json
info  2023-10-08 21:57:39: Logging to console and directory: '/app/data/log/2023-10-08.21-57-38' filename: log.txt
info  2023-10-08 21:57:39: Starting Zigbee2MQTT version 1.33.1 (commit #7e63039)
info  2023-10-08 21:57:39: Starting zigbee-herdsman (0.19.0)
debug 2023-10-08 21:57:39: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/app/data/coordinator_backup.json","databaseBackupPath":"/app/data/database.db.backup","databasePath":"/app/data/database.db","network":{"channelList":[20],"extendedPanID":[221,221,221,221,221,221,221,221],"networkKey":"HIDDEN","panID":6760},"serialPort":{"adapter":"ezsp","path":"tcp://192.168.15.7:8888"}}'
error 2023-10-08 21:58:00: Error while starting zigbee-herdsman
error 2023-10-08 21:58:00: Failed to start zigbee
error 2023-10-08 21:58:00: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
error 2023-10-08 21:58:00: Exiting...
error 2023-10-08 21:58:00: Error: Connection not initialized
    at Ezsp.execCommand (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:551:19)
    at Ezsp.version (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/ezsp.ts:349:35)
    at Driver.startup (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:141:25)
    at EZSPAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/adapter/ezspAdapter.ts:165:16)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
    at Zigbee.start (/app/lib/zigbee.ts:60:27)
    at Controller.start (/app/lib/controller.ts:101:27)
    at start (/app/index.js:107:5)
darkeagle76 commented 1 year ago

Hello @christianbalz, Would you please describe with settings you entered in the iHost docker configuration for zigbee2mqtt? I'm getting an error on startup:

FATAL: A required add-on configuration option is missing! FATAL: Please set a value for the 'data_path' option.

A detailed description of your setup (including eclipse-mosquito) will be very appreciated. D

rdaraujo commented 10 months ago

Hello @christianbalz, Would you please describe with settings you entered in the iHost docker configuration for zigbee2mqtt? I'm getting an error on startup:

Hello @darkeagle76

The docker image for zigbee2mqtt is koenkk/zigbee2mqtt. For configuration I'm using as: image

Also, install filebrowser/filebrowser docker image to be able to browse the configuration files. image image

And eclipse-mosquitto: image image

Hope it helps.

yesuaambros commented 9 months ago

Hello @rdaraujo

I have tried your steps and I have the mosquitto-server working. I have tested devices with Tasmota and Home Assistant, seeing them correctly.

However, if I try to configure the zigbee2mqtt docker to be able to integrate my zigbee devices, it does not launch the docker, I get an error:

info 2024-01-25 17:19:08: Logging to console and directory: '/app/data/log/2024-01-25.17-19-08' filename: log.txt info 2024-01-25 17:19:09: Starting Zigbee2MQTT version 1.35.1 (commit #9eaaa0f) info 2024-01-25 17:19:09: Starting zigbee-herdsman (0.30.0) error 2024-01-25 17:19:10: Error while starting zigbee-herdsman error 2024-01-25 17:19:10: Failed to start zigbee error 2024-01-25 17:19:10: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions error 2024-01-25 17:19:10: Exiting... error 2024-01-25 17:19:10: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/ttyACM0' at SerialPort. (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28) at SerialPort._error (/app/node_modules/@serialport/stream/dist/index.js:82:22) at /app/node_modules/@serialport/stream/dist/index.js:118:18

Could the ihost device be another?

How could I give the "koenkk/zigbee2mqtt docker" the option of:

 devices:
   - /dev/ttyACM0:/dev/ttyACM0

thanks

rdaraujo commented 9 months ago

Hello @yesuaambros

Here they say the device is /dev/ttyS4, but it didn't work for me.

To change it, you edit the file zigbee2mqtt > configuration.yaml with filebrowser addon.

yesuaambros commented 9 months ago

error 2024-01-26 07:48:16: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions error 2024-01-26 07:48:16: Exiting... error 2024-01-26 07:48:16: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/ttyS4' at SerialPort. (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28) at SerialPort._error (/app/node_modules/@serialport/stream/dist/index.js:82:22) at /app/node_modules/@serialport/stream/dist/index.js:118:18

No, it doesn't work either.

I understand that the original problem is that the reference to the device must be shared when creating the container. And in this case, the record would be missing:

devices:

I don't know if there is a way to put it.

Have you not made zigbee2mqtt work on the sonoff ihost?

rdaraujo commented 9 months ago

Unfortunately, I didn't succeed.

Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/ttyACM0'

yesuaambros commented 9 months ago

After contacting Sonoff they gave me the solution, (although I don't like it very much, it is functional)

They tell me that it is not possible to use the zigbee interface for two entities and it can only be used in the ewelink Cube.

But you can put a zigbee USB stick, create a new docker image of zigbee2mqtt and when you give it advanced options, the stick and the docker interface to associate it with appear.

You can see the thread here:

https://forum.ewelink.cc/t/ihost-devices-in-home-assistant/27626/6

Greetings