Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonos intergration? #38

Closed
18084AZ opened this issue Jan 3, 2021 · 23 comments
Closed

Sonos intergration? #38

18084AZ opened this issue Jan 3, 2021 · 23 comments
Labels
enhancement New feature or request new_player_support

Comments

@18084AZ
Copy link

18084AZ commented Jan 3, 2021

Hi! I wonder if it’s able to play the music through Sonos speaker? I have the options to choose my sonos speakers and it starts to play but there is no sound coming out of the speaker.
Is this just compatibility issue or should I be able to play music through my Sonos speaker? Google devices works great to play music through.

@18084AZ 18084AZ added the enhancement New feature or request label Jan 3, 2021
@KoljaWindeler
Copy link
Owner

Hi, we had that issue before and as of now it seams like sonos isn working.

I'd bet that it is possible to solve this, as it is simply a mp3 stream .. but I don't have a sonos and it would require to debug the sonos python api.

So for now: not supported

@18084AZ
Copy link
Author

18084AZ commented Jan 3, 2021

Alright, too bad.. If there is anything I can do or provide with to solve the issue just tell me ;)

@KoljaWindeler
Copy link
Owner

Have a look at https://community.home-assistant.io/t/youtube-music-media-browser/226367/190?u=jkw

There are still unanswered points/tasks

@KoljaWindeler
Copy link
Owner

Hi,

please try adding the two config values proxy_path and proxy_url to your configuration.
The proxy path has to point to your www folder, if you are using a docker image "/config/www" should be correct.
Proxy url has to point to the local url.

The integration will download the ytube stream and store it at the proxy_path. Once the download finished
the sonos will receive the link from proxy_url and play the local file

media_player:
  - platform: ytube_music_player
    speakers: 
       - media_player.jkw_cast2
    proxy_path: "/config/www"
    proxy_url: "http://192.168.2.43:8123/local"

This is highly experimental and NOT tested. (I don't have a Sonos).
Nothing will change if the two parameter aren't provided.

@18084AZ
Copy link
Author

18084AZ commented Jan 7, 2021 via email

@KoljaWindeler
Copy link
Owner

KoljaWindeler commented Jan 7, 2021

Wherever the data is stored the you can access via the web url, from inside the container.
Just "/local/" seams strange, but it's possible. I don't run a pi imagine. Sorry can't help.

Can you ssh into the pi? The you could create a small test file and access it via the url

@denvers
Copy link
Contributor

denvers commented Jan 8, 2021

Tested it. No sound unfortunately.

My config:

media_player:
  - platform: ytube_music_player
    speakers:
      - media_player.sonos_connect_amp
    proxy_path: "/config/www"
    proxy_url: "https://drsnuggles.local:8123/local"

Error messages:

Logger: homeassistant.components.sonos.media_player
Source: components/sonos/media_player.py:481
Integration: Sonos (documentation, issues)
First occurred: 9:59:18 (5 occurrences)
Last logged: 10:00:44

Error on play_media with UPnP Error 701 received: Transition not available from 192.168.1.30
Logger: custom_components.ytube_music_player.media_player
Source: custom_components/ytube_music_player/media_player.py:306
Integration: YouTube Music Player (documentation, issues)
First occurred: 9:59:14 (2 occurrences)
Last logged: 9:59:49

self._state is: (playing).

@KoljaWindeler
Copy link
Owner

Please try your local ip instead of https://drsnuggles.local:8123/local
Something like http://192.168.1.3:8123/local .. something the sonos can connect to

@denvers
Copy link
Contributor

denvers commented Jan 8, 2021

Tried several options (https/http/local ip/external ip/etc), but for now same issue.

@wuism
Copy link

wuism commented Jan 11, 2021

I have sonos integration and this works for me.

i used for the proxy path the following:

http://192.168.1.xxx:8123/local
/config/www

running hassos on NUC

@KoljaWindeler
Copy link
Owner

THANK YOU
very nice to hear back that it is working!

@pvprodk
Copy link

pvprodk commented Feb 25, 2021

I have sonos integration and this works for me.
i used for the proxy path the following:
http://192.168.1.xxx:8123/local
/config/www

running hassos on NUC

Sorry for being a noob, but where do you put this code? In the configuration.yaml?

@KoljaWindeler
Copy link
Owner

you can now add this during the config flow

@pvprodk
Copy link

pvprodk commented Feb 25, 2021

you can now add this during the config flow

Thank you so much - its working now :)

Just a small suggestion would be to differentiate the description of the two fields to indicate proxy_path/proxy_url

Udklip

@KoljaWindeler
Copy link
Owner

Agreed :)
08d528a#diff-770a83331b0d7769c98ac72bfd4c3b62e984977322f69ef08b5c67cf3b70b043

@baldarn
Copy link

baldarn commented Apr 3, 2021

I can confirm that is working on sonos bookshelf ikea symfonisk!! thanks!

@tomfool1985
Copy link

I can confirm that is working on sonos bookshelf ikea symfonisk!! thanks!

How???

@KoljaWindeler
Copy link
Owner

@tomfool1985
Copy link

tomfool1985 commented Apr 21, 2021 via email

@jurgenweber
Copy link

The proxy thing seems to work fine, how can I send it to a group?

@gmarcc
Copy link

gmarcc commented Apr 7, 2022

Would someone kindly post a step-by-step on how to get this working for Sonos?

@KoljaWindeler
Copy link
Owner

It's not possible anymore.

@wjbeckett
Copy link

It's not possible anymore.

So Sonos speakers don't work with YouTube Music Player anymore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new_player_support
Projects
None yet
Development

No branches or pull requests

10 participants