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
ALaguna

Updating GlobalVar via API doesn't trigger scenes

Question

I've tried to update a Global Variable with the REST API sending a PUT request to the HC2 IP. That works like a charm. However I've noticed that it wont' run scenes associated with said var. Anyone else have this issue?

Share this post


Link to post
Share on other sites

15 answers to this question

Recommended Posts

  • 0

Add to REST body invokeScenes: True.

 

Example of body: {"value":"xyz","invokeScenes":true"}

 

I know about that for about 1 year ;-).

Edited by jakub.jezek

Share this post


Link to post
Share on other sites
  • 0
  • Inquirer
  • Thanks about that. It doesn't appear on the docs (

    Please login or register to see this link.

    ) so it was impossible for me to know. 

    Share this post


    Link to post
    Share on other sites
    • 0
    On 29. 9. 2016 at 5:19 PM, ALaguna said:

    Thanks about that. It doesn't appear on the docs (

    Please login or register to see this link.

    ) so it was impossible for me to know. 

    No, they do not have at portal

    Please login or register to see this link.

    and even you cannot see it from active documentation (

    Please login or register to see this link.

    ).

     

    I even asked Fibaro in one thread, simillar to this one about setting that on true by default, when variable is changed. When i will go to Poland i will stop in Fibaro with several questions, including feature request with invokeScenes property.

     
     
    Edited by jakub.jezek

    Share this post


    Link to post
    Share on other sites
    • 0

    Can someone give me an example of a PUT request for updating a global variable via the API.

     

    Thanks

     

    Darren

    Share this post


    Link to post
    Share on other sites
    • 0
    On 14. 4. 2017 at 6:28 PM, darren-mc said:

    Can someone give me an example of a PUT request for updating a global variable via the API.

     

    Thanks

     

    Darren

     

    Hi Darren,

     

    It should be something like that, if you want to start a scene on variable change:

    Please login or register to see this code.

    Content_Lenght is some number. It is Lenght of whole body starting with { and ending with }.

    Share this post


    Link to post
    Share on other sites
    • 0
    2 hours ago, darren-mc said:

    Thanks for that...I was trying to work that into a maker call from IFTTT.

    hi @darren-mc

     

    Did it work okay  ?

     

    thanks

    -f

    Share this post


    Link to post
    Share on other sites
    • 0

    Hello

    , can you please tell me how to write this call correctly in IFTTT.

    I would like to update a variable via the IFTTT.

     

    Many Thanks.

     

     

    Share this post


    Link to post
    Share on other sites
    • 0

    I couldn't work out how to put this into a web hooks call...I created a virtual and changed the variable through that.

    Share this post


    Link to post
    Share on other sites
    • 0

    Google Assistant

    webhook

     

    Please login or register to see this link.

    body

    { "value": "Recognized word", "invokeScenes": true }

     

    This works but how can I get the recognized word fom Google Assistant into the body.

    It should also go over the API from Google Assistant  but I do not know how I can realize this.

    wenn man es schaffen würde das erkannte wollt in eine Variable zu writing then everything is possible..

    Share this post


    Link to post
    Share on other sites
    • 0

    Hi,

    As having similar problem, can someone write an example of updating global variable straight from browser http request, I mean like:

    http://username:[email protected]:hc2port/api/globalVariables/"variable_name" "+ update to data"

    or point me to some site where I can get a clue for that.

    As HC2 does not provide a solution getting data straight from mysql database, I need to make another machine to update global variable.

    Thanks for your time.

     

    Share this post


    Link to post
    Share on other sites
    • 0

    The topic has been moved from "

    Please login or register to see this link.

    " to "

    Please login or register to see this link.

    ".

     

    Temat został przeniesiony z "

    Please login or register to see this link.

    " do "

    Please login or register to see this link.

    ".

    Share this post


    Link to post
    Share on other sites
    • 0

    have you used this site yet? it generates http commands. not sure about requests though 

     

    Please login or register to see this link.

    Share this post


    Link to post
    Share on other sites
    • 0
    3 hours ago, matt1981 said:

    have you used this site yet? it generates http commands. not sure about requests though 

     

    Please login or register to see this link.

    have been on the site, it helps understandig how to steer a device not update globalvar.

    got an temp solution by creating webpage on the server with needed data from mysql formatted to json and hc2 to pull the data from the webpage over VD.

    nasty but working...

    Share this post


    Link to post
    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...