Ha-bridge: Help Comfortclick API - write to http device

Created on 22 Mar 2018  路  7Comments  路  Source: bwssytems/ha-bridge

Hi,

Kindly need help, i am trying to using HA-Bridge in comfortclick https://www.comfortclick.com/Software/Manuals/BOSServer but i don't know to use the http request in HA-Bridge, here is the documentation

To call a RPC Service a HTTP POST call must be preformed with data content-type = "application/json";

Service offers the following commands:

http://localhost:81/SetValue

POST data example (Turn ON a light): {"objectName":"Devices\EIB\Light 1","valueName":"Value","value":"true"}

http://localhost:81/GetValue

POST data example (Get light status): {"objectName":"Devices\EIB\Light 1","valueName":"Value"}

http://localhost:81/CallFunction

POST data example (Send alert to user):
{"objectName":"Building\General\Users\User","functionName":"SendAlert","value":["'Hello'"]}

please help, if this http post could be use in HA-bridge

Thank you

question

All 7 comments

Just use the manual add function in the ha- bridge and use the HTTP Device type for your call. You can set it to POST with the drop downs. Don't forget to add the command line to your on/dim/off urls with the add button to the right.

hi,
i've tried a couple times (below picture)
image
but still not works, please give me more detail,

Type : HTTP Device
target item : ???
HTTP Verb : POST
HTTP body : ???
HTTP headers : ????

Thank you

Your http body data needs to be quote escaped like so

"{\"filedname\":\"value\","\nextvalue\":\"nextdata\"}"

The gui is handling strings already and to get the quotes into the data to send it needs to be escaped in.

hi,

i've tried to change HTTP Body into this

"{"objectName":"Devices"\"Alarm","valueName":"Value","Value":"True"}"

but still not work

sorry i am newbie in this, please help

You need the slash quote to escape it..... not " but \"

hi,

is this correct?

"{"objectName":"Devices\Alarm","\valueName":"Value","\Value":"true"}"

would you just give the example using this arguments "objectName":"Devices\Alarm","\valueName":"Value","\Value":"true"

thank you

You cannot have quotes within quotes, they need to be escaped:

"{\"objectName\":\"DevicesAlarm\",\"valueName\":\"Value",\"Value\":\"true\"}"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

memojo picture memojo  路  10Comments

sanderlv picture sanderlv  路  15Comments

Lorccan picture Lorccan  路  4Comments

MallocArray picture MallocArray  路  3Comments

oktane83 picture oktane83  路  15Comments