Charmed Quark Systems, Ltd. - Support Forums and Community
Zwave via http put - Printable Version

+- Charmed Quark Systems, Ltd. - Support Forums and Community (http://www.charmedquark.com/vb_forum)
+-- Forum: General Discussion (http://www.charmedquark.com/vb_forum/forumdisplay.php?fid=3)
+--- Forum: CQC Support (http://www.charmedquark.com/vb_forum/forumdisplay.php?fid=9)
+--- Thread: Zwave via http put (/showthread.php?tid=10422)



Zwave via http put - kfly - 11-06-2017

Dean,
Is there an easy/built in way to turn on a zwave light from a URL put? Without calling some kind of CML script like below?
"http://cqcserver/cmlbin/user/secure/SendUserEvent?type=Lights&value=KitchenLights,True"


RE: Zwave via http put - Dean Roddey - 11-06-2017

You could use the HTTP trigger driver. It's like the IR drivers in that you can train it to react to a specific URL, and it receives the query parameters as action parameters in the case of the HTTP one.


RE: Zwave via http put - kfly - 11-06-2017

(11-06-2017, 08:33 AM)Dean Roddey Wrote: You could use the HTTP trigger driver. It's like the IR drivers in that you can train it to react to a specific URL, and it receives the query parameters as action parameters in the case of the HTTP one.

Thanks Dean. I was looking at HTTP triggers but was hoping for something simpler.
Wish there was an easy way to just send a httpd put command(with user/pass) to change a Devices field Value.(like turn on a light).


Once you are done with the new Z-Wave driver wanted to use CQC to interface with my Z-wave devices.
I am starting to use Xlights for this next years Halloween setup(yes I plan ahead) and wanted to call CQC to control existing Zwave devices.


RE: Zwave via http put - Dean Roddey - 11-06-2017

There's not anything simpler than a trigger. But, keep in mind that you can access the query parameters of the URL used, so you only need to create one action that you can pass values into via the URL query parameters. The base part of the URL is what is taken as the trigger URL.


RE: Zwave via http put - kfly - 11-06-2017

(11-06-2017, 09:50 AM)Dean Roddey Wrote: There's not anything simpler than a trigger. But, keep in mind that you can access the query parameters of the URL used, so you only need to create one action that you can pass values into via the URL query parameters. The base part of the URL is what is taken as the trigger URL.

Ok got the http triggers working.  Had all kinds of issues using Chrome and getting "replace key". Worked with i.e  100%. Just seems should be built into the webserver and not have an old "IR" type functionally  with Training needed to read a URL put.


RE: Zwave via http put - Dean Roddey - 11-06-2017

You really don't want that built into the web server. That would be a security hole the size of my head. The reason Chrome doesn't work is because it doesn't just send out the URL you give it. It sends out a few others as well. It asks for an icon and some other things. That messes it up for training purposes.


RE: Zwave via http put - kfly - 11-07-2017

(11-06-2017, 08:29 PM)Dean Roddey Wrote: You really don't want that built into the web server. That would be a security hole the size of my head. The reason Chrome doesn't work is because it doesn't just send out the URL you give it. It sends out a few others as well. It asks for an icon and some other things. That messes it up for training purposes.

I think you could secure by having a button on the User screen to generate/change a "personal access token". Then pass that token on the request. Seems to be way a lot of the cloud platforms use for security.
Alternatively, Would really love for CQC to have a "CQChelper" + cli with a "personal access token" like Amazon and ST does.
https://github.com/SmartThingsCommunity/cli-example-nodejs/blob/master/README.md

Not sure if there is a use case for command line access to CQC. A CQCCLI driver and cli could be a great alternative to adding more complexity into the webserver to get and set device status securely.