Goal: add an Aoetec Z-Stick to the existing project, pair it with some Z-Wave devices, and, finally, demonstrate a rule that crosses over the barrier between the two protocols. This addition to the project will maintain total local control so there should be no communication outside to the Internet.
|Item||What's it for?||Where I got it|
|The Raspberry Pi and associated hardware from Part 2 of this series.||this is the base platform that we'll be adding onto||from Part 2 of this series|
|Aeotec Z-Stick||an adapter that enables the Things Gateway to talk Z-Wave||Amazon|
|Aeotec Smart Switch 6 ZW096-A02||a Z-Wave switch to control||Amazon|
|GE ZW1403 Smart Switch||a Z-Wave switch to control (this device has been temperamental & may not be the best choice)||Amazon|
This part of the project is going to be ridiculously easy. We're starting with the system as it stood at the end of the last posting: a Things Gateway on an Raspberry Pi that only understands Zigbee devices.
From left to right: a grocery store LED bulb on the Z-Wave Aeotec Smart Switch 6 to be called AEO 007; an LED bulb disguised as a old fashioned filament bulb on the Zigbee Sylvania Smart Plug to be called SYLV 002; a Zigbee CREE dimmable bulb to be called CREE 006; a bulk Costco compact fluorescent from 2013 on a bulky and sideways Z-Wave GE Smart Switch to be called GE 001.
The Aoetec Z-Stick is a feature packed USB device that implements the Z-Wave+ protocol. My first advice, though, is to not read the instructions. You see, the Things Gateway support for Z-Wave is still in infancy and doesn't particularly fit well into the pairing methods traditionally used by Z-Wave devices.
The Z-Stick instructions will tell you to pair Z-Wave devices in a manner that the Things Gateway does not yet understand. I suggest that you hold off and pair Z-Wave devices only through the Things Gateway software. This will save you a lot of pain.
I went back to my browser and entered "gateway.local" in the URL bar. I had to login using the credentials that I provided during the previous setup. That lead me to this screen:
The Aeotec Smart Plug uses a more traditional Z-Wave approach to pairing. I pressed the circular indent on the corner of the plug itself. Since I had a light plugged into the Smart Plug, it illuminated. After a few moments, the Smart Plug appeared on the page. If it doesn't appear for you, wait for the colored lights on the edge of the plug to calm down, and press the button again.
I renamed the plug to a more understandable name before pressing "Save" and "Done".
Let's make the compact fluorescent in the Z-Wave GE 001 plug follow whatever state the old fashioned bulb (actually it's LED) in the Zigbee SYLV 002 plug.
I clicked the Menu button and selected Rules
- AEO 007 on ---> SYLV 002 on
- SYLV 002 on ---> CREE 006 on
- CREE 006 on ---> GE 001 on
- GE 001 on ---> AEO 007 off
What does this mean for rules? Well it means that it is possible to create infinitely looping dependencies. Think about how one would make two lights behave mutually exclusively: when one light is on, the other is off. An initial rule would be like the first example above where one follows another. The exception is that the target bulb is toggled to the opposite of the leader. That works fine from the perspective of the leader. However if the follower bulb is controlled independently, the leader's rule doesn't apply and both lights could be on at the same time. It is temping to add another rule where follower becomes the leader and vice versa. However, that sets up an infinite loop. Try it and you'll see what I mean.
In my next blog posting, I'm going to add some color to this circus with some Phillips HUE lights.