How do I program Z-Wave devices?

Functionality and usage of the OpenNethome Server
Mastiff
Posts: 73
Joined: Tue Feb 24, 2015 7:30 am

How do I program Z-Wave devices?

Post by Mastiff »

I have bought a Z-Stick, and it seems like it's working. At least it says "Z-Stick: Connected". But how do I add devices? I have bought two Fibaro dimmer 2, but I'm not sure how to add them to ONH. From the LED on the stick it seems like the stick sees them, but I don't see anything in the logger of ONH, or anything else. So can somebody please explain how I find them? I'm sure there's a very simple way, I'm just not seeing it. :mrgreen:
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: How do I program Z-Wave devices?

Post by stefangsbb »

First you have to include them in the Z-Wave network. You do that by first going to the Create/edit-page and press the "Add Node"-button. Then you set the dimmer in inclusion mode, probably by pressing the button on it three times. After a short while it should pop up as a discovered device in the Detected Devices-window and you can auto-create a Home Item for it as usual.

Note that the Z-Wave support is currently kind of experimental, as I have seen very little interest in it so far...

Please tell me how it went!
Mastiff
Posts: 73
Joined: Tue Feb 24, 2015 7:30 am

Re: How do I program Z-Wave devices?

Post by Mastiff »

That little interest is because I only got a Z-Wave device now! :mrgreen:

But thanks, it worked out perfectly! At least with off and on. I do not have something dimmeable easily available, but I'm sure that will work too!
Mastiff
Posts: 73
Joined: Tue Feb 24, 2015 7:30 am

Re: How do I program Z-Wave devices?

Post by Mastiff »

Found something dimmeable, and that works too! :mrgreen: But I don't see the signals from using the physical switch connected to the thing. When I turn it on with the switch, ONH still shows it as off. Is there something more I need to activate, or isn't that supported (yet)?
krambriw
Posts: 86
Joined: Sun Jan 04, 2015 8:48 am

Re: How do I program Z-Wave devices?

Post by krambriw »

And one more question; when a z-wave device is changing it's state, it sends out an event on the z-wave mesh network. Do you already forward those via the tcp port as an ONH event (as with all other events)?
Mastiff
Posts: 73
Joined: Tue Feb 24, 2015 7:30 am

Re: How do I program Z-Wave devices?

Post by Mastiff »

Actually that was more or less what I was asking. :mrgreen: I just worded it badly. I wanted to know how to get changes made with the physical Z-Wave switch, that is sendt over the Z-work ( :lol: ) register in ONH.
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: How do I program Z-Wave devices?

Post by stefangsbb »

Well, the answer is both yes and no... :)

The good news is that the Z-Wave connection sends out all received messages from the Z-Wave network as ONH-Events.
However, Z-Wave is a point to point protocol, someone has to direct a message to the central node for us to see it. Z-Wave devices do not typically send any event to the central node when they change state. I think this is partly due to a patent issue. This means that we will not see anything when a Z-Wave lamp is turned on by a Z-Wave button. One way around this is to explicitly program the button to send messages both to the lamp and to the central node when you switch it on or off.

You can also connect the button via ONH, so a RemapButton in ONH turns on the lamp, this gives some delay and stops working if the server is down. You can either program the button to do a set on the central node (ZWaveRemapButton) or even better, program it to send a Central Scene Command (ZWaveCentralSceneRemapButton).
Mastiff
Posts: 73
Joined: Tue Feb 24, 2015 7:30 am

Re: How do I program Z-Wave devices?

Post by Mastiff »

OK, I see, thanks! Does that mean that anything that is sendt to the Z-Stick will be shown? So for instance when I get my IDLock door lock up it will send?
Mastiff
Posts: 73
Joined: Tue Feb 24, 2015 7:30 am

Re: How do I program Z-Wave devices?

Post by Mastiff »

Oh, btw, is it possible to query Z-Wave devices from ONH? I believe (don't shoot me if I'm wrong) that is a part of that protocol.
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: How do I program Z-Wave devices?

Post by stefangsbb »

Yes, everything that is sent to the stick turns up as an ONH-Event - but as an un-encoded Z-Wave Event. There has to be an Home Item there to decode it too. My Z-Wave library can encode/decode the basic Z-Wave command classes, so with that you can both encode and decode such messages.You can also use the ZWaveCommandPort which shows the Z-Wave messages in clear text.

This means that you can for example encode and send a MultiLevelSwitchCommandClass.Get-command to get the current value of a Node. The current ZWaveDimmer does not do that however, since I don't want to wait for that answer as soon as you want to look at the current state, so it just stores the last set state. It would be possible to for example let it poll the state on some interval to get it to see changes made by someone else... This is part of the Z-Wave stuff in ONH that I have not decided on yet
Post Reply