After upgrade to 2022.08.06 zigbee2mqtt doesn't work

data_path: /config/zigbee2mqtt
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: "-d -d"
  log: false
mqtt:
  base_topic: zigbee2mqtt
serial:
  port: tcp://10.13.35.12:6638

this is what the logs show

Zigbee2MQTT:info  2022-08-22 09:12:21: Logging to console and directory: '/config/zigbee2mqtt/log/2022-08-22.09-12-21' filename: log.txt
Zigbee2MQTT:info  2022-08-22 09:12:21: Starting Zigbee2MQTT version 1.27.0 (commit #unknown)
Zigbee2MQTT:info  2022-08-22 09:12:21: Starting zigbee-herdsman (0.14.46)
Zigbee2MQTT:error 2022-08-22 09:12:21: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-08-22 09:12:21: Failed to start zigbee
Zigbee2MQTT:error 2022-08-22 09:12:21: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2022-08-22 09:12:21: Exiting...
Zigbee2MQTT:error 2022-08-22 09:12:21: SyntaxError: Unexpected token 

Is your serial port correct? That error sort of suggests : might be a token out of place.

serial: 
port: /dev/ttyACM0

tcp://10.13.35.12:6638 looks incorrect to me…

no it is correct that’s how a non usb stick configuration looks like. This is a virtual machine without usb passthrough. So the gateway is a zigstar and networked.

1 Like

Did a rollback lost few days of sensor data but now everything is working again !

Trying to do the upgrade again. To see if it is consistent or if that something didn’t go wrong just once.

EDIT: seems like everything is working now. Noticed that if doing “ha core update” that this is more successfull then the webinterface.

And a little while after nothing has changed !!?? And again it won’t start !!!???

[core-ssh 2022-08-22.20-27-47]$ cat log.txt 
info  2022-08-22 20:27:47: Logging to console and directory: '/config/zigbee2mqtt/log/2022-08-22.20-27-47' filename: log.txt
info  2022-08-22 20:27:47: Starting Zigbee2MQTT version 1.27.0 (commit #unknown)
info  2022-08-22 20:27:47: Starting zigbee-herdsman (0.14.46)
error 2022-08-22 20:27:47: Error while starting zigbee-herdsman
error 2022-08-22 20:27:47: Failed to start zigbee
error 2022-08-22 20:27:47: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
error 2022-08-22 20:27:47: Exiting...
error 2022-08-22 20:27:47: SyntaxError: Unexpected token  in JSON at position 0
    at JSON.parse (<anonymous>)
    at Function.open (/app/node_modules/zigbee-herdsman/src/controller/database.ts:19:35)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:124:34)
    at Zigbee.start (/app/lib/zigbee.ts:58:47)
    at Controller.start (/app/lib/controller.ts:101:27)
    at start (/app/index.js:109:5)

Also other icons of other addons don’t show in the side menu either anymore.

    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 902, in _async_update_data
    for repo in store_data.get("repositories", [])
AttributeError: 'NoneType' object has no attribute 'get'

ohter modules don’t work either, …?? esphome 502 gateway error when restarting the module it does come back online.

Not that it helps…
But I’ve had a few restarts overnight and z2m has started up fine on the 2022.8.6
No token errors.

I understand maybe it’s worth looking into, however I’m thinking of making a backup doing a complete reinstall instead. Because I’ve been updating since centos 6. Maybe a clean install would be better. If i only could make a proper backup.

It’s not just this module which seems unstable. It’s strange used to be really stable.

1 Like

Something is wrong in the old configuration, removed /config/zigbee2mqtt and started over and now everything works. Not sure why or what is incompatible with the current version.

1 Like

I ran into similiar issues (more than once now). You may want to check database.db. In my case, the file only contained a large number of @ symbols instead of a JSON datastructure. Restoring that file from a backup solved the problem. I have no idea though how that file got corrupted.