New Z-Way Binding

Like I said, I mainly just wanted to start the conversation. I’m not against the binding itself.

This is definitely Ok and I look forward to more opinions and feedbacks.

@Kai This is my first contribution to openHAB. If you have some time, can you check please my pull request? What I have to do to get the label “newbinding”?

Thanks!

Patrick,

Many thanks for this contribution! Although there is some overlap with the Z-Wave binding, I agree that it nonetheless makes sense as it provides a different kind (higher-level) of integration with Z-Wave. As openHAB leaves the user the choice about what best matches his needs, this binding is definitely welcome.

If you have some time, can you check please my pull request3?

I definitely will, but I cannot yet promise when I will find the time, since there is quite a pipeline of PRs waiting for review… I am very sorry to be a bottleneck here :frowning: If anyone else here is interested to do a review or actively test it and provide feedback, please do so.

What I have to do to get the label “newbinding”?

Oh, that’s pretty easy, I just added it :slight_smile:

Cheers,
Kai

Kai,

thanks for the quick response and the “newbinding” label :grin:

What is the correct way to update the pull request? Can I commit unless a review was initiated?

Yes, feel free to push further commits to your branch (and thus the PR) at any time.

Patrick

Do you know if some sort of license is required for the z-way server? I have a zwave.me usb dongle but can’t seem to be able to get the z-way server to do anything with it (device port etc have been defined correctly). Reading the z-way server forum, there seems to be some confusing responses, with some posts saying the license is in the usb dongle, others saying a license will have to be purchased.

Thanks

That stick comes in two versions: one without a license (cheap) and one with a license (expensive):

https://www.z-wave.me/index.php?id=28

The UZB comes with two versions: UZB1 is the plain stick without any
additional software license. It can be used with any third party Z-Wave
controller software. UZBWAY is the combination of the UZB stick plus a
license key for the Z-Way controller software. Z-Way will always require a Z-Wave.Me hardware to run, either a UZB (with license) or a Razberry board.

Thanks @sihui. I wasn’t aware of the two flavours and naturally, mine is the one without the license!

You can buy an upgrade license. Couldn’t find one in the US, but here is one in Europe
http://store.zwaveeurope.com/product_info.php?language=en&products_id=12945

This software upgrades a Z-Wave Standard UZB Stick (UZB1) to a UZB stick capable running Z-Wave.Me’s controller software Z-Way. Just install Z-Way, go to the expert User Interface and include the key code you purchased.

There may be other sites selling the upgrade too.

Please check our “Where to Buy” section for Point of Sales where to buy license upgrades.
https://www.z-wave.me/index.php?id=41

Thanks David.

Hi @pathec ,

nice Binding. Thank you a lot for that, and of course the Connector.

I’m running openHAB on a different hardware than the Z-Way system. The Discovery was successful and the few ZWave devices connected to the Z-Way system on my RaspPi were found afterwards too.

But after a while all Z-Way Things went offline. Log says:
[WARN ] [nding.zway.handler.ZWayBridgeHandler] - Z-Way library - Internal server error (HTTP status code: 500).

EDIT:
Do you know why this is happening?

Nevertheless in my event.log I can see coming events from the zway-devices. Very interesting.
So it is working just fine :relaxed:


Generally I like the idea to be able to connect different ZWave networks to one openHAB instance. If someone need to use more than 232 devices he/she is able to achieve that :thumbsup:

Regards,
André

Hi @devTechi,

Thank you that you have tested the Z-Way binding!

The HTTP status indicates that the error occurs in the Z-Way server. Maybe I send a command in the wrong format or the error occurs in the Connector. You can help me to localize the error, if you are sending the Z-Way log or the relevant part of Z-Way log.

I’m new in openHAB and still finding out, when I have to put a things/bridge offline and when back to
online. Currently also commands of things in the offline status are processed and the state
is update by Z-Way. I will improve this in a future version.

Regards,
Patrick

Yes, I would like to help. What should I look for in the log file? Or which part you are you interested in?

But you are doing it :slight_smile:


EDIT:
I found something like:

