Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save patryk9200/a6242bc988342eea1ad0db2033e29c74 to your computer and use it in GitHub Desktop.
Save patryk9200/a6242bc988342eea1ad0db2033e29c74 to your computer and use it in GitHub Desktop.
RaZberry API ZAutomation/ZAPI Examples
# I had a LOT of trouble finding working examples of the ZAutomation API for RaZberry API. I eventually figured out what exactly to use by combining information from multiple sources and sniffing requests from the 'Expert UI'. Some areas I found information:
- http://docs.zwayhomeautomation.apiary.io/
- http://wiki.micasaverde.com/index.php/ZWave_Command_Classes
- https://www.npmjs.org/package/mqtt-zway
- The included PDFs
- The expert API area on the device web UI
- https://chrome.google.com/webstore/detail/postman-interceptor/aicmkgpgakddgnaphhhpliifpcfhicfo?hl=en (Postman POST/GET sniffer)
# Some general RaZberry API commands:
Find information about controller
- http://192.168.2.2:8083/ZWaveAPI/Run/controller
Add a device to network (start include process)
- http://192.168.2.2:8083/ZWaveAPI/Run/controller.SetLearnMode(1)
Stop looking for a device to add to the network
- http://192.168.2.2:8083/ZWaveAPI/Run/controller.SetLearnMode(0)
Find all devices with all their information
- http://192.168.2.2:8083/ZWaveAPI/Run/devices
Find the command classes available on device 2
- http://192.168.2.2:8083/ZWaveAPI/Run/devices[2]
Send on command to device id 3 in group 0 with command class 38:
- http://192.168.2.2:8083/ZAutomation/api/v1/devices/ZWayVDev_3:0:38/command/on
Send exact level (0-100) to device 3 on channel 0 and command class 38:
- http://192.168.2.2:8083/ZAutomation/api/v1/devices/ZWayVDev_3:0:38/command/exact?level=20
Send off command to device id 3 in group 0 with command class 38:
- http://192.168.2.2:8083/ZAutomation/api/v1/devices/ZWayVDev_3:0:38/command/off
Change blue color on Zipato RGBW light bulb when it is device 3:
http://raspberrypi:8083/ZWaveAPI/Run/devices[3].instances[0].commandClasses[0x33].Set(4,255)
NOTES:
- Your added devices will start out at device id 2 and number upwards.
- The command class must be the numerical vaue of the type your device supports on the wiki
- The different command options are available on http://docs.zwayhomeautomation.apiary.io/ in the devices section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment