ioBroker / ioBroker.zwave

Legacy Z-Wave integration using OpenZWave
Other
24 stars 7 forks source link

ZWave is not working after 1.4 upgrade #48

Closed AlexVVVx closed 5 years ago

AlexVVVx commented 5 years ago

After upgrade to version 1.4 ZWave adapter cannot start. Here is what I see in the log: host.iobroker 2019-05-06 17:18:06.721 warn instance system.adapter.zwave.0 terminated due to SIGABRT Caught 2019-05-06 17:18:06.721 error by controller[1]: what(): Manager.cpp:1768 - InvalidValueIDError (101) Msg: Invalid ValueID passed to GetValueLabel Caught 2019-05-06 17:18:06.720 error by controller[1]: terminate called after throwing an instance of 'OpenZWave::OZWException' Caught 2019-05-06 17:18:06.719 error by controller[0]: Unhandled OpenZWave notification: 31 zwave.0 2019-05-06 17:18:06.481 info State created: zwave.0.NODE6.THERMOSTAT_MODE.Mode_1 = undefined, index = 0, comClass = 64, instance = 1 Also I noticed that /usr/local/lib/libopenzwave.so.1.6 is added to the lib directory. But it looks like this new library is not used. pi@iobroker:~ $ ldd -r /opt/iobroker/node_modules/openzwave-shared/build/Release /openzwave_shared.node says libopenzwave.so.1.4 => /usr/local/lib/libopenzwave.so.1.4

Thanks

libopenzwave.so.1.4 => /usr/local/lib/libopenzwave.so.1.4 (0x76e04000)

AlCalzone commented 5 years ago

Also I noticed that /usr/local/lib/libopenzwave.so.1.6 is added to the lib directory. But it looks like this new library is not used.

Can you try following https://github.com/ioBroker/ioBroker.zwave#known-issues to see if this changes the used library to 1.6?

AlexVVVx commented 5 years ago

I did it right after the upgrade. It fixed problem - no such file or directory. But then I faced the problem I mentioned in the issue.

AlCalzone commented 5 years ago

