Hey everyone, I wanted to share my recent success in integrating Z-Wave and Zigbee devices using Alexa. I’ve always found the process of including devices a bit cumbersome, especially when you have to rush to put them into inclusion mode. So, I decided to automate this process using the HueEmulation binding and Alexa skills. Here’s how I did it:
I created two switches in my OpenHAB setup: one for Z-Wave discovery and another for Zigbee. These switches trigger a series of commands that start the discovery process. The best part? Now, I can simply ask Alexa to turn on the discovery for either Z-Wave or Zigbee, and it does the rest for me!
Here’s a snippet of the rules I used:
plaintext
rule “Start zwave discovery”
when Item Zwave_Discovery received command
then
val String discoveryResponse = executeCommandLine(“/bin/sh@@-c@@/usr/bin/curl -o /dev/null -s -w “%{http_code}” --connect-timeout 10 -m 10 -X POST --header “Content-Type: application/json” --header “Accept: text/plain” “localhost:8080/rest/discovery/bindings/zwave/scan””,10000)
logDebug(“Rules”, “Start Zwave discovery: Response=[{}]”,discoveryResponse)
end
rule “Start zigbee discovery”
when Item Zigbee_Discovery received command
then
val String discoveryResponse = executeCommandLine(“/bin/sh@@-c@@/usr/bin/curl -o /dev/null -s -w “%{http_code}” --connect-timeout 10 -m 10 -X POST --header “Content-Type: application/json” --header “Accept: text/plain” “http://localhost:8080/rest/discovery/bindings/zigbee/scan””,10000)
logDebug(“Rules”, “Start Zigbee discovery: Response=[{}]”,discoveryResponse)
end
This setup has made my life so much easier. No more rushing to the device or worrying about missing the inclusion window. I hope this helps someone else looking to streamline their device inclusion process. If anyone has questions or suggestions, feel free to reach out!
Cheers,
[Your Name]