shnhrrsn / homebridge-openzwave

OpenZWave platform for Homebridge.
MIT License
18 stars 4 forks source link

How to add zwave nodes #1

Open jmonsma opened 4 years ago

jmonsma commented 4 years ago

Managed to install the plugin on homebridge, but is there a way to add the nodes? I'm using the Z-Stick Gen5 - Aeotec, RPi 3b+, node 12.14

shnhrrsn commented 4 years ago

Hi @jmonsma!

You should see a z-stick accessory in whatever your default room is (usually the room the homebridge is in).

Once you tap into the the accessory there should be three switches: Add Node, Add Secure Node and Remove Node.

Flip on Add Node and then put your z-wave device into pairing, once it joins the network the switch will automatically flip back.

It may take a few minutes to appear in HomeKit while it polls the device for capabilities.

I’ll update the README for instructions on adding new devices, an oversight on my part!

Avoid secure nodes for now (should only be needed for devices like locks, which I don’t have support for just yet) because it needs a key first, I’m still working through a UX on how to generate the key and store in in config.

Lastly — this is still under heavy development. I’m using it in my house with about 20 nodes, and 1.0.5 resolved most of my issues, but there is a tendency for HomeKit to “overwhelm” the z-stick and commands will timeout until the queue clears. I’m working on adding priority to the next version as well as better throttling.

If you notice issues with your devices, let me know what they are and I’ll work on getting them supported!

jmonsma commented 4 years ago

That would be nice, i managed to see the Add Node buttons, forgot to add the user to the dialout group.

But for some reasons it wont add devices. It start openzwave correctly, and running MinOzW with the correct port works. On homebridge startup, it now logs, Could Not Open OZW Log File. but after that it scans for zwave: [1/22/2020, 5:58:02 PM] [OpenZWave] Initializing openzwave platform... Initialising OpenZWave 1.6.1018 binary addon for Node.JS. OpenZWave Security API is ENABLED ZWave device db : /usr/local/etc/openzwave User settings path : /usr/lib/node_modules/homebridge-openzwave/node_modules/openzwave-shared/build/Release/../../ Option Overrides : --ConsoleOutput false --Logging false --SaveConfiguration false

[1/22/2020, 5:58:09 PM] [OpenZWave] Node Available: ZW090 Z-Stick Gen5 EU [1/22/2020, 5:58:09 PM] [OpenZWave] Finished Scanning

Unfortunately the Add Node button does not do anything at the moment. Even after reinstalling.

Once i think it did work, the add node, but crashed giving an error and i had to restart the server to be able to use the button again:

Jan 22 16:22:08 raspberrypi homebridge[348]: [1/22/2020, 16:22:08] [OpenZWave] Failed to make accessory Error: homekitToZwave is required for readwrite values Jan 22 16:22:08 raspberrypi homebridge[348]: at new ValueCoordinator (/usr/lib/node_modules/homebridge-openzwave/lib/Values/ValueCoordinator.js:46:13) Jan 22 16:22:08 raspberrypi homebridge[348]: at registerCharacteristic (/usr/lib/node_modules/homebridge-openzwave/lib/Accessories/Drivers/Support/registerCharacteristic.js:27:3) Jan 22 16:22:08 raspberrypi homebridge[348]: at batteryDriver (/usr/lib/node_modules/homebridge-openzwave/lib/Accessories/Drivers/batteryDriver.js:32:39) Jan 22 16:22:08 raspberrypi homebridge[348]: at Accessory.configure (/usr/lib/node_modules/homebridge-openzwave/lib/Accessories/Accessory.js:81:7) Jan 22 16:22:08 raspberrypi homebridge[348]: at /usr/lib/node_modules/homebridge-openzwave/lib/Accessories/AccessoryManager.js:133:17

shnhrrsn commented 4 years ago

Ahh I’m using it through docker so didn’t have an issue with the dialout group — I’ll update the readme to include info and see if I can do a runtime check.

Add Node should work, I’ve used it to pair all of my devices but I haven’t added a new device in a couple of weeks so there may be regression there — I’ll take a look.

The error you saw I fixed in 4185be9, I forgot to flag battery level as readonly, though 9a08928 changes readonly to be completely device powered now to reduce future bugs.

Right now these changes are scheduled for 1.1.0, which I just released the first beta of but I want to test in my env for a few days and deal with any bugs that popped up.

I could release a 1.0.6 for the battery fix, but there’s no support at all for battery powered devices in 1.0.x outside of battery level. I hadn’t tested battery powered devices originally and didn’t realize I needed to handle them different, the big change of 1.1.0 is dealing with sleeping devices.

brianacraig commented 3 years ago

@shnhrrsn I've got three Schlage Z-Wave locks I'd like to add to my network. Any chance you've made progress on adding a Secure Node and can point me in the right direction?

