Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.79k stars 1.64k forks source link

SLZB-06 #23177

Closed ALPF5555 closed 2 months ago

ALPF5555 commented 2 months ago

What happened?

When I try to change the config file to allow the new coordinator to be the coordinator for the Z2M I type in tcp://192.168.1.186:6638 and then when I try to start Z2M it fails and resets the config file back to the USB port in the default setup. I have tried many times and it always goes back to the default settings including going back to localhost. I am using Bookworm 64 bit on a Raspberry Pi 4 with 8GB ram and a 480 GB NVME drive.

What did you expect to happen?

I would have expected the configuration file to stay changed after I have saved it using ctrl X then Y and enter but when Z2M fails to start everything is back to the default settings. I have tried changing and saving the localhost to 192.168.1.10:1883 as that is the location of my Raspberry Pi and the serial port to tcp but it always resets to the default page below. I have tried changing the settings one at a time and then starting but upon failure to start it always defaults to the original config.

Home Assistant integration (MQTT discovery) homeassistant: false

Enable the frontend, runs on port 8080 by default

frontend: true

MQTT settings

mqtt:

MQTT base topic for zigbee2mqtt MQTT messages

base_topic: zigbee2mqtt

MQTT server URL

server: 'mqtt://localhost'

MQTT server authentication, uncomment if required:

user: my_user

password: my_password

Serial settings

serial:

Location of CC2531 USB sniffer

port: /dev/ttyACM0

Advanced settings

advanced:

Let Zigbee2MQTT generate a network key on first start

network_key: GENERATE

Let Zigbee2MQTT generate a pan_id on first start

pan_id: GENERATE

Let Zigbee2MQTT generate a ext_pan_id on first start

ext_pan_id: GENERATE

How to reproduce it (minimal and precise)

all I do is go to the Z2M and look at the config file and see it is not what I had saved. I make the changes and then save it then try to start Z2M but it fails Then when I go back and check the config set up I find it has reverted to the default setup.

zigbee2mqtt@1.38.0 start node index.js

