Sonos Plus - Questions

Hi @alex88

Looking at your query you can already now reduce your network traffic:

group.get.state includes volume, mutestate, playbackstate. So you don't need to query them separately.
See get state documentation

You might simplify your program as

  • a standalone player is always treated the same as a group.
  • you dont need to send "group" commands to the coordinator - any group member is also ok. node-red-contrib-sonos-plus does the routing for you automatically (only group commands, not player commands).

So it seems that you need: volume, mutestate for group and player, playbackstate, queue mode (shuffle, etc) and the content (group.get.trackplus) - that shoule be possible with events (without polling).

For changes regarding the SONOS queue I have to explore more.

1 Like

Thanks for getting back, I'm slightly distracted with replacing my HC2 whole house heating with something I am building in NR. Once it's done I will come back to my floorplan, hopefully by then you can report back on how you when with the SONOS queue.

I'm looking forward to implementing more audio in my HA system later using your contrib!

Hi hklages

in the wiki there is a nice sample dashboard
do you have the flow of that dashboard ???

Nico

Hi Nico @NicoLP .
Here is the flow.

For your information:
There are 5 groups:

  1. just the album cover + station name, title, author if available
  2. some control button and the group information
  3. TV and playlists to choose my favorites fast
  4. Stations -
  5. Automation: My favorite station Arabelle provides nice music but terrible ads and news from 5 minutes before to after every 30 minutes - so I switch to amazon to avoid that.

You will find also some links to ALEXA and to the overiew dashboard page.

flows.json (46.8 KB)

@alex88: you can find the event node at sonos-events

1 Like

@hklages

Thank you for the updates!

My heating panel has just gone live, so I now have some time to look at this.

Do I understand the following correctly?

  • You have created a new node called ā€œSonos eventsā€
  • Each ā€œSonos eventsā€ node listens to a single player and you can configure what you are listening for within the node
  • Each additional thing to listen to, creates a new output on the node
  • You need to implement a unique ā€œSonos eventsā€ node per Sonos player i.e. there is no way to have one node listen to multiple players, or all players in your network
  • You have built the ā€œSonos eventsā€ node in a ā€œlightā€ way so that it does not spam the local network, and hopefully you could have many of these nodes running simultaneously in NR
    • EDIT: first off all, I am a wireshark noob, but it looks like the network I/O when using the ā€œSonos eventsā€ node is unmeasurable by the eye, where-as polling using the ā€œSonos Plusā€ node was increasing my I/O traffic by 4-5x for 4x players, making it impractical to use for 10+ players
  • You would expect the Sonos-Plus node to be used to control (send commands to) Players i.e. ā€œSonos eventsā€ is used to listen, ā€œSonos Plusā€ is used to control

EDIT: I had a little look and the node is a thing of beauty. It appears to have everything one would needā€¦ Iā€™ll plug it into my floorplan and see how it works, but on the face of it, itā€™s fantastic!

My ā€œso-calledā€ value-add:

  • Name: the field loses its value, so the node is always labelled by the Player IP address; please fix this
  • The colour of the node ā€“ take this as you wish, but the orange is a little dark making it a little hard for my somewhat tired eyes to read the text. If you want to keep it dark Iā€™d suggest changing the text to an off-white or else lighted it up a little e.g. turn the saturation down

Brilliant work hklages!!

At a minimum, you need to include a ā€œbuy-me-a-coffeeā€ link somewhere.

@alex88:

You have created a new node called ā€œSonos eventsā€

right, more precise: node-red-contrib-sonos-events

Each ā€œSonos eventsā€ node listens to a single player and you can configure what you are listening for within the node

right

Each additional thing to listen to, creates a new output on the node

right

You need to implement a unique ā€œSonos eventsā€ node per Sonos player i.e. there is no way to have one node listen to multiple players, or all players in your network

right. hmmm - I take it on my list for extensions. Maybe a list as input for the player field.

You have built the ā€œSonos eventsā€ node in a ā€œlightā€ way so that it does not spam the local network, and hopefully you could have many of these nodes running simultaneously in NR

right. For many events, you only need one node (group changes). Only player volume, player mutestate is relevant for a single player and maybe group player volume/mutestate is sufficient.

You would expect the Sonos-Plus node to be used to control (send commands to) Players i.e. ā€œSonos eventsā€ is used to listen, ā€œSonos Plusā€ is used to control

right - My intention is to move node-red-contrib-sonos-plus on the same platform as events and then merge them.

My ā€œso-calledā€ value-add:

Is very much appreciated and implemented in 0.4.2. Should be available now.

Brilliant work hklages!! At a minimum, you need to include a ā€œbuy-me-a-coffeeā€ link somewhere.

Thanks :slight_smile: "buy me a coffee" is already there - donation-by me a
cappuccino

Enjoy and let me know.

0.4.2 tested and updates are working.

Coffees bought!

Have a lovely evening.

Thanks!

Have a nice week end.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.