w21dk commented 3 years ago

@shnhrrsn Thanks so much for your dev work on this. I'm having a similar problem to @jmonsma . The z-stick is installed correctly and is picked up by homebridge ([OpenZWave] Node Available: Z-Stick Gen5 [OpenZWave] Finished Scanning). The add node button works. However When I attempt to pair to a zwave device, the homebridge log shows:

_Failed to make accessory Error: homekitToZwave is required for readwrite values at new ValueCoordinator (/usr/lib/node_modules/homebridge-openzwave/src/Values/ValueCoordinator.ts:51:10) at registerCharacteristic (/usr/lib/node_modules/homebridge-openzwave/src/Accessories/Drivers/Support/registerCharacteristic.ts:27:2) at driver (/usr/lib/node_modules/homebridge-openzwave/src/Accessories/Drivers/batteryDriver.ts:36:2) at Accessory.configure (/usr/lib/node_modules/homebridge-openzwave/src/Accessories/Accessory.ts:72:4) at /usr/lib/nodemodules/homebridge-openzwave/src/Accessories/AccessoryManager.ts:112:15

I thought it might be a permissions error, so I chmod'd the /usr/lib/node_modules/homebridge-openzwave to 777. But the error persists. Can you please advise? thanks again!

u20p17 commented 3 years ago

Hi! @shnhrrsn : I also get the following error with the latest homebrige-openzwave version. How can I solve this problem?

[2020-10-17 0:10:24] Loaded plugin: homebridge-openzwave@1.0.8
[2020-10-17 0:10:24] Registering platform 'homebridge-openzwave.openzwave'
[2020-10-17 0:10:24] ---
[2020-10-17 0:10:26] [OpenZWave] Initializing openzwave platform...
Initialising OpenZWave 1.6.1392 binary addon for Node.JS.
OpenZWave Security API is ENABLED
ZWave device db : /usr/local/etc/openzwave
User settings path : /usr/local/lib/node_modules/homebridge-openzwave/node_modules/openzwave-shared/build/Release/../../
Option Overrides : --ConsoleOutput false --Logging false --SaveConfiguration false
[2020-10-17 0:10:56] [OpenZWave] Node Available: ZW090 Z-Stick Gen5 EU
[2020-10-17 0:10:56] [OpenZWave] Finished Scanning
[2020-10-17 0:11:50] [OpenZWave] Failed to make accessory Error: homekitToZwave is required for readwrite values
at new ValueCoordinator (/usr/local/lib/node_modules/homebridge-openzwave/src/Values/ValueCoordinator.ts:51:10)
at registerCharacteristic (/usr/local/lib/node_modules/homebridge-openzwave/src/Accessories/Drivers/Support/registerCharacteristic.ts:27:2)
at driver (/usr/local/lib/node_modules/homebridge-openzwave/src/Accessories/Drivers/batteryDriver.ts:36:2)
at Accessory.configure (/usr/local/lib/node_modules/homebridge-openzwave/src/Accessories/Accessory.ts:72:4)
at /usr/local/lib/node_modules/homebridge-openzwave/src/Accessories/AccessoryManager.ts:112:15
w21dk commented 3 years ago

I started my installation again with the homebridge SD card raspbian image v1.0.14, to attempt to eliminate user errors.

Unfortunately the same "Failed to make accessory Error: homekitToZwave is required" issue persists.

@shnhrrsn Thanks so much for your dev work on this. I'm having a similar problem to @jmonsma . The z-stick is installed correctly and is picked up by homebridge ([OpenZWave] Node Available: Z-Stick Gen5 [OpenZWave] Finished Scanning). The add node button works. However When I attempt to pair to a zwave device, the homebridge log shows:

_Failed to make accessory Error: homekitToZwave is required for readwrite values at new ValueCoordinator (/usr/lib/node_modules/homebridge-openzwave/src/Values/ValueCoordinator.ts:51:10) at registerCharacteristic (/usr/lib/node_modules/homebridge-openzwave/src/Accessories/Drivers/Support/registerCharacteristic.ts:27:2) at driver (/usr/lib/node_modules/homebridge-openzwave/src/Accessories/Drivers/batteryDriver.ts:36:2) at Accessory.configure (/usr/lib/node_modules/homebridge-openzwave/src/Accessories/Accessory.ts:72:4) at /usr/lib/nodemodules/homebridge-openzwave/src/Accessories/AccessoryManager.ts:112:15

I thought it might be a permissions error, so I chmod'd the /usr/lib/node_modules/homebridge-openzwave to 777. But the error persists. Can you please advise? thanks again!

kenmg77 commented 3 years ago

@shnhrrsn Happy New Year! Having the same Failed to make accessory Error that @jmonsma, @u20p17 and @w21dk above are having. Do you have a suggestion on how to move past this?