Ok, then try the following (based on https://github.com/OpenZWave/node-openzwave-shared/issues/150#issuecomment-286212237):

  1. delete /usr/local/lib/libopenzwave.so.1.4
  2. sudo ldconfig -r
  3. rebuild openzwave-shared by calling node-gyp configure and node-gyp rebuild. This needs to happen in /opt/iobroker/node_modules/openzwave-shared (or in /opt/iobroker/node_modules/iobroker.zwave/node_modules/openzwave-shared if that exists)

Afterwards it should use the 1.6 version. I hope the OpenZWave::OZWException goes away then. If not, we need to dig deeper what OZW complains about.

TeJay24 commented 5 years ago

I've got the same error as AlexVVx. Attached the log from /opt/iobroker/node_modules/openzwave-shared and from the webinterface log section iobroker_log.txt OZW_Log.txt Maybe its usefull. Latest Adapter and OpenZWave.

AlCalzone commented 5 years ago

@TeJay24 It seems to crash when loading the data from your EUROtronic thermostat. I remember that there was some more work to do to make that functional - maybe its not compatible with the 1.6 release?

Can you try to delete the ozw cache file? Should be named something like zwscene_cd00e834.xml in the same directory as OZW_Log.txt.

TeJay24 commented 5 years ago

@AlCalzone deletet but did not work With 1.4 the thermostat was working. So it should work if the EUROtronis isn't available? Attached new Log. OZW_Log.txt

AlCalzone commented 5 years ago

@TeJay24 I opened an issue in the OZW repository: https://github.com/OpenZWave/open-zwave/issues/1785 Hope they can help us figure out whats wrong.

AlexVVVx commented 5 years ago

I have deleted and rebuit... Same error still exists...

AlCalzone commented 5 years ago

@AlexVVVx Can you please post your OZW_Log.txt too?

cFire112 commented 5 years ago

I have the Same Problem. So I've tried to install the Version 1.3.1 via 'npm install iobroker.zwave@1.3.1 --unsafe-perm --production --save --prefix "/opt/iobroker"' but this crashes with 'npm ERR! Failed at the iobroker.zwave@1.3.1 preinstall script.' NPM.log

AlCalzone commented 5 years ago

Older versions are broken right now because they compile OpenZWave directly from their master branch, which is now incompatible. You'll have to wait until I rework the installation routine so it uses the old files. In the meantime if you have an OZW_Log.txt I would be glad to take a look at it.

cFire112 commented 5 years ago

Thank you for the work you do for us all!! I'm sorry I have no OZW log anymore :/ but I've tried much. I took a completly new ZWave netzwork. no Devices added. Everything worked fine. Then i added the first Device. And the "Caught 2019-05-06 17:18:06.721 error by controller[1]: what(): Manager.cpp:1768 - InvalidValueIDError" Error occured. I've tried the Devolo (Danfoss) room thermostat, eurotronic Zwave Spirit and fibaro wall plug. Every Time the same error. I repeated the test everytime with an completle clean network without any node. So I think this error is not device specific :/

AlCalzone commented 5 years ago

@all: If you have some time, please uninstall OpenZWave completely and reinstall this adapter as described in https://github.com/ioBroker/ioBroker.zwave/pull/49

That version installs the 1.4 version of OZW, hoping the error is gone then.

AlexVVVx commented 5 years ago

Here is my OZW_log OZW_Log.txt

Thank you

AlCalzone commented 5 years ago

@AlexVVVx what device is your Node 9 ? Node 6 appears to be the thermostat in question, but the log looks like Node 9 crashes the driver. So far it does seem like the thermostat is the culprit here.

AlexVVVx commented 5 years ago

Node 6 and Node 9 are both thermostats - Eurotronic Spirit. They worked fine with previous zwave adapter version.

AlCalzone commented 5 years ago

Please try version 1.4.1, which I just released in latest. You might have to uninstall completely like I described in #49. If the error still persists, feel free to reopen this issue.

AlexVVVx commented 5 years ago

I do not see 1.4.1 in the adapter list. There is still 1.4.0.

AlCalzone commented 5 years ago

The adapter list is only updated twice a day. You can install it manually using the console (after uninstalling like I described in #49):

cd /opt/iobroker
npm i iobroker.zwave

Afterwards you can just re-add your instance back using the admin UI

AlexVVVx commented 5 years ago

It says - npm ERR! undefined ls-remote... Thank you for your instructions

TeJay24 commented 5 years ago

I've got the following error. Error

2019-05-09T07_48_49_218Z-debug.log

AlCalzone commented 5 years ago

@AlexVVVx It seems you don't have git installed. Run apt-get install -y git and try again.

@TeJay24 Something is wrong with your filesystem. I think the easiest is to delete either the package.json or the complete zwave folder: rm /opt/iobroker/node_modules/iobroker.zwave/package.json or rm -rf /opt/iobroker/node_modules/iobroker.zwave Then try again.

TeJay24 commented 5 years ago

Did not work. Log attached. 2019-05-09T08_49_42_216Z-debug.log

AlCalzone commented 5 years ago

Thats a different error. In which folder did you execute that command? It should be in /opt/iobroker. Did you delete the entire directory or just package.json? If only the file, try the entire directory.

TeJay24 commented 5 years ago

The entire folder via rm -rf /opt/iobroker/node_modules/iobroker.zwave and the command was executed in opt/iobroker

AlCalzone commented 5 years ago

@TeJay24 Something is very strange on your system. Did you at any point npm link iobroker.zwave from /opt/iobroker/node_modules/iobroker.zwave? That would explain why npm is looking for the files there. Can you also post your /opt/iobroker/package.json?

AlCalzone commented 5 years ago

If you created a symlink, /usr/local/lib/node_modules (or similar) should contain a symlink with the name iobroker.zwave. Deleting that should fix it.

TeJay24 commented 5 years ago

Deletet the package.json and replaced it with the version from github. After that i could install the zwave adapter. Its working but I had to to a ldconfig after the installation. But that's not a big point.

AlCalzone commented 5 years ago

So no more crashes? :+1:

TeJay24 commented 5 years ago

No more crashes. The EUROtronics Thermostat is now recognized probably. I can change values again.

KevinK4711 commented 5 years ago

A slightly related topic wr. To ioBroker/Z-Wave/Eurotronic Thermostat Has somebody of you guys already made it possible to feed the thermostat with an external "Current Temperature" from an external sensor? Is that possible using the latest version?

AlexVVVx commented 5 years ago

@AlCalzone I have just installed 1.4.1... I confirm - it is working. Thank you for your time. That would be good if you continue with OZW 1.6. I have another issue opened - https://github.com/ioBroker/ioBroker.zwave/issues/40#issue-367291142 So I hope 1.6 could help