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

Question

Posted

Can _sliderValue_ be modified in HCL before transmitting a virtual device request?

Why?: If you are setting a device volume with a scale of 0-20 it get's very hard to use the slider without hurting you ears once in a while

Please login or register to see this image.

/emoticons/default_icon_smile.gif" alt=":-)" />

10 answers to this question

Recommended Posts

  • 0
Posted

Nix... Tror du bliver nød til at have et eksternt script imellem.

You need a server and a script which receives the slider value and divides it by 5 before passing it on. Can be done with a webserver and a simple php script

  • 0
  • Inquirer
  • Posted

    Tak for tippet

    Yes that would be fairly easy but I want to keep the number of devices down to avoid new single point of failures.

    • 0
    Posted

    Yeah i can relate to that. But it is simply outside of the capabilities of the HCL i'm affraid.

    • 0
    Posted

    Why not do the calculation in your LUA script of your Virtual Device before sending it?

    I do it the exact same way for my Philips Hue lamps to set the brightness (0-255) based on the slidervalue (0-100)

    Please login or register to see this code.

    • 0
  • Inquirer
  • Posted

    Hi Leon. HCL does not support LUA

    • 0
    Posted

    Cosworth32, global variable or scene in block?

    • 0
    Posted

    Sorry Cosworth32, missed the L part

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    • 0
  • Inquirer
  • Posted
    Cosworth32, global variable or scene in block?

    Sorry A.Socha, I missed you question completely.

    It is the _slidervalue_ in a virtual device slider "button"

    • 0
    Posted

    that was a answer (it is not nice but possible)

    VD with slider

    scene where you checking slider level and pressing correct button with value

    VD with predefined value in buttons

    example

    ifs slider VD is on 20% then use button 11 where you gonna send value 400

    maybe plugins will be some help but still if you gonna want use all your unlimited ideas only solution will be hc2

    • 0
  • Inquirer
  • Posted

    Thanks A.Socha

    I've ended up doing it via an external php script server instead. Works like a charm.

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