How to set up ZWavejs2MQTT on a Raspberry Pi and integrate it with Home-Assistant

I got it working (but only 1 time) …
I could access the config page from my LAN, but after rebooting the Pi it seems to be stuck in a “restart job” loop

2022-03-16T11:47:02+01:00 systemd[1]: snap.zwavejs2mqtt.zwavejs2mqtt.service: Main process exited, code=exited, status=1/FAILURE
2022-03-16T11:47:02+01:00 systemd[1]: snap.zwavejs2mqtt.zwavejs2mqtt.service: Failed with result 'exit-code'.
2022-03-16T11:47:02+01:00 systemd[1]: snap.zwavejs2mqtt.zwavejs2mqtt.service: Consumed 12.708s CPU time.
2022-03-16T11:47:02+01:00 systemd[1]: snap.zwavejs2mqtt.zwavejs2mqtt.service: Scheduled restart job, restart counter is at 3.
2022-03-16T11:47:02+01:00 systemd[1]: Stopped Service for snap application zwavejs2mqtt.zwavejs2mqtt.
2022-03-16T11:47:02+01:00 systemd[1]: snap.zwavejs2mqtt.zwavejs2mqtt.service: Consumed 12.708s CPU time.
2022-03-16T11:47:02+01:00 systemd[1]: Started Service for snap application zwavejs2mqtt.zwavejs2mqtt.
2022-03-16T11:47:02+01:00 zwavejs2mqtt.zwavejs2mqtt[2402]: Missing plug: «serial-port»
2022-03-16T11:47:02+01:00 zwavejs2mqtt.zwavejs2mqtt[2363]: OPTIONAL plug
2022-03-16T11:47:02+01:00 zwavejs2mqtt.zwavejs2mqtt[2363]: Connect with: $ sudo snap connect zwavejs2mqtt:serial-port
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]: 2022-03-16 11:47:12.854 INFO APP: Version: 6.4.1.db1571e
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]: 2022-03-16 11:47:12.864 INFO APP: Application path:/snap/zwavejs2mqtt/330/lib/node_modules/zwavejs2mqtt/server
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:  ______                       _     ___                  _   _
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]: |___  /                      (_)   |__ \                | | | |
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:    / /_      ____ ___   _____ _ ___   ) |_ __ ___   __ _| |_| |_
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:   / /\ \ /\ / / _` \ \ / / _ \ / __| / /| '_ ` _ \ / _` | __| __|
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:  / /__\ V  V / (_| |\ V /  __/ \__ \/ /_| | | | | | (_| | |_| |_
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]: /_____|\_/\_/ \__,_| \_/ \___| |___/____|_| |_| |_|\__, |\__|\__|
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:                             _/ |                      | |
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:                            |__/                       |_|
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]: 2022-03-16 11:47:12.929 WARN STORE: scenes.json not found
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]: SyntaxError: /var/snap/zwavejs2mqtt/330/nodes.json: Unexpected end of JSON input
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:     at JSON.parse (<anonymous>)
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:     at _readFile (/snap/zwavejs2mqtt/330/lib/node_modules/zwavejs2mqtt/node_modules/jsonfile/index.js:25:16)
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:     at StorageHelper._getFile (/snap/zwavejs2mqtt/330/lib/node_modules/zwavejs2mqtt/server/lib/jsonStore.js:51:20)
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:     at StorageHelper.init (/snap/zwavejs2mqtt/330/lib/node_modules/zwavejs2mqtt/server/lib/jsonStore.js:42:25)
  • what am I doing wrong ?
  • and also : how can I get it to completely start itself upon boot (e.g. in case of power failure) ?

Thanks
Pascal

I got it working using snap, following the instructions of Goncezilla Matt, …but only 1 time …
I could access the config page from my LAN, but after rebooting the Pi it seems to be stuck in a “restart job” loop

2022-03-16T11:47:02+01:00 systemd[1]: snap.zwavejs2mqtt.zwavejs2mqtt.service: Main process exited, code=exited, status=1/FAILURE
2022-03-16T11:47:02+01:00 systemd[1]: snap.zwavejs2mqtt.zwavejs2mqtt.service: Failed with result 'exit-code'.
2022-03-16T11:47:02+01:00 systemd[1]: snap.zwavejs2mqtt.zwavejs2mqtt.service: Consumed 12.708s CPU time.
2022-03-16T11:47:02+01:00 systemd[1]: snap.zwavejs2mqtt.zwavejs2mqtt.service: Scheduled restart job, restart counter is at 3.
2022-03-16T11:47:02+01:00 systemd[1]: Stopped Service for snap application zwavejs2mqtt.zwavejs2mqtt.
2022-03-16T11:47:02+01:00 systemd[1]: snap.zwavejs2mqtt.zwavejs2mqtt.service: Consumed 12.708s CPU time.
2022-03-16T11:47:02+01:00 systemd[1]: Started Service for snap application zwavejs2mqtt.zwavejs2mqtt.
2022-03-16T11:47:02+01:00 zwavejs2mqtt.zwavejs2mqtt[2402]: Missing plug: «serial-port»
2022-03-16T11:47:02+01:00 zwavejs2mqtt.zwavejs2mqtt[2363]: OPTIONAL plug
2022-03-16T11:47:02+01:00 zwavejs2mqtt.zwavejs2mqtt[2363]: Connect with: $ sudo snap connect zwavejs2mqtt:serial-port
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]: 2022-03-16 11:47:12.854 INFO APP: Version: 6.4.1.db1571e
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]: 2022-03-16 11:47:12.864 INFO APP: Application path:/snap/zwavejs2mqtt/330/lib/node_modules/zwavejs2mqtt/server
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:  ______                       _     ___                  _   _
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]: |___  /                      (_)   |__ \                | | | |
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:    / /_      ____ ___   _____ _ ___   ) |_ __ ___   __ _| |_| |_
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:   / /\ \ /\ / / _` \ \ / / _ \ / __| / /| '_ ` _ \ / _` | __| __|
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:  / /__\ V  V / (_| |\ V /  __/ \__ \/ /_| | | | | | (_| | |_| |_
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]: /_____|\_/\_/ \__,_| \_/ \___| |___/____|_| |_| |_|\__, |\__|\__|
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:                             _/ |                      | |
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:                            |__/                       |_|
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]: 2022-03-16 11:47:12.929 WARN STORE: scenes.json not found
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]: SyntaxError: /var/snap/zwavejs2mqtt/330/nodes.json: Unexpected end of JSON input
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:     at JSON.parse (<anonymous>)
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:     at _readFile (/snap/zwavejs2mqtt/330/lib/node_modules/zwavejs2mqtt/node_modules/jsonfile/index.js:25:16)
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:     at StorageHelper._getFile (/snap/zwavejs2mqtt/330/lib/node_modules/zwavejs2mqtt/server/lib/jsonStore.js:51:20)
2022-03-16T11:47:12+01:00 zwavejs2mqtt.zwavejs2mqtt[2486]:     at StorageHelper.init (/snap/zwavejs2mqtt/330/lib/node_modules/zwavejs2mqtt/server/lib/jsonStore.js:42:25)
  • what am I doing wrong ?
  • and also : how can I get it to completely start itself upon boot (e.g. in case of power failure) ?

Thanks
Pascal