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

[VD] Sonos Players Status {v1.0} - 3 step setup.


Question

Posted (edited)

Hi,

 

If you are using the sonos-api then you may find this very easy to use VD helpful

It will display the status and volume of each player as well as a house summary of how many are active

The VD below is setup for two zones and is very easy to expand.

 

Three Step setup :-D

1) Import the VD, amend the IP address for your sonos-api device (port should be fine)  and save

2) Add extra players to the table at line 10 (keep name the same as your sonos player/zone name)

Please login or register to see this code.

3) Add extra labels for each extra player/zone and save. (keep default label format which is Label3, Label4, etc)

 

Please login or register to see this attachment.

 

Enjoy !!

-f

 

FILES
Sonos Players Status {v1.0} -----------------------------> 

Please login or register to see this attachment.

 

 

Edited by AutoFrank

14 answers to this question

Recommended Posts

  • 0
Posted

Hi,

 

interessting idea!

You have also to enter IPAdress and Port at the first tab of VD, or?

 

The debug said:

[ERROR] 20:27:40: line 20: attempt to concatenate field 'volume' (a nil value)
 
Regrads Hoggle
  • 0
  • Inquirer
  • Posted
    2 minutes ago, Hoggle said:

    Hi,

     

    interessting idea!

    You have also to enter IPAdress and Port at the first tab of VD, or?

     

    The debug said:

    [ERROR] 20:27:40: line 20: attempt to concatenate field 'volume' (a nil value)
     
    Regrads Hoggle

     

    @Hoggle

     

    ... oops :oops:.. yes, amend the ip address,port should be good

    sorry about that 

    first post amended, suppose its 3 1/2 steps :mrgreen:

    • 0
    Posted

    :-)

     

    Sorry, one Sonos was offline....

    Therefore the error.

     

    • 0
  • Inquirer
  • Posted (edited)
    1 minute ago, Hoggle said:

    :-)

     

    Sorry, one Sonos was offline....

    Therefore the error.

     

     

    @Hoggle

     

    error on both sides so ;-)

    First post amended to help ...

     

    any use to you  ?

    Edited by AutoFrank
    • 0
    Posted

    Yes. 

    I think, I need  an  Offline-Status. 

     

    • 0
  • Inquirer
  • Posted

    @Hoggle

     

    think, I need  an  Offline-Status. 

    ???

    • 0
    Posted (edited)

    Hi,

     

    I got this message : [ERROR] 22:19:18: line 15: Expected value but found T_END at character 1

    Besides that I think I'm not 100% sure what IP adres you are referring to with "sonos-api device" is that one (any) of my Sonos devices ?

     
    note:
    This is my line 10: players = {"1) LivingRoom", "2) Dining Room", "3) Office", "4)Bathroom", "5 dressroom"}
    Edited by Patrick
    • 0
  • Inquirer
  • Posted
    8 minutes ago, Patrick said:

    Hi,

     

    I got this message : [ERROR] 22:19:18: line 15: Expected value but found T_END at character 1

    Besides that I think I'm not 100% sure what IP adres you are referring to with "sonos-api device" is that one (any) of my Sonos devices ?

     
    note:
    This is my line 10: players = {"1) LivingRoom", "2) Dining Room", "3) Office", "4)Bathroom", "5 dressroom"}

    @Patrick

     

    Hi,

    The IP address i'm referring to is for the device that is hosting your sonos-api ( raspberry pi ??)

     

    The format of the table at line 10 is incorrect.. just include the names of the players.. leave out the number and the bracket... 

    Let me know how you get on ...

     

    -f

     

    • 0
    Posted
    14 minutes ago, AutoFrank said:

    @Hoggle

     

    think, I need  an  Offline-Status. 

    ???

     

    If one Sonos is offline (without power) the VD shows an error within Debug. 

    Therefore, in that cases, the VD should show "offline" for that Sonos.

    • 0
    Posted
    17 minutes ago, AutoFrank said:

    @Patrick

     

    Hi,

    The IP address i'm referring to is for the device that is hosting your sonos-api ( raspberry pi ??)

     

    The format of the table at line 10 is incorrect.. just include the names of the players.. leave out the number and the bracket... 

    Let me know how you get on ...

     

    -f

     

    ... oops :oops: I do not use any raspberry pi or other api devices, for now stil to sophisticated for me :) 

    • 0
  • Inquirer
  • Posted

    @Hoggle

     

    think, I need  an  Offline-Status. 

    ???

     

    Ahhhh...

    I'll add that to the next version.

     

    I'm also thinking about having the vd auto-create a global variable for each player to keep track of status so other scenes can trigger off certain states...

     

    Keep the ideas coming....

    -f

    Just now, Patrick said:

    ... oops :oops: I do not use any raspberry pi or other api devices, for now stil to sophisticated for me :) 

    No worries @Patrick

     

    It won't work without the api

     

    Did you see the post that details how you can get it running on a pi reasonably fast...

    • 0
    Posted

    Could someone please explain (briefly) the benefits / reasons for running an extra Sonos API from a Raspberry Pi?  What exactly do you get from all the hassle? 

    • 0
  • Inquirer
  • Posted
    10 hours ago, olekenneth said:

    Could someone please explain (briefly) the benefits / reasons for running an extra Sonos API from a Raspberry Pi?  What exactly do you get from all the hassle? 

    Hi @olekenneth

     

    Like most solutions it's horses for courses buy for me it gives me 2 things 

    Ability to create custom vd's that include music control. I have one for the playroom for the kids and it includes their Sonos and the tv all in one vd. The one for the living room has playlists that can be selected where as the one in the kitchen has the important Sonos, Sat receiver and tv controls 

    The second thing is control so I can automate sequences that include player/zone grouping / ungrouping , leveraging presets, pause all-resume all and triggering actions based on state ( tv switched on the playroom automatically stops the playroom Sonos and in groups it from the kitchen) 

    Kids to bed scene groups their bedrooms, selects station, stops and ungriups all other upstairs players and lowers the kitchen and living room zones to preset level.

    I also use it for my TTS functions.

     

    I've had it running for 18 months now and it crashed once when somebody doing work in the house tripped the whole house. I had it back running in 15 mins.

     

    Hope this helps understand why I use it.

     

    • 0
    Posted

    Hi @AutoFrank ,

     

    Could you please move this topic to the Downloads? ;)

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