This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'base64' | |
require 'rest_client' | |
class ExactOnlineClient | |
def xml_call topic, data=nil | |
if not @cookies | |
# Brutal login technique (as documented (-; ) | |
url = "https://start.exactonline.nl/docs/XMLDivisions.aspx" | |
response = RestClient.post url, {"_UserName_" => username, "_Password_" => password} | |
@cookies = response.cookies |