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

Moving slider in VD


Bodyart

Question

Hello ALL,

 

as a newbee and beginner in LUA, I'm trying to build a VD for my Logitech Squeezebox Touch, where i have a slider to set the volume and also 2 buttons to increase and decrease the volume. Now I don't know how to move the slider by software, when i in- and decrease the volume by the buttons.

Anybody an useful idea?

 

Thanks in advance.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hi @Bodyart,

 

Here is code to put for button Volume Up:

Please login or register to see this code.

and code to put for button Volume Down:

Please login or register to see this code.

For code to work on your VD you need to check ID of the slider and change this line (bolded):

 

sliderValue = tonumber(fibaro:getValue(selfId, "ui.Slider1.value"))

 

Also you need to check position of slider on VD and change this line accordingly (bolded):

 

fibaro:call(selfId, "setSlider", "4", sliderValue)

 

Code that changes volume on Logitech Squeezebox Touch can still be put under the slider, because every time when this line is executed:

Please login or register to see this code.

it will also execute code that is under slider.

 

BTW due to some reason slider is not moved graphically on web GUI but you can see that volume changes but in mobile application slider moves as expected!

Edited by Sankotronic
Link to comment
Share on other sites

  • 0
  • Inquirer
  • 20 minutes ago, Sankotronic said:

    BTW due to some reason slider is not moved graphically on web GUI but you can see that volume changes but in mobile application slider moves as expected!

    Dobar dan Zoran,

     

    thank you so much for your great support! I've seen the code you published for me many, many times, but it didn't move the slider in the web gui. That's why I thought, that i made mistake somewhere. Now I checked it on my mobile app on phone and tablet and indeed it works... hooraay!

     

    I wasn't aware that Fibaro was that much buggy yet.....

     

    Thanks again,

    Peter

     

    B.T. W. Where is to find the information you often publish like for example the 4 possible states of interactivew push messages ie: Info, Success, Warning & Critical? Is there somewhere documentation to find?

    Edited by Bodyart
    suuplemental question
    Link to comment
    Share on other sites

    • 0
    1 hour ago, Bodyart said:

    B.T. W. Where is to find the information you often publish like for example the 4 possible states of interactivew push messages ie: Info, Success, Warning & Critical? Is there somewhere documentation to find?

     

    Dobar dan Peter,

     

    You can check 

    Please login or register to see this link.

    . There you can find some basic stuff about LUA and REST API. It is really missing some more examples but all that is missing there can be found here on Forum thanks to many forum members that are wiling to help!

     

    Kind regards

    Zoran

     

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