Dear ps,
Dear all,
I have seen several people hacking their Philips Hue Implementation with CodeDevices[1] while it could be fixed by implementing PUT into the HTTP Device.
POST and GET is unfortunately not sufficient for the Philips Hue API.
Accordingly to the Developer API we can only use "GET/POST/HEAD" and therefore I don't see any way to implement this myself: http://razberry.z-wave.me/docs/zwayDev.pdf (Page 40)
Happy to hear your feedback.
Regards,
darkyat
[1] https://forum.z-wave.me/viewtopic.php?f ... 66&p=58033
PUT Method in HTTP Device
Re: PUT Method in HTTP Device
Do you mean what we need to add PUT method to our http.request() ?
-
- Posts: 126
- Joined: 30 Sep 2016 23:49
Re: PUT Method in HTTP Device
Yes, I would also support to have a "PUT"-Method, because controlling HUE-Lamps do really need GET, POST AND PUT as a method.
Right now I have to call a universal bash-script with some CURL-Parsing doing this job.
e.g. system("/usr/local/bin/hue-universal-schalter.sh on %% 25000 254 4"); for a Codedevice.
However, this basically works, but the problem will be, if you have e.g. 10 HUE-Lamps in your home, calling a system-call will definetively slow down the whole system (Rasbperry pi3 in my case) a lot! If you are going to create/recall scenes with more than one hue (unless you do all the work within the bash-script, but that's not really nice to do....)
So, would be great to have HTTP PUT Methods in some places.
Right now I have to call a universal bash-script with some CURL-Parsing doing this job.
e.g. system("/usr/local/bin/hue-universal-schalter.sh on %% 25000 254 4"); for a Codedevice.
However, this basically works, but the problem will be, if you have e.g. 10 HUE-Lamps in your home, calling a system-call will definetively slow down the whole system (Rasbperry pi3 in my case) a lot! If you are going to create/recall scenes with more than one hue (unless you do all the work within the bash-script, but that's not really nice to do....)
So, would be great to have HTTP PUT Methods in some places.
Last edited by klaasjoerg on 10 Nov 2016 11:52, edited 1 time in total.
Re: PUT Method in HTTP Device
Just checked, PUT is supported by http.request() as well as DELETE and HEAD. I'll update the doc once you confirm that it works for you.
-
- Posts: 126
- Joined: 30 Sep 2016 23:49
Re: PUT Method in HTTP Device
Hi, ok, but it's not really shown then in the app.
There is only GET and POST selectable...
There is only GET and POST selectable...
- Attachments
-
- ss.png (226.33 KiB) Viewed 11089 times
Re: PUT Method in HTTP Device
HTTP Device to support only GET and POST. And this makes sence. Because usually only those are used.
But those who uses PUT require real REST API, mens getter work with GET, setter with PUT. So a dedicated module should be done for such cases.
For Hue I would suggest a special module like: http://developer.z-wave.me/?uri=public#/web/apps/317
But those who uses PUT require real REST API, mens getter work with GET, setter with PUT. So a dedicated module should be done for such cases.
For Hue I would suggest a special module like: http://developer.z-wave.me/?uri=public#/web/apps/317
-
- Posts: 126
- Joined: 30 Sep 2016 23:49
Re: PUT Method in HTTP Device
In my case, it was only needed for hue control, which i curently handling with bash-shell-scripts and curl.
However, the Hue-Module you just mentioned, simply doesn't work currently. An error is thrown and effective not working at all. Unfortunately.
However, the Hue-Module you just mentioned, simply doesn't work currently. An error is thrown and effective not working at all. Unfortunately.