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

Insert glob variable into api put


Question

Posted

Please login or register to see this code.

 

Im trying to set a temperature value (Temp) saved as a globale variable into a device.

With a direkt number it is working fine but I want to use the global Variable.

I dont know how to insert it correctly to the code.

Can someone help me?

 

 

Please login or register to see this code.

 

7 answers to this question

Recommended Posts

  • 0
Posted

Make GET request first 

change value and make PUT with request what you get from GET ;) 

your Json totally incorrect ;) 

  • Like 1
  • 0
  • Inquirer
  • Posted (edited)

    When I Insert a nummer it will be updated in the Device...

    So the function itself iseems to be working.

    I only want to use the local Temp instead 12.34 :)

     

    Please login or register to see this code.

     

    Please login or register to see this attachment.

    Edited by StefanS
    • 0
  • Inquirer
  • Posted (edited)

    The other Code I tried with out success is the following

    How would the Code Look like when I first habe to make a get request and what values Do I have to geht?

    Please login or register to see this code.

     

    Edited by StefanS
    • 0
    Posted

    1st use api call instead of HTTP

    2nd (5 mins I am turing ON  my pc)

    • 0
    Posted

    http://192.168.1.36/docs/#!/globalVariables/getGVariables

    Please login or register to see this image.

     

    ew3mpJSNBn.png

     

    so, 

     

    Please login or register to see this code.

    Q74Y3HfNzR.png

    • Like 1
    • 0
  • Inquirer
  • Posted

    Thank you.

    I will try tomorrow and give you the redult.

    • 0
    Posted

    Great post, exploring this now, thanks to 10der.

    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...