This tutorial is about setting up the AllJoyn Device System Bridge for Z-Wave, while using the newer Aeotec Z-Stick Gen 5.
When you found your way to this post, you probably have read some things about AllJoyn already. This open source, cross-platform interoperability framework of which Microsoft became Premium Member in 2015 was implemented in all versions of Windows 10. Although AllJoyn works on the Internet Protocol (IP), it also provides the Device System Bridge concept. This makes it possible to bring other networks like Zigbee and Z-Wave to AllJoyn. Companies as LG, Whirlpool and LIFX already made devices designed for AllJoyn.
After Microsoft created the AllJoyn Device System Bridge for Z-Wave back in 2015, they published a nice tutorial on how to set up your own AllJoyn bridge for Z-Wave devices, but uses an older Z-Wave adapter from Aeotec which can be very hard to find nowadays. Instead, you may like to buy the improved version of the Aeotec Z-Stick; the Gen 5 which uses Z-Wave Pro.
Products we used in this tutorial to set up the AllJoyn Device System Bridge:
- Raspberry Pi 3 with Windows 10 IoT Core installed
- Aeotec Z-Stick Gen 5
- Aeotec Multisensor 6
Of course you can replace the Aeotec Multisensor 6 with any Z-Wave device you want or already have at home.
Setting up the bridge
The first steps are quite straight forward. All you have got to do is clone or download the ZWaveAdapter project from the Microsoft IoT samples repository on GitHub and open the solution.
Now when you run the sample and open the IoT Explorer app on your Windows 10 device, you will see the application running on your Raspberry, but the adapter device (which will be named as Node1) is not present.
Configure the Z-Stick Gen 5
To be able to use the newer Z-Stick, we have to update the device identifier in the options.xml
file in the config folder of the OpenZWave project.
<Option name="ControllerPath" value="VID_0658&PID_0200" />
The application now selects the right USB device for use as Z-Wave adapter, but we aren’t there yet. Before we run the application, we have to find the right Z-Wave interfaces.
Device Interfaces in Z-Wave
The functionality of Z-Wave devices is described in an XML interface, just like the XML introspection you may know from AllJoyn. These interfaces can be found in the config folder of the OpenZWave project. There are interfaces for both standard as manufacturer specific functionality. If you browse for the OpenZWave project in your file explorer, you can see the config folder contains various folders named to device manufacturers:
- Standardized interfaces can be found in the
device_classes.xml
file. - Specific device interfaces can be found in the folder named to its manufacturer and must be referenced from the
manufacturer_specific.xml
file.
Luckily, OpenZWave has its own repository on GitHub with an updated config folder from which you can download any interface you need. Of course you can also just copy the whole config folder, but make sure you don’t lose any settings in the options.xml
file!
To find the right interface, open the manufacturer_specific.xml
file from the OpenZWave repository and try searching the product name. When you find the product, you can see which interface is being used. In our case we copied the XML files we needed from the Aeotec folder and referenced the products within the Aeotec Manufacturer tag in our manufacturer_specific.xml
file, like this:
<Manufacturer id="0086" name="Aeotec">
<Product type="0001" id="005a" name="ZW090 Z-Stick Gen5" config="aeotec/zw090.xml"/>
<Product type="0101" id="005a" name="ZW090 Z-Stick Gen5" config="aeotec/zw090.xml"/>
<Product type="0201" id="005a" name="ZW090 Z-Stick Gen5" config="aeotec/zw090.xml"/>
<Product type="0002" id="0064" name="ZW100 MultiSensor 6" config="aeotec/zw100.xml" />
<Product type="0102" id="0064" name="ZW100 MultiSensor 6" config="aeotec/zw100.xml" />
<Product type="0202" id="0064" name="ZW100 MultiSensor 6" config="aeotec/zw100.xml" />
</Manufacturer>
The first two signs of the Product type define the market which the product belong to. The EU type starts with 00, US with 01, AU 02, JP 0A and CN 1D.
Result
You can now run the Headed or- HeadlessAdapterApp while using the Aeotec Z-Stick Gen 5. When you want to pair your device(s), don’t forget to first unplug the Z-Stick before pushing the button.
Comments