a-marcel / hassio-addon-owntone

11 stars 14 forks source link

Spotify doesnt work #4

Open 82timo opened 2 years ago

82timo commented 2 years ago

Hi, spotify is not working on my system and I dont know why.

Before I found this Add-On, I used spotify the spotify add-on. I installed this in the Home Assistant GUI in this way: Settings/Add-ons, Backup & Supervisor/Add-On Store/ There is "Home Assistant Community Add-on: Spotify Connect". https://github.com/hassio-addons/addon-spotify-connect

I uninstalled this Add-On.

I get to my Home Assistant GUI by opening https://mydomain,duckdns.org. This is a httpS (secure) connection with a certificate. When I run owntone (Settings/Add-ons, Backup & Supervisor/Owntone server), I have some options and below it says: Open web user interface (that is my translation). The link is https://mydomain.duckdns.org/hassio/ingress/1234ab3c_owntone-server <- I made this anonymous When I click on this link, I get a error message: Connection lost. Reconnecting ... (1) I think, that this is, because owntown is only accessible from my internal ip. With "http://192.168.178.3:3689/#/" I can get on the owntown server ("Connection to server established"). With the hamburger menü top right, "settings" and "Online Services", I see Spotify:

You must have a Spotify premium account <- I have a spotify premium account Spotify Web API - Grant access to the Spotify Web API Access granted for shd535e... (28 digits and numbers). Authorize Web API access <- this doesn't work Access to the Spotify Web API enables scanning of your Spotify library. Required scopes are playlist-read-private, playlist-read-collaborative, user-library-read, user-read-private, streaming.

When I click on "Authorize Web API accesss", it goes to: http://owntone.local:3689/oauth/spotify?code=...

This website is unavailable. I suspect, that this is because of owntone.local.... I tried this: http://mydomain.duckdns.org:3689/oauth/spotify?code=... <- unavailable https://mydomain.duckdns.org:3689/oauth/spotify?code=... <- unavailable https://mydomain.duckdns.org/oauth/spotify?code=.. < 404 not found https//mydomain.duckdns.org/oauth/spotify?code=.. < 404 not found

I think, that the Web API access is not right. But that is only my supposition. How can I get this working?

Question: What to do with the IDs from: http://homeassistant.local:3689/api/outputs

Please ask, if there are unclear points from me. Thank you

timvdsm commented 2 years ago

Hi, I have exactly the same problem. I am running the addon on my HA Blue. Did you found any work around to get spotify work?

Paytrix commented 2 years ago

Hey Guys,

You probably will still encounter this problem, since I did just now...

It is pretty simple to work around.

Explanation: You should get access to your owntone webinterface with your local IP, as you have already mentioned and this is what you see (expect for the access granted message, since I already authorized): image

Now you would just have to click "authorize" and follow the login instructions as usual. Now after the spotify login, you will be redirected to something like this: image

Now just put your IP 192.168.178.51 instead of owntone.local and it should authorize your account! 👍 image

a-marcel commented 1 year ago

I updated the version and provide a beta version now. If you still interested into this plugin, try the beta. For me it works like in 2021.

Thanks