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

QuickApp player questions: power property, icon state and volumeSlider range


Question

Posted

I have a few questions regarding this type of QuickApp.

 

First of all, what exactly does the power property do? When I set it to true or false, nothing seems to change — the QuickApp icon remains greyed out.

Is there a way to “activate” the icon in a QuickApp so that it visually indicates the device is turned on?

 

Please login or register to see this code.

 

The turnOn and turnOff actions also don’t appear to be connected to anything, and they definitely do not react when clicking the QuickApp icon. In my opinion it would be quite useful if clicking the icon triggered these actions.

 

Please login or register to see this code.

Is this a bug, or is it intended behavior and I’m simply not using it correctly?

 

Is it possible in this type of QuickApp to modify the values of a volumeSlider so that the maximum value is, for example, 60 instead of 100?

8 answers to this question

Recommended Posts

  • 0
Posted
13 minutes ago, marczu_83 said:

First of all, what exactly does the power property do? When I set it to true or false, nothing seems to change — the QuickApp icon remains greyed out.

Is there a way to “activate” the icon in a QuickApp so that it visually indicates the device is turned on?

 

Hi @marczu_83,

 

"power" property is to register power consumption. To turn on/off player you need to add buttons with code that will do that. If you want to turn on/off player with click on icon then you need to use other type of device, player does not provide that feature.

 

To use icon to show status of the player you need to use code to do that. You can download my Sonos API Player to learn how to do that from download section.

 

20 minutes ago, marczu_83 said:

Is it possible in this type of QuickApp to modify the values of a volumeSlider so that the maximum value is, for example, 60 instead of 100?

 

It should be possible. I use following code to change range of the color temperature slider:

Please login or register to see this code.

 

Didn't try this on my player for volume, but should work.

  • Like 1
  • 0
  • Inquirer
  • Posted

    In your QuickApp you probably have your own slider and know its name, for example sldCT. Does anyone know the name of the slider that is “built-in” in the QuickApp Player?

     

    • 0
    Posted
    6 minutes ago, marczu_83 said:

    In your QuickApp you probably have your own slider and know its name, for example sldCT. Does anyone know the name of the slider that is “built-in” in the QuickApp Player?

     

    Normally you don't manipulate the slider directly. You set the volume property and the QA (of type player) will update the volume slider

    self:updateProperty('volume',<integer>)

    ...and we also have

    self:updateProperty('mute',<bool>)

    self:updateProperty('state',<string>)

    • 0
  • Inquirer
  • Posted

     To be more specific…i am looking for a way to limit the slider (max value) in a QuickApp of type Player. for that i need the name of the slider but i cant find it :)

    • 0
    Posted
    28 minutes ago, marczu_83 said:

     To be more specific…i am looking for a way to limit the slider (max value) in a QuickApp of type Player. for that i need the name of the slider but i cant find it :)

    Why? the volume is shown in %...  Don't you want to have 0-100%. ?

    • 0
    Posted

    The name is 

    self:updateView("playerVolumeSlider","value","55")
    but it seems to behave a bit strange on min/max properties....
    • 0
  • Inquirer
  • Posted (edited)
    Cytat

    Why? the volume is shown in %...  Don't you want to have 0-100%. ?

    Actually, you’re right. I hadn’t looked at it from that perspective.

    What bothers me the most is that you can’t turn the device on or off just by clicking the icon. 

     

    Edited by marczu_83
    • 0
    Posted
    6 minutes ago, marczu_83 said:

    Actually, you’re right. I hadn’t looked at it from that perspective.

    What bothers me the most is that you can’t turn the device on or off just by clicking the icon. 

     

    You wan't to turn it off, stop, or pause? :-) 
    Well, it's just the way the player type is specified and it 
    doesn't do anything when icon clicked - as opposed to ex. a binary switch.

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