OpenZWave / Zwave2Mqtt

Fully configurable Zwave to MQTT gateway and Control Panel using NodeJS and Vue
MIT License
356 stars 92 forks source link

[bug] NPM Crashes when saving settings and wont rerun #801

Closed simplenotezy closed 4 years ago

simplenotezy commented 4 years ago

Version

Build/Run method

Zwave2Mqtt version: 4.0.5 Openzwave Version: 1.4.79

Describe the bug I went to the config interface as per the documentation, and upon hitting save, I got this error:

pi@homebridge:~/Zwave2Mqtt $ npm start

> zwave2mqtt@4.0.5 start /home/pi/Zwave2Mqtt
> node bin/www

  z2m:Store settings.json not found +0ms
  z2m:Store scenes.json not found +10ms
  z2m:Store nodes.json not found +1ms
  z2m:App Zwave2Mqtt version: 4.0.5 +0ms
  z2m:App Application path:/home/pi/Zwave2Mqtt +1ms
  z2m:Gateway Zwave settings are not valid +0ms
  z2m:App Listening on port 8091 +0ms
GET / 200 69.371 ms - 1371
GET /static/css/app.49d9e97656a80838335d.css 200 19.310 ms - 614855
GET /static/js/app.36fe7c6bcb9064a45c75.js 200 16.503 ms - 1233255
  z2m:App New connection uWnP4JPEpx7XS0UOAAAA +12s
GET /static/logo.png 200 2.772 ms - 10014
GET /static/fonts/MaterialIcons-Regular.fa3334f.woff2 200 10.416 ms - 82492
GET /static/favicons/favicon-32x32.png 200 4.381 ms - 1831
GET /api/settings 200 362.014 ms - 90
GET /api/settings 304 302.720 ms - -
  z2m:Gateway Closing Gateway... +5m
POST /api/settings 200 96.388 ms - 63
Initialising OpenZWave 1.4.79 binary addon for Node.JS.
    OpenZWave Security API is ENABLED
    ZWave device db    : /usr/local/etc/openzwave
    User settings path : /home/pi/Zwave2Mqtt/store
    Option Overrides : --Logging true --ConsoleOutput true --QueueLogLevel 8 --DriverMaxAttempts 9999 --SaveConfiguration true --PollInterval 5000 --AutoUpdateConfigFile true --AssumeAwake true
  z2m:Zwave Connecting to /dev/ttyACM0 +0ms
node: symbol lookup error: /home/pi/Zwave2Mqtt/node_modules/openzwave-shared/build/Release/openzwave_shared.node: undefined symbol: _ZN9OpenZWave7Options6CreateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! zwave2mqtt@4.0.5 start: `node bin/www`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the zwave2mqtt@4.0.5 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2020-10-18T23_06_03_712Z-debug.log

To Reproduce Steps to reproduce the behavior:

  1. Follow this guide: https://github.com/OpenZWave/Zwave2Mqtt#nodejs-or-pkg-version
  2. Open webbrowser at http://192.168.39.180:8091/settings
  3. Fill in your details and click save
  4. See error in npm

Expected behavior App should not crash

robertsLando commented 4 years ago

Initialising OpenZWave 1.4.79 binary addon for Node.JS.

OZW 1.4 isn't supported anymore try with OZW 1.6

simplenotezy commented 4 years ago

Hi @robertsLando. Apologies if I am asking stupid questions, but I just got into this. I installed a Raspberry PI with homebridge yesterday, and I tried following your documentation, but 1.4 is the version I got following that.

Nevertheless, I have tried searching of any 1.4 package, uninstalling, removing the whole Zwave2Mqtt folder and then reinstalling again from scratch.

I'd like some instructions on how to get it working and how I can switch to OZW 1.6. I don't have any requirements to run a 1.4, simply want to get started ;)

robertsLando commented 4 years ago

@simplenotezy I suggest you to use the docker way, it's lot easier for you as everything is setup with just one command

simplenotezy commented 4 years ago

@robertsLando Great thanks! Got any installation guides for setting that up on homebridge/raspberry pi?

robertsLando commented 4 years ago

Nope