kevinvincent / hassio-addons

24 stars 26 forks source link

can't properly authenticate with Sonos #25

Open rfiorentino1 opened 2 years ago

rfiorentino1 commented 2 years ago

Hi. I've followed all the steps in the ReadMe, but I think I might be missing something. I'm not getting anything except a spinning Sonos circle and a loading progress bar when I try to go through the auth flow.

I'm running home assistant on a raspberry pi, using the home assistant OS. Instead of reaching the "authentication failed" page, after logging into Sonos and pressing allow, it just sits there with a progress bar that never resolves, and a spinning circle. If I click OK again, it says "we're having trouble connecting to Sonos right now." The url also never gets to the point where the "fix redirect" step comes in. The farthest I get looks like this:

https://api.sonos.com/login/v3/oauth/authorize?client_id=xxxxxxxxx&response_type=code&state=none&redirect_uri=https%3A%2F%2Fhassio.local%3A8349%2Fredirect&scope=playback-control-all

Has anyone seen this before/suggestions on what I could be doing wrong? I also tried port forwarding 8349, with no luck. I feel like I'm so close but so far! :)

rfiorentino1 commented 2 years ago

So I eventually got this to work, after about three hours of playing around with various things inside of the authentication URL, and the redirect url parameters written inside of the JavaScript file. In short, the read me leaves much out and needs to be updated to explain quite a few things. I also could not get an audio file to playback, only a actual stream URL, like an internet radio station. If I linked to a file within dropbox or even on my local Netwerk nothing would happen.