Supporting multiple Z-Wave Z-Stick

474 views
Skip to first unread message

Jonathan Giles

unread,
Jul 11, 2014, 11:06:59 PM7/11/14
to ope...@googlegroups.com
Hi all,

My situation is that I have a new home-office at the back of my garage, which is some way from my house. Inside my house I have a Z-Stick connected to my Mac Mini which is running OpenHAB. This works fine, but now I would like to put a Z-Wave 2x1.5kw relay into my home-office to control the internal and external lights, and also a smart switch to turn on / off heating when appropriate.

The problem is that my home Z-Wave range doesn't reach the back of my home-office. One option I was considering was to buy another Z-Stick and to hook that up to a Raspberry Pi I already have in my garage (it controls my garage door via my own, non-zwave relays, and does a few other useful things (like rebroadcast my wifi to my office)). I can see two possible ways of enabling this:
  1. I could install a private OpenHAB on the Pi that is solely responsible for the zwave communications. I could then configure my main OpenHAB instance to communicate with this secondary instance via http to read and write state.
  2. I could (somehow) expose the Z-Stick in the Pi over the home network, such that my Mac Mini can talk directly to it. This would presume that OpenHAB has some means of sending a Z-Wave signal out over multiple controllers, which to me seems like it will be fraught with complexity.

This all of course presumes that there isn't some easier way that I am unaware of. In any case, I'm keen to hear peoples thoughts, or suggestions on how to better deal with this situation. I'm not made of money, and whilst reluctant to buy another Z-Stick, I can see the possibilities for my home-office if I outlay the relatively small expense.

Thanks!
Jonathan Giles

Ben Jones

unread,
Jul 12, 2014, 12:49:12 AM7/12/14
to ope...@googlegroups.com
I would be looking at running a separate instance of openHAB I think. But perhaps using MQTT as the transport since the MQTT binding has support for linking up the entire event bus. I have never used it myself, but it sounds like this is the sort of thing it was designed to do;


I am moving more and more of my automation tasks to MQTT these days. Can't speak highly enough of it as a lightweight, reliable transport.

Mark

unread,
Jul 12, 2014, 10:45:29 AM7/12/14
to ope...@googlegroups.com
I would love to see the ZWave Binding support multiple Z-Wave controllers.  It's quite common for Z-Wave dongles not to have sufficient coverage for a whole-house deployment, since they have non-extensible trace antenna... and it's fairly common for larger ZWave deployments to need multiple Primary's.

It's possible to "remote" a Serial port, and have the ZWave binding connect to it.  As an example, Garrett did it here:

But you'd need the ZWave binding to support multiple [concurrent] dongles, which I don't believe it does right now.  I filed Issue #1244 against it to get that functionality.

Daniel Abegglen

unread,
Jul 12, 2014, 10:58:00 AM7/12/14
to ope...@googlegroups.com
+ 1
In my environment, I can't tell the reason, if a stick aeon s2 or zwave.me has more than ~30 devices registered it becomes unstable with a lot of dead nodes, which are recovered but there's "unneeded" network traffic and slow response times.

Chris Jackson

unread,
Jul 12, 2014, 12:20:13 PM7/12/14
to ope...@googlegroups.com

> But you'd need the ZWave binding to support multiple [concurrent] dongles, which I don't believe it does right now. I filed Issue #1244 against it to get that functionality.

This is something I’m working on, and it is currently implemented. However, it seems for replication to work properly, you MUST have an SUC in the network, otherwise updates to the second controller don’t seem to work. I think this is compiled into the version on the HABmin site and it should provide a replicate button in HABmin, but for various reasons I haven’t added the button to actually include the second controller (partly because myself and Gilles who was also testing this had already included the controller). I can easily add this though if anyone wants to play.

Chris

Chris Jackson

unread,
Jul 12, 2014, 12:21:51 PM7/12/14
to ope...@googlegroups.com

> + 1
> In my environment, I can't tell the reason, if a stick aeon s2 or zwave.me has more than ~30 devices registered it becomes unstable with a lot of dead nodes, which are recovered but there's "unneeded" network traffic and slow response times.
But adding a second stick won’t change this - at least not if it’s in the same network (i.e. same homeId). the network will still have all those same devices in it - it’s just that now you’ll be able to control the network from 2 different places if you added a second controller.

Chris

Mark

unread,
Jul 12, 2014, 1:49:23 PM7/12/14
to ope...@googlegroups.com
Chris,
My assumption is that each stick would be it's own Primary, with it's own homeId.  This eliminates the possibility of using Z-Wave only features, like Associations, across the boundaries but that type of orchestration could be done in openHAB itself (when needed).  It has the benefit of keeping the Z-Wave networks small/isolated, at least to avoid conflicts at the app-level within each controller (and avoid having large # of hops).

Also, depending upon the version of ZWave being used, things like SIC drop out.   Doing something brute-force, like multiple Primarys (one per dongle) keeps it simple, and likely to work across a few generations of Z-Wave controller.

The lads that did the experiment above had to drop-back a rev on Z-Wave (3.20 -> 2.78) in order for it to work with the current openHAB binding.

Daniel Abegglen

unread,
Jul 12, 2014, 6:05:16 PM7/12/14
to ope...@googlegroups.com
Chris, sorry for misleading you, my goal is to have two independent sticks with different homeid on the same openHAB instance.

Regards,
Daniel

Jonathan Giles

unread,
Jul 12, 2014, 6:12:44 PM7/12/14
to ope...@googlegroups.com
Thanks everyone for your responses. I have a very limited understanding
of Z-Wave, but from what I'm hearing it seems like both the ways I
proposed (indirect via a hidden OpenHAB install and directly mapping to
the secondary Z-Wave dongle) are feasible. Because of this I'll likely
purchase the second Z-Stick to put into my Raspberry Pi in the garage.

Chris, I would really appreciate any pointers you can give as to how to
proceed. My preference is to not require the secondary OpenHAB install,
but I'm unclear what the requirements are to configure my setup to have
a SUC. Any further pointers you may have as to how to configure the
secondary Z-Stick would also be really appreciated!

Thanks,

-- Jonathan

Chris Jackson

unread,
Jul 13, 2014, 1:13:28 PM7/13/14
to ope...@googlegroups.com
Hey Jonathan,
Hmmm - I’m not sure what the best option is really. I’ve re-read Marks new issue, and it does make sense, although refactoring the binding to allow it to cope with multiple sticks is not a simple task and I’m not really sure if it’s worth the effort. Maybe it’s something for the new ESH binding format…

The work I’ve been doing with multiple controllers is really to allow OH to participate in a network that’s nominally controlled by another controller - e.g. Fibaro HomeCentre or the Vera. The intention is that it allows the system to replicate any nodes added to the primary controller, but it won’t really help bridge a gap, which is what you need to do. If you can’t add a switch or something to allow the network to be extended, then for the minute the best (only?) option is probably to do what Ben suggested. I agree that this isn’t nice as you’re then administering multiple networks, but I don’t know that there’s another option right at the moment.

Cheers
Chris

andys...@wowwee.com.hk

unread,
Nov 20, 2014, 4:37:18 AM11/20/14
to ope...@googlegroups.com
Hi All,

I'm interested in multiple z-wave sticks as well. In my case I'm interested in adding two different frequency sticks (EU & US). I have some devices use EU and some with use US. 

Does the bindings currently support multiple controllers?

Any idea how I might achieve this? Would I need two raspberry pi's?

Chris Jackson

unread,
Nov 20, 2014, 5:05:38 AM11/20/14
to ope...@googlegroups.com, andys...@wowwee.com.hk
No, the binding doesn't support multiple sticks - this would be a major change to the binding. 

The way I've previously recommended doing this is to add a second instance of OH on a second controller (eg a Pi, but note that the zwave binding doesn't work well on the Pi, so I wouldn't recommend it!) and then use MQTT, or something similar to link the two together.

Chris

ps. I'm sure you're not too worried :) but technically it would be illegal to run an EU stick in the US, or vice versa...

Andy Savage

unread,
Nov 20, 2014, 5:30:17 AM11/20/14
to Chris Jackson, ope...@googlegroups.com, Andy Savage
My plan was to use the Z-Wave binding on the Pi with a z-stick from aeon labs with OpenHAB and the z-wave binding running on a Pi.

Does it not run well on the Pi? I thought it was just the razberry shield that was having issues?

P.S.
I live in HK, so probably I shouldn't be using either EU or US, but considering I couldn't find any gear anywhere that supported HK, I've given up on that.

--

Andy Savage

R&D Software Manager

Hong Kong Office

 



Mobile: (+852) 936-34341

Tel: (+852) 2722-2743

Fax: (+852) 2724-6931

Skype ID: wowwee_andy

LinkedIn: hk.linkedin.com/in/andysavage

Chris Jackson

unread,
Nov 20, 2014, 7:05:48 AM11/20/14
to ope...@googlegroups.com, ch...@cd-jackson.com, andys...@wowwee.com.hk
My plan was to use the Z-Wave binding on the Pi with a z-stick from aeon labs with OpenHAB and the z-wave binding running on a Pi.

Does it not run well on the Pi? I thought it was just the razberry shield that was having issues?

No - it doesn't work well on the Pi. The reason is unknown - we've spent some time trying to make it work, but there's not been a breakthrough. Personally, I would avoid the Pi as it's also a little under powered, but the big issue if you're running zwave is that there's this problem with frames getting repeated. It seems like the stick receives the frames multiple times, but it doesn't appear to be a problem with the binding itself (maybe it's the Java Pi serial driver?).

I think people are using similar boards (eg BeagleBone) without problems... We might get lucky and solve the Pi problem (one day!) but I think the next step is to change the serial library which would take a little bit of time, and might have other unwanted impacts.

Chris

Aitor Iturrioz Rodríguez

unread,
Nov 20, 2014, 12:52:52 PM11/20/14
to ope...@googlegroups.com
Hi guys!

I don't know if there is still some interest in this topic, but I have tried to solve it myself recompiling the zwave binding with a different name (zwave2) and making some small changes as well. Here you have the zwave2 binding:


The instructions to use it are really simple:

1) Place the jar file in your openhab's addon folder
2) Edit the openhab.cfg file adding a new entry: zwave2:port=<your_port>
3) Add your new items (the one's that belong to the second zwave network) using the following structure: Switch test_switch "This is a test switch" { zwave2="3:1:command=binary_switch" }. You get the idea ;)

I don't guarantee that it will work, but you can try it ;) Let me know if it works, I will do my best to help you!

Many many thanks Chris for your help, you are awesome!

Best regards,

Aitor

PS: Jonathan, you can use a linux program called "socat" (ser2net should also work) to expose the Z-Stick in the Pi over the network and read it from the Mac Mini. I have tried to do the same in my own installation, but it didn't work using the pi, although now its working using a Beaglebone. The connection follows this diagram:

zwave stick -> beaglebone -> socat ------------------------- ethernet ---------------------------> socat -> openhab

Works great with openhab, it sees the ttyUSB0 port as it was a native one. Let me know if you need any help ;)
Reply all
Reply to author
Forward
0 new messages