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


  • 1

Virtual Device on HC Lite (String No LUA)


Question

Posted

Hello

 

Simple question really, it's either a yes or no:

 

I have a virtual device with a slider on it, and want to post the slider value to a rest service on another device.

 

The slider movement triggers the rest call, all good, however how do I send it the value in the HTTP String

 

POST /slider?value=xxxxx HTTP/1.10x0D0x0A0x0D0x0A

 

Where xxxxx is the value of the slider.

 

I have a button to trigger things, but want the slider to send my app current slider value so I can have my app set a value.

 

 

 

 

1 answer to this question

Recommended Posts

  • 0
  • Inquirer
  • Posted

    Another question on JSON API for virtual devices, I can change the caption by amending the JSON and pushing it back which works, however the slider values do not stick.

     

    Either by changing the json directly value for slider or the ui.slidername.value. The server returns 200, but the value does not represent what I changed it to?

     

    Is there a simple put command example I am missing? I see the slider has a setSlider property, but I don't know how to call it from a PUT, what is the valid JSON Action to change the slider?

     

    Thanks

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