Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

HA Bridge REST calls for Amazon echo


icedfusion

Question

Hi All,

 

I have the HA bridge setup all nice on my linux server, but I do not know much about REST commands and how to issue them. I have setup HA Bridge to set some devices on/off etc but I just cannot seem to be able to get HA Bridge to send the request to modify a global variable. I have verified that modifying the variable works using the api's at http:<my fibaro ip>/docs

 

However, when I try to setup what I think is similar, it doesn't work, from the picture below, is there something obvious that I am missing?

 

(what I am trying to achieve is to run a scene based on this variable changing - if there is another way to run a scene via the HA Bridge, the please do tell!)

 

Cheers

 

ice.

 

 

Please login or register to see this attachment.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Well, whilst i haven't worked out why the PUT json commands above are not working, I do have a temp solution I found:

     

    Apparently you can call scenes to run as well as execute actions on devices, I created a scene to turn off all lights and use this in HA bridge to run it via alexa:

     

    Please login or register to see this code.

     

    However, it would be great is someone knows how to add the json body to the ha bridge so that I can access more functionality of the HC2.

     

    Cheers

     

    ice

    Link to comment
    Share on other sites

    • 0

    hi

    i control my VD using scenes. 

    eg to change volume of my Sonos speaker i wrote the following LUA in the scene:

     

    fibaro:call(259, "setSlider", "15", 10)

     

    where 259 is VD ID

    '15' is the item number in the sonos VD

    '10' is volume level

     

    once saved identified scene number and used the API for scene control.

    this works perfectly well.

    i named it sonos cinema ten (i have to use words and not numbers!)

    only thing is i have to say 'Alexa, turn on sonos cinema ten' - so not completely natural but its working........

     

    And yes you have to create the scene for each and every sonos zone and each volume level you want per zone - cant wait for plugin which will hopefully make it easier

    Link to comment
    Share on other sites

    • 0

    API LIST  

    • inverters

    Please login or register to see this code.

      

    • ON / OFF (ex: 

      Please login or register to see this link.

       , 

      Please login or register to see this link.

      Please login or register to see this link.

       , 

      Please login or register to see this link.

       , etc.)

    Please login or register to see this code.

     

    • Please login or register to see this link.

    Please login or register to see this code.

     

    • Please login or register to see this link.

    Please login or register to see this code.

     

    • virtual modules

    Please login or register to see this code.

      

    • Scenes

    Please login or register to see this code.

     

    • Please login or register to see this link.

    Please login or register to see this code.

     

    • Notifications 

    Please login or register to see this code.

      

    • Panel "Energy"

    Please login or register to see this code.

     

    • Recoveries of states and values requettes JSON: 

    Please login or register to see this code.


     

    • Changing / creating variable 

    Please login or register to see this code.

     

    Source: 

    Please login or register to see this link.

    Link to comment
    Share on other sites

    • 0
    On 8.10.2016 at 7:46 PM, morpheus75 said:

    hi

    i control my VD using scenes. 

    eg to change volume of my Sonos speaker i wrote the following LUA in the scene:

     

    fibaro:call(259, "setSlider", "15", 10)

     

    where 259 is VD ID

    '15' is the item number in the sonos VD

    '10' is volume level

     

    once saved identified scene number and used the API for scene control.

    this works perfectly well.

    i named it sonos cinema ten (i have to use words and not numbers!)

    only thing is i have to say 'Alexa, turn on sonos cinema ten' - so not completely natural but its working........

     

    And yes you have to create the scene for each and every sonos zone and each volume level you want per zone - cant wait for plugin which will hopefully make it easier

     

     

    Got a suggestion, not that it's gonna do any big difference. Instead of making scenes for each value on the fibaro you could just do:

     

    http://USERNAME:PASSWORD@FIBAROIP/api/callAction?deviceID=VDID&name=setSlider&argSLIDERID=1&arg2=VALUE

     

    SliderID is not the ID name (it's the number up in the left corner).

     

    I've got a virtual device changing temperatures on electric heaters, therefor I made several commands on HA bridge with different values but I didn't have to make a scene for each command. Only changing the value of the slider.

    Edited by thotil
    Link to comment
    Share on other sites

    • 0

    thanks for all the info. seem to be able to get most things to work.

     

    but i have a virtual device i cant get to work. firstly i have a slider (see pic)

    VDID = 229

     

    I presume the ID = 3 (top left corner) , so i enter this string:

     

    http://xxx:[email protected]/api/callAction?deviceID=229&name=setSlider&arg1=3&arg2=20

     

    however nothing happens when i run it.. 

     

    2nd issue i have, is to press a Virtual button, what ID do you use if there is 3 buttons in a row, they all have the same ID (top left corner) 

     

    Thanks for your help.

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...