Ha-bridge: is it possible to control the devices HA-bridge with a http request?

Created on 19 Feb 2017  路  7Comments  路  Source: bwssytems/ha-bridge

Hello,
is it possible to control the devices HA-bridge with a http request?
If is possible, my home automatic (loxone) can control the harmony via ha-bridge. It would be nice ;)

e.g.: http://192.168.178.xx:xx/api/TV/on

Simon

image

question

All 7 comments

Yes, it is in the README here: https://github.com/bwssytems/ha-bridge#hue-rest-api-usage

Hello,
thank you.
Maybe i dont understand:

http//192.168.178.102:81/api/lights/5/state?on=true&bri=200
doesn麓t work.
image
Whats is wrong?
image
Thank you very much
Simon

These are PUT and POST requests that are sent to the server. Browsers only send GET requests. You will need to read up on REST API's as a generic concept.

Did you figure this out?

Hey bwssytems, it seems that the question was on how to use GET method to turn on/off/dim things.
Your API is fine as it is but some of us are not only used to Domoticz way of using the JSON API, but more importantly - to use the GET method straing from i.e. smartwatch.

Garmin smartwatches are good example - the can do a GET HTTP but no more. I.E.: https://apps.garmin.com/da-DK/apps/ac9a81ab-a52d-41b3-8c14-940a9de37544;jsessionid=76799D266EE60E770D7A36E96E73B8B5

Would you consider adding the GET as a way to turn on/off things? Would be great!

Well, the API is emulating the HUE API protocol. I was not thinking about using GET on top of the PUT or POST requests.

Sure! I would be kind of silly and against the actual proper way of API, right? But imagine somebody who is just here to use the API in any way possible - his problem is that some other APIs only work with GET. And Domoticz JSON API might be the first API they ever encouted - so it's natural way for them. We just do not see this as "going in the wrong direction".

And then - oh boy - comes the smartwatches - the aformentioned Garmin apps - they can do GET only (two apps are currently there).

So few folks, me included - would just shout YES if your API would be able to do exactly what Domoticz HSON API gives us - ability to turn on/off with just a GET. And I personaly love that I can select either GET/PUT when building a device with your ha-bridge.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mihaifireball picture mihaifireball  路  16Comments

scyto picture scyto  路  6Comments

webdandy picture webdandy  路  15Comments

pattont picture pattont  路  5Comments

JsChiSurf picture JsChiSurf  路  6Comments