0

"State" not triggered on RPC request

michielkenis 5 years ago in General updated by Ricardo Pinto | visiontech pt 4 years ago 6

I have a working IFTTT connection with the RPC link, based on the tutorial. 

It works just fine for "Value" ValueNames, but whenever I want to control scenes, nothing happens... 

My scene looks like:

Image 2233

Image 2232

And my JSON body looks like:

{"objectName":"Tasks\\Verlichting\\Avondeten","valueName":"State","value":"true"}

Other calls like below work just fine... 

{"objectName":"Devices\\KNX\\2.status\\status verlichting on/off\\status L004 on/off","valueName":"Value","value":"true"}

What am I missing here? 

Thanks!

+2

Hi,

To control scenes, like running a scene for example with the RPC service, you should use the Run function.

Example:

{"objectName":"Tasks\\Cenarios\\Cenario - Dormir","functionName":"Run"}


Best regards

Hi Ricardo, 

First of all, thanks for getting back to me!

Is there documentation for this? I mean when to use what call/function to trigger for which type of trigger? 

I have Scenes (light/blindings), Switches (light), Schedules (HVAC, screens,..),... etc. 

I've tried your solution, but no dice... I don't get my Scenes (either located under "Devices", either under "Tasks") running using IFTTT...

Hi,

Well, the RPC documentation is very small: https://www.comfortclick.com/BOS/KnowledgeBase/RPC

As far as its indicated, in only supports SetValue, GetValue, and CallFunction.

I wanted to try to run a scene, so I went after my scene configuration, and noticed that on the Functions tab (on top), it shows Run(), so I assumed that it could be called using CallFunction.

So my configuration on IFTTT, is something like this:

URL: https://username:password@my_dyndns_address/API/RPC/CallFunction

Method: POST

Content Type: application/json

Body: {"objectName":"Tasks\\Cenarios\\Cenario - Dormir","functionName":"Run"}


Are you using the correct Path?

Please go to your scene, and on the upper menu, open up the Info tab, and copy the exact name.

In my case my scene path is called: Tasks\Cenarios\Cenario - Dormir

So by composing and adding the double slash, I end up with {"objectName":"Tasks\\Cenarios\\Cenario - Dormir","functionName":"Run"}.

So I'm basically calling a function, which is to run the scene.

I use it everyday at bedtime, to avoid opening the bOS app.

Best regards

Hi Ricardo, the magic lies in the CallFunction part. I used the SetValue in my URL. 
Thanks a million for your help! 

Is there a way we can contribute to this documentation? Or is this enclosed to ComfortClick themselves? 

+1

Hi Michiel,

The documentation provided on the website, only ComfortClick can change.

But everyone can improve the documentation either by creating a post here, or send to ComfortClick team.

Basically, the existing RPC features, allow almost anything to be controlled, for example:

SetValue

True or false for lights, to enable or disable schedules...etc
To update string variables, doubles...etc

GetValue


To basically get any value from any variables..

CallFunction


Run (to run scenes, etc)
StartSimulation / StopSimulation (to start / stop presence simulation nodes)
SendAlert (to send alerts to users)
RunFromClient / AbortFromClient (to run / abort running a task)

Etc etc...

It's a matter of exploring the Values and Functions available on every node actually, and try it out...

With IFTTT integration we can do whatever we want, either integrate bOS with other IFTTT services, or the opposite.

Best regards