[2024-06-27 10:10:41] info: z2m: Logging to console, file (filename: log.log) [2024-06-27 10:10:41] info: z2m: Starting Zigbee2MQTT version 1.38.0 (commit #6c7d52a) [2024-06-27 10:10:41] info: z2m: Starting zigbee-herdsman (0.49.2) [2024-06-27 10:10:41] error: zh:zstack:znp: Failed to determine if path is valid: 'Error: ENOENT: no such file or directory, lstat '/dev/ttyACM0'' [2024-06-27 10:10:41] info: zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyACM0","baudRate":115200,"rtscts":false,"autoOpen":false} [2024-06-27 10:10:41] error: z2m: Error while starting zigbee-herdsman [2024-06-27 10:10:41] error: z2m: Failed to start zigbee [2024-06-27 10:10:41] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions [2024-06-27 10:10:41] error: z2m: Exiting... [2024-06-27 10:10:41] error: z2m: Error: Error: No such file or directory, cannot open /dev/ttyACM0

Zigbee2MQTT version

1.38

Adapter firmware version

0.9.9 (Mar 3 2023)

Adapter

slzb-06 POE

Setup

On Raspberry Pi plain using Bookworm.

Debug log

No response

andyblac commented 2 months ago

I use a SLZB-06M with no issues (apart from https://github.com/Koenkk/zigbee2mqtt/issues/23164 ), where are you putting the serial config in the add-on config page or in Z2M confuration.yaml ?, I have then in both to be safe.

I see your using Adapter firmware version 0.9.9 (Mar 3 2023), try updating to the latest version for both device and zigbee, see if it helps.

ALPF5555 commented 2 months ago

Hello          I am just putting it into the Config.yaml file.  Regards  On Thursday 27 June 2024 at 10:39:55 BST, Andrew Blackburn @.***> wrote:

I use a SLZB-06M with no issues, where are you putting the serial config in the add-on config page or in Z2M confuration.yaml ?, I have then in both to be safe.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

ALPF5555 commented 2 months ago

I am not using Home Assistant so there is the z2m configuration.yaml file where the changes are normally made. On Thursday 27 June 2024 at 10:39:55 BST, Andrew Blackburn @.***> wrote:

I use a SLZB-06M with no issues, where are you putting the serial config in the add-on config page or in Z2M confuration.yaml ?, I have then in both to be safe.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

andyblac commented 2 months ago

looking at you log, it trying to open a serial port not a tcp port

[2024-06-27 10:10:41] error: zh:zstack:znp: Failed to determine if path is valid: 'Error: ENOENT: no such file or directory, lstat '/dev/ttyACM0''
[2024-06-27 10:10:41] info: zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyACM0","baudRate":115200,"rtscts":false,"autoOpen":false}

unless you using the none LAN version ?, if so make sure your using the correct serial port address.

can you post your configuration.yaml file ?

ALPF5555 commented 2 months ago

Home Assistant integration (MQTT discovery)

homeassistant: false

Enable the frontend, runs on port 8080 by default

frontend: true

MQTT settings

mqtt:

MQTT base topic for zigbee2mqtt MQTT messages

base_topic: zigbee2mqtt

MQTT server URL

server: 'mqtt://localhost'

MQTT server authentication, uncomment if required:

user: my_user

password: my_password

Serial settings

serial:

Location of CC2531 USB sniffer

port: tcp://192.168.1.168:6638

Advanced settings

advanced:

Let Zigbee2MQTT generate a network key on first start

network_key: GENERATE

Let Zigbee2MQTT generate a pan_id on first start

pan_id: GENERATE

Let Zigbee2MQTT generate a ext_pan_id on first start

ext_pan_id: GENERATE

This is the configuration set up I want to save but every time I save it the changes revert back to the default setting where it is looking for a serial port not a tcp port.

andyblac commented 2 months ago

ok try this

homeassistant: false
permit_join: false
advanced:
  network_key: GENERATE
  pan_id: GENERATE
  ext_pan_id: GENERATE
  homeassistant_legacy_entity_attributes: false
  legacy_api: false
  legacy_availability_payload: false
  log_syslog:
    app_name: Zigbee2MQTT
    eol: /n
    host: localhost
    localhost: localhost
    path: /dev/log
    pid: process.pid
    port: 514
    protocol: udp4
    type: '5424'
  last_seen: ISO_8601_local
  transmit_power: 20
  log_level: warning
  channel: 22
frontend:
  port: 8099
device_options:
  legacy: false
availability:
  active:
    timeout: 10
  passive:
    timeout: 1500
mqtt:
  server: mqtt://core-mosquitto:1883
  user: my_user
  password: my_pass
  base_topic: zigbee2mqtt
  keepalive: 60
  reject_unauthorized: true
  version: 4
serial:
  port: tcp://slzb-06.local:6638
  baudrate: 115200
  adapter: ember
  rtscts: false

change channel to suite youself.

ALPF5555 commented 2 months ago

GNU nano 7.2 /opt/zigbee2mqtt/data/configuration.yaml

Home Assistant integration (MQTT discovery)

homeassistant: false

Enable the frontend, runs on port 8080 by default

frontend: true

MQTT settings

mqtt:

MQTT base topic for zigbee2mqtt MQTT messages

base_topic: zigbee2mqtt

MQTT server URL

server: 'mqtt://localhost'

MQTT server authentication, uncomment if required:

user: my_user

password: my_password

Serial settings

serial:

Location of CC2531 USB sniffer

port: /dev/ttyACM0

Advanced settings

advanced:

Let Zigbee2MQTT generate a network key on first start

network_key: GENERATE

Let Zigbee2MQTT generate a pan_id on first start

pan_id: GENERATE

Let Zigbee2MQTT generate a ext_pan_id on first start

ext_pan_id: GENERATE

ALPF5555 commented 2 months ago

that second config is what it automatically changes to after saving the first changes

ALPF5555 commented 2 months ago

pi@raspberrypi:/opt/zigbee2mqtt $ npm start

zigbee2mqtt@1.38.0 start node index.js

[2024-06-27 12:28:01] error: z2m: Error while starting zigbee-herdsman [2024-06-27 12:28:01] error: z2m: Failed to start zigbee [2024-06-27 12:28:01] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions [2024-06-27 12:28:01] error: z2m: Exiting... [2024-06-27 12:28:01] error: z2m: Error: Failed to start EZSP layer with status=HOST_FATAL_ERROR. at EmberAdapter.initEzsp (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:850:19) at EmberAdapter.start (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:2683:24) at Controller.start (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/controller/controller.ts:127:29) at Zigbee.start (/opt/zigbee2mqtt/lib/zigbee.ts:62:27) at Controller.start (/opt/zigbee2mqtt/lib/controller.ts:109:27) at start (/opt/zigbee2mqtt/index.js:107:5)

I copied and pasted your code into the Config.yaml file but after trying again the errors I got are above and the configuration.yaml file has reset itself back to the original see below

Home Assistant integration (MQTT discovery)

homeassistant: false

Enable the frontend, runs on port 8080 by default

frontend: true

MQTT settings

mqtt:

MQTT base topic for zigbee2mqtt MQTT messages

base_topic: zigbee2mqtt

MQTT server URL

server: 'mqtt://localhost'

MQTT server authentication, uncomment if required:

user: my_user

password: my_password

Serial settings

serial:

Location of CC2531 USB sniffer

port: /dev/ttyACM0

Advanced settings

advanced:

Let Zigbee2MQTT generate a network key on first start

network_key: GENERATE

Let Zigbee2MQTT generate a pan_id on first start

pan_id: GENERATE

Let Zigbee2MQTT generate a ext_pan_id on first start

ext_pan_id: GENERATE

andyblac commented 2 months ago

can you ping slzb-06.local? also can you go to http://slzb-06.local to access your web frontend for the device, if not try replacing it with the ip in the config.

ALPF5555 commented 2 months ago

Hello Yes I can ping the device and can go to webpage and see the config and set up as well as the status etc. I can connect to it and can see it but Z2M cannot and when it does not start it changes the config.yaml file back to the default.

Operational mode: | Zigbee-to-Ethernet

Connection status: Connected
DHCP: On
IP Address: 192.168.1.186
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1
Connection speed: 100 Mbps
MAC address: A0:B7:65:4D:7C:37

andyblac commented 2 months ago

what firmware is on the device ? it have to be the last version

Screenshot 2024-06-27 at 12 42 08
ALPF5555 commented 2 months ago

My firmware is March 3rd 2023 I do not know if there is an updated version or where it is at this time

ALPF5555 commented 2 months ago

ESP32 Firmware ver: | 0.9.9 (Mar 3 2023) ESP32 version: | ESP32-D0WDQ5 ESP32 temperature: | 45.56 °C ESP32 frequency: | 2 cores @ 240 MHz ESP32 flash size: | 16 Mb, external ESP32 Free heap: | 194 / 295 KiB CC2652P version: | CC2652PP1FRGZR CC2652P frequency: | 48 MHz CC2652P flash size: | 352 Kb

andyblac commented 2 months ago

My firmware is March 3rd 2023 I do not know if there is an updated version or where it is at this time

that your issue, it too old for Z2M, goto your WEBUI in the device update the device firmware first, then update the zigbee firmware. to what mine is above.

andyblac commented 2 months ago
Screenshot 2024-06-27 at 12 55 17 Screenshot 2024-06-27 at 12 55 28 Screenshot 2024-06-27 at 12 55 36 Screenshot 2024-06-27 at 12 55 46
ALPF5555 commented 2 months ago

OK thank you very much I will try this thank you very much for your help

ALPF5555 commented 2 months ago

Thank you very much for all your help everything is up and running the device has the new firmware and connected to Z2M. Once again thank you so much for all your help. Have a great day

andyblac commented 2 months ago

No problem glad you got it working in the end.

andyblac commented 2 months ago

think you can close this issue now ?