[2016-09-20 16:53:50.946] [I] [core] Installing app OpenHABConnector ...
[2016-09-20 16:53:51.275] [I] [core] Downloaded contents for 'OpenHABConnector'
[2016-09-20 16:53:51.287] [I] [core] Extracting automation/userModules/OpenHABConnector/CHANGELOG.md
[2016-09-20 16:53:51.287] [I] [core] Extracting automation/userModules/OpenHABConnector/htdocs/
[2016-09-20 16:53:51.287] [I] [core] Extracting automation/userModules/OpenHABConnector/htdocs/icon.png
[2016-09-20 16:53:51.287] [I] [core] Extracting automation/userModules/OpenHABConnector/index.js
[2016-09-20 16:53:51.288] [I] [core] Extracting automation/userModules/OpenHABConnector/lang/
[2016-09-20 16:53:51.288] [I] [core] Extracting automation/userModules/OpenHABConnector/lang/de.json
[2016-09-20 16:53:51.288] [I] [core] Extracting automation/userModules/OpenHABConnector/lang/en.json
[2016-09-20 16:53:51.288] [I] [core] Extracting automation/userModules/OpenHABConnector/LICENSE.txt
[2016-09-20 16:53:51.289] [I] [core] Extracting automation/userModules/OpenHABConnector/module.json
[2016-09-20 16:53:51.289] [I] [core] Extracting automation/userModules/OpenHABConnector/README.md
[2016-09-20 16:53:51.289] [I] [core] Module successfully unpacked
[2016-09-20 16:53:51.290] [I] [core] Load app "OpenHABConnector" from folder ...
[2016-09-20 16:53:51.294] [I] [core] Loading module OpenHABConnector from userModules/OpenHABConnector
[2016-09-20 16:53:51.297] [I] [core] Executing script: /**^M ...
[2016-09-20 16:54:17.236] [I] [core] Instantiating module 11 from class OpenHABConnector
[2016-09-20 16:54:17.240] [I] [core] --- Starting module OpenHAB Connector
[2016-09-20 16:54:17.247] [I] [core] Creating device text OpenHabConnector
[...]
[2016-09-20 16:54:45.751] [D] [zway] Job 0x13: deleted from queue
[2016-09-20 16:54:46.024] [D] [zway] Job 0x13: deleted from queue
[2016-09-20 16:56:00.429] [I] [core] Deleting device text OpenHabConnector
[2016-09-20 16:56:00.453] [I] [core] --- Stopping module OpenHAB Connector
[2016-09-20 16:56:00.458] [I] [core] --- Starting module OpenHAB Connector
[2016-09-20 16:56:00.471] [I] [core] Creating device text OpenHabConnector
[2016-09-20 16:56:00.597] [I] [core] ---  OpenHabConnector performCommand processing: {"0":"refreshListener","1":{}}
[...]

Regards,
André

You can search for [E] or error in Z-Way log file.

Are there entries on the pattern [2016-08-25 10:00:07.795] [E] ...?

Yes,
perhaps this

[2016-09-20 17:20:16.760] [I] [core] Deleting device text OpenHabConnector
[2016-09-20 17:20:16.780] [I] [core] --- Stopping module OpenHAB Connector
[2016-09-20 17:20:16.783] [I] [core] --- Starting module OpenHAB Connector
[2016-09-20 17:20:16.796] [I] [core] Creating device text OpenHabConnector
[2016-09-20 17:20:16.817] [I] [core] (node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit. 11
[2016-09-20 17:20:16.833] [E] [HTTP] Callback execution error: TypeError: undefined is not a function
[2016-09-20 17:20:44.552] [I] [core] Instantiating module 11 from class OpenHABConnector
[2016-09-20 17:20:44.556] [I] [core] --- Starting module OpenHAB Connector
[2016-09-20 17:20:44.568] [I] [core] Creating device text OpenHabConnector
[2016-09-20 20:17:20.184] [D] [zway] Job 0x13: deleted from queue

I think undefined became UNDEF and is a state not a function or do I mix something?

That helps me a lot. The error occurs in the Connector.
Can you please open the Connector settings (under Z-Way - Apps - Active > openHAB Connector Modules). How many servers are listed?

There is just a single server. During my testing I removed the Thing and then the former created server is deleted. But before I deleted one for testing manually.

But to concretely answer your question. There is just one server :slight_smile:

Thats’s good.

If everything works now (state update?, command handling?), ignore the offline status for the moment and I will refactore this. You can also download the new version (no longer up to date, the latest version is linked in the pull request) from this morning. In this I have corrected a problem with concurrency. Maybe this update addresses the issue.

I’ll do it. Thanks.