Enter forum description here ...
+2

New bOS's RPC API + Tasker | Tutorial

ComfortClick ComfortClick 5 years ago in Devices / Other updated by Brent Broge 5 years ago 1

Hello!

Here we have a short tutorial on how to integrate bOS and TASKER using new bOS’ RPC service.

bOS offers a JSON RPC Service for integration with Tasker, IFTTT and other services.

This tutorial will show bOS RPC service interacting with TASKER on Android in a simple task, but the important thing here is to understand how to set-up the RPC service so you can do more complex integrations.

RPC service on the new bOS offers HTTP basic authentication with username and password.

In this example, we'll be using Tasker to turn a Z-Wave Socket off.

Of course, this can be done easily within bOS Client app, but this is just for demo purposes. You can change and adapt the task to your needs, for example, "If my phone battery is lower than 80%, turn the socket on", or "If I’ve reached my house, turn front door light on". The possibilities are endless.

Step 1: Configure your RPC service

  • In bOS Configurator, under API, enable RPC and define your Username and Password:

Image 2046


Step 2: Find your Device Path

  • In this example, the Info tab from the Z-Wave socket device will show us the path: Devices\Z-Wave\Socket\Basic

Image 2047


Now we need to form the JSON body to POST on TASKER.

The Path we have is: Devices\Z-Wave\Socket\Basic

We need to double the backslashes on the Path to form the JSON body to POST on TASKER service, so now we have: Devices\\Z-Wave\\Socket\\Basic

The simple SetValue body post looks something like this:

{"objectName":"INSERT PATH HERE","valueName":"Value","value":"true"} where "value":"true" is to turn the value to true or 1. You can change to false or 0 or look for other RPC examples.

For our valueName, we have “State”:

Image 2048

To turn the Socket off, our body post is:

{"objectName":"Devices\\Z-Wave\\Socket\\Basic","valueName":"State","value":"false"}

Step 3: Tasker

  • Create a new task and include the “HTTP Post” action:
    Image 2050

Image 2051

Done! Now every time we run this task our Socket will turn off.

This is a simple example for demo purposes, but with more complex commands you can do whatever you want... call scenes, set other values, etc.

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'"]}

I hope you’ve enjoyed the tutorial and please post here the examples and ideas you have using the new bOS’ RPC API.

+2

Alexa + blinds

Noel Fuentes 5 years ago in Devices / Other updated by Ricardo Pinto | visiontech pt 1 year ago 9

Hi,

Since Alexa and Comfortclick are now in spanish, I've been doing some testing. It really works fine. But, what I'm missing is a "Blinds" Category in Alexa configuration in bOS. Is there a way to say "Alexa, raise/lower the blinds" (obviusly, in spanish :) ) using only one Endpoint or variable?

Thanks in advance.

Regards

+2
Under review

Unable to handle data from Json array

Pascal Platteel 6 years ago in Devices / Http updated by Sebastian Salmhofer 4 years ago 3

When using the http driver, I am able to connect to an API and process the Json data. For example:

{

       "id": 60662,

       "country": "NL",

        "main": true

}


But when the data is returned in a Json array, the data cannot be parsed! For example, the folowing respons cannot be handled by Comfortclick:


[

  {

       "id": 60662,

       "country": "NL",

        "main": true

   }

]


or


[

  {

       "id": 60662,

       "country": "NL",

        "main": true

   },

  {

       "id": 906428

       "country": "UK",

        "main": false

   }

]


When will support for Json array's be implemented? A lot of sites are returning Json data within an array nowedays.


Or is there an other workarround to process Json data within an array?

+2

Sonos cover picture

Francois Lesueur 6 years ago in Devices / Sonos 0

All objects are available to use in panels, except the cover picture. It's only available on the standard control, and it's a shame, because a cover picture is always nice looking, for example on a free positioning panel showing an entire room. Would it be possible to add this cover picture object to the list of available objects ? 

Another nice improvement would be the ability to group players without going through the Sonos App - but of course that's a bit more complicated. 

+2
Under review

Can I set Z-Wave parameter by task?

kim nguyen 6 years ago in Devices / Z-Wave updated by Isaac Mintah 5 years ago 5

is it possible now or in the future if something trigger then set a zwave device parameter?

+2

Interfacing with Resol VBus using Basic HTTP

Scott White 7 years ago in Devices / Http updated 7 years ago 0

I have ComfortClick interfaced to my KNX devices but I would like to also link to my Solar Controller.  The controller is a Resol Deltsol MX  http://www.resol.de/index/produktdetail/kategorie/1/id/69/sprache/en connected to the Resol DL2 Dataloger http://www.resol.de/index/produktdetail/kategorie/2/id/12/sprache/en


All Resol and compatible controllers use the VBus and their are a variety of ways to connect to it.  You can get raw VBus over TCP by telneting to port 7053 of any device on the VBus with an Ethernet interface (see here https://danielwippermann.github.io/resol-vbus/vbus-over-tcp.html) for example.  This lets you issue commands as well as read data.


Initially I am just trying to read data from the bus by using the JSON Data Download API https://danielwippermann.github.io/resol-vbus/dlx-data-download-api.html


If I connect to my device on the following URL I get a JSON formatted response


http://dl2/dlx/download/live?sessionAuthUsername=admin&sessionAuthPassword=password


I am trying to read the temperature that is available as "value" in the following snipit


        "headersets" : [
        {
                "timestamp" : 1506413326.784000,
                "packets" : [
                {
                        "header_index" : 0,
                        "timestamp" : 1506413311.424000,
                        "field_values" : [
                        {
                                "field_index" : 0,
                                "raw_value" : 22.900000,
                                "value" : "22.9"
                        },



Using the basic HTTP device with the the following settings I am able to read this Temp

Image 797



Image 796


Image 798


Image 799


The JSON token name is 


headersets[0].packets[0].field_values[0].raw_value

+1

Run bOS functions with Microsoft Power Automate

Ricardo Pinto | visiontech pt 11 months ago in Devices / Http updated 11 months ago 1

Hello everyone,

There a bunch of times, where I'm sitting at the office in my workstation, and I need to turn on the office table light.

I could:

  1. Move my ass and reach to the office entrance, and push the KNX button
  2. Pick up the phone, open the bOS app and navigate into the office room to turn on the light
  3. Open the bOS Windows app and do exactly the same

But honestly I was looking for a quicker way to turn on/off the office light while I'm at the computer.

So I opened Microsoft Power Automate, and created two flows to work with bOS RPC API:

  • One flow to turn ON the light; And a shortcut to fire it up (CTRL+SHIFT+L)
  • One flow to turn OFF the light; And a shortcut to fire it up (CTRL+SHIFT+D)

And that's it! Now I can quickly turn on/off the office table light while I'm working, without having to open the bOS apps, by using the bOS RPC API and Microsoft Power Automate.

Lazy asses, you can thank me later :D

Best regards

Ricardo Pinto

    +1
    Under review

    RGB Color Picker - proposed improvements

    Artur S 1 year ago in bOS Configurator / Devices updated by ComfortClick Support 1 year ago 1

    Hello,

    I have one proposition to improve the color picker addon/function. Now bOS allows us to use four separate values for RGBW channels. Additionally we have no enough possibilities to convert it to different kind of values, required by the other devices/systems. For example - KNX uses only RGB, Yeelight RGB in consolidated decimal format...

    I believe that for Comfortclick Team is it very easy and simple to add additional values, to use it alternatively to separate channels. My proposition:

    What we have now:

    R - decimal 0-255 or 0-100

    G - decimal 0-255 or 0-100

    B - decimal 0-255 or 0-100

    W - decimal 0-255 or 0-100

    What is needed:

    R - HEX 00-FF

    G - HEX 00-FF

    B - HEX 00-FF

    W - HEX 00-FF

    RGB - decimal (R*65536+G*256+B) 0-16777215

    RGB - hex 0x00-0xFFFFFF

    Do anybody need something else? What do you think about this?

    Best Regards,

    Artur

    +1

    Philips Hue API v2 Events (Server-Side Events)

    Ricardo Pinto | visiontech pt 1 year ago in Devices / HUE updated 1 year ago 8

    Hello everyone,


    First of all, hope you all had a very nice Christmas, with all the beloved ones.


    I'm using some Philips HUE sensors, and I was actually using some of them to turn KNX lights on.


    The problem, is that we need to constantly pool the API, which is time and resource consuming for the HUE hub and Comfortclick.


    Philips HUE updated the API to the v2, and they have some interesting features, like the events, which allows to keep a constant connection to a data stream, and get realtime updates without the need to constantly pool the HUB.


    https://developers.meethue.com/develop/hue-api-v2/migration-guide-to-the-new-hue-api/#Event%20Stream (Login needed to see the API docs)


    Side note:


    I have to trick the HUB about the sensor. The sensor needs to be active, and for that at least one HUE light has to be linked. But on my case I don't want to turn on any HUE light, but rather a KNX light. For that, I link the sensor to a random HUE light, and set the actions to do nothing when detecting movement (so I can just extract the true motion from the json).


    Back to the topic:


    So I've tested the curl command, and I really get the realtime updates, and it looks awesome.


    Problem: I can see this realtime updates on the Windows console, by using the curl command, as stated on their documentation:


    curl --insecure -N -H 'hue-application-key: ' -H 'Accept: text/event-stream' https:///eventstream/clip/v2

    But, I would like to do this on ComfortClick. I've tested several options, but none of them worked.


    Anyone can eventually enlighten me, if it's doable?

    +1
    Under review

    Cannot program KNX with Jigsaw and ETS 6

    Kristián Vojčík 2 years ago in Devices / KNX updated by Joaquim Matos 2 years ago 22

    Hello.

    I having big trouble to programming KNX over Jigsaw with ETS 6 when I test for bus it return error but I can see data on bus with diagnostic but wehn I try to program something I got error Connection closed by remote device. Have anybody similar behaviour?