HomePod Connect: Spotify on HomePods with Spotify Connect

This makes living with Homepods so much easier, great add-on! Do you use Siri to enable/disable the audio on different homepods using this? If so, how did you set that up?

1 Like

I’ve been running through, looking at yaml, configurations, etc, but still can’t get any homepods to show, just the main β€œHome Assistant Music” that shows from Spotify Connect. I do have the OwnTone Integration configured and it has all my homepods in there but they are disabled. Is that normal?

According to the log, a timeout happens when I try and enable them. I also took a look at the local OwnTone though the IP. I saw there is an option to β€œAuthorize Web API”, but every time I click that I get a page not found. Am I on the right track at all? I feel like I’m grasping at straws. I’ve gone through all these comments and checked the ZeroConf, and adjusted the auth section in the config.

Does anyone else have this issue where out of nowhere owntone looses connection to all speakers? Only a restart fixed this for me. How can I fix that?

1 Like

I have an issue that prevents me from starting the add-on. I did have it working in the past and I don’t know what changed except for updating Home Assistant OS to 10.0.
I tried removing the config and reinstalling the add-on, but can’t get it to work anymore.

Log snippet:

[custom-init] Service files found in /custom-services.d
[custom-init] librespot-java: service detected, copying...
[custom-init] librespot-java: copied
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────
      β–ˆβ–ˆβ•—     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— 
      β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—
      β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘
      β–ˆβ–ˆβ•‘     β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘
      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
      β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β• β•šβ•β•β•β•β•β• 
   Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    911
User GID:    911
───────────────────────────────────────
---creating audio group audio-5d45 with id 29---
---adding /dev/snd/controlC0 to audio group audio-5d45 with id 29---
---permissions for /dev/snd/seq are good---
---permissions for /dev/snd/timer are good---
[custom-init] Files found, executing
[custom-init] pipe: executing...
[custom-init] pipe: exited 0
Failed to set ownership on logfile: Operation not permitted
[2023-04-19 18:06:37] [  LOG]     main: OwnTone version 28.6 taking off
[2023-04-19 18:06:37] [  LOG]     main: Built with:
[2023-04-19 18:06:37] [  LOG]     main: - ffmpeg
[2023-04-19 18:06:37] [  LOG]     main: - Spotify
[2023-04-19 18:06:37] [  LOG]     main: - librespot-c
[2023-04-19 18:06:37] [  LOG]     main: - LastFM
[2023-04-19 18:06:37] [  LOG]     main: - Chromecast
[2023-04-19 18:06:37] [  LOG]     main: - MPD
[2023-04-19 18:06:37] [  LOG]     main: - Websockets
[2023-04-19 18:06:37] [  LOG]     main: - ALSA
[2023-04-19 18:06:37] [  LOG]     main: - Webinterface
[2023-04-19 18:06:37] [  LOG]     main: - Regex
[2023-04-19 18:06:37] [  LOG]     main: mDNS init
[2023-04-19 18:06:37] [FATAL]     main: mDNS init failed
[2023-04-19 18:06:37] [  LOG]     main: Exiting.
[ls.io-init] done.

I tried to look at the logfile, but the permissions look good:

-rw-r--r--    1 911      911         126224 Apr 19 18:07 owntone.log

Even when I manually set them to rwx rwx rwx, starting the image sets them back to the above. Any ideas on how to fix this?

3 Likes

I got the same issue after update :frowning:

Hi, so i got i worked again, but I installed on another machine as docker cointainer. Old config from HA addon stay with no change. :grinning:

Weird thing is that after waiting for about 50 restarts, it seems to start eventually.

I cannot tell what the issue is. I am also running the latest HAOS v10 without any issues.

My console output shows these permissions:

Unfortunateley encountering the same issues as described by others:

Everything is updated to the newest version, it has been the first install of the Addon.
Also, as previously described, after about 50 restarts it comes up okay.

Hi,

first off thank you so much for your efforts! It’s exactly what I’ve been looking for a couple of years :smiley:

Got two questions:

  1. Is it possible to change the audio output (multiple home pods, e.g. switching rooms ) within home assistant itself? Right now I’m switching to the homepod connect web UI to do so everytime, that’s a little bit frustrating :confused:

  2. Will it be possible to control spotify through another devices (e.g. spotify app smart phone / laptop) while playing on homepod connect? Would be great as currently I’m only able to do this within home assistant.

Best regards
Flocke

As i’m using HA core and installed every part myself i’m using the API from OwnTone to control the output. Their documentation is really good and you can use curl to switch output for example.

Check out the Output Speakers documentation: Output Speakers API

With some buttons and status check i made a really dummy proof page like:

Actieve HomePod is the active HomePod, and with the 2 buttons i can switch between the Office and Living room homepod. As i’m not listening throughout the whole house i only have these two, but with some API code you can also select 2 output devices so you can listen to the same song on 2 or more speakers.

1 Like

This functionality is all available in the Owntone integration, why not use that?

as i’m using HA Core and cannot install the Addon, only the integration.

I’m running a separate owntone server on a different host than HA and I’ve installed the Owntone integration.
But I’m not sure how to use it. What can I do with it in HA?
Is there a more detailed β€˜Owntone in HA for Dummies’ document somewhere? :smiley:

I too run Owntone (this image specifically) on a separate machine. The integration allows you (amongst other things) to enable and disable outputs. This way you can use mini media player to create a card that easily allows you to switch which room you want the audio played in.

Nice suggestion to use the mini media player.
I created a separate dashboard for it, which looks similar to yours on my iPhone, it just requires two rows per speaker right now instead of one as in your screenshot:

I’ll checkout the mini media player documentation to get this sorted.

Thanks a lot, @wildekek

1 Like

Another tip, when working with multiple users, I found the universal media player to be a great tool to create 1 media player to rule all spotify clients:

media_player:
  - platform: universal
    name: Spotify Plantage
    unique_id: spotify_plantage
    device_class: tv
    children:
      - media_player.spotify_plantage_judy
      - media_player.spotify_plantage_wildekek
    commands:
      turn_off:
        service: media_player.toggle
        target:
          entity_id: media_player.owntone_output_living_room
    attributes:
      volume_level: media_player.owntone_server|volume_level

I confirm I have the same issues. It used to work, now mDNS init failed fatal errors.
It might be related to: No communication to devices using mDNS after update to 10.0 Β· Issue #2481 Β· home-assistant/operating-system Β· GitHub

After downgrading to OS 9.5, everything seems to work as usually.

ha os update --version 9.5

I am unsure yet what causes this.
Looking at the OS 10.0 changelog:

  • Docker has been updated to the latest stable version 23.0.3.

So something tells me it might be related to the updated version docker… @VietNgoc what is the versio of docker on your other machine?

Hi, I got it from @alexbabel GitHub - AlexanderBabel/owntone: HomePod Connect: A custom OwnTone Docker image with librespot-java just pull the image and run it. :smiley: the config is same as HA addon…


OS 10.0 comes with the latest version of Docker 23.0.3 as described in the changelog.

And as far as I understand 20.10 was the predecessor of 23.0

In your screenshot I see version 20.10.5
Everything works in my downgraded OS 9.5 that uses docker 20.10.22.

Would you be able to downgrade your home assistant OS to 9.5 and check if that works for you?

I am not fully confinced this is the right vector of debugging, however it is definately something when upgrading from 9.5 to 10.0 and docker that would be my first guess…