HiFiBerry with Spotify Connect on Hassio

I have a HiFiBerry DAC that I would like to use with Hassio and the Spotify Connect Add-on.

If I look at my hardware I see.

  • serial:
    • /dev/ttyUSB0
    • /dev/ttyACM0
    • /dev/ttyAMA0
  • input:
  • disk:
  • gpio:
    • gpiochip0
    • gpiochip128
  • audio:
    • 0:
      • name: bcm2835_alsa - bcm2835 ALSA
      • type: ALSA
      • devices:
        • [object Object]
        • [object Object]

I’ve configured the Spotify Connect plugin and I can connect to my Hassio device but no sound comes out. Which makes sense as it needs to be configured. Any ideas on how I could do that?

1 Like

I’m trying to use the same setup. Let me know if you find how to do it.

No love so far. If this weren’t Hassio it would be trivial but I don’t know anything about the underlying OS.

I’ve moved to Hassbian, but I’ll keep an eye on this thread

For me it worked out of the box. I just mounted the DAC on my Pi, nothing to configure. On the settings page of the Spotify Connect Plugin, I can select my Hifiberry DAC+ Pro:
52

I am running HA 0.86 on HassOS and Spotify Connect Plugin 0.3.0.

Curious, if you ssh into your instance and run hassio hw audio do you see the HifiberryDac listed there? You must. Mine isn’t picking up my hardware. Not sure why. If I throw in a card that has Volumio it picks it up.

You’re right, it is listed:

 hassio hw audio
 audio:
   input: {}
   output:
     0,0: 'bcm2835_alsa - bcm2835 ALSA: 0'
     0,1: 'bcm2835_alsa - bcm2835 ALSA: 1'
     1,0: 'HifiberryDacp - snd_rpi_hifiberry_dacplus: 0'


hassio info
 arch: armhf
 channel: stable
 hassos: "2.8"
 homeassistant: 0.87.1
 hostname: hassio
 machine: raspberrypi3
 supervisor: "143"
 supported_arch:
 - armhf

On hardware side:

  • RPi 3 Model B
  • Hifiberry DAC+ Pro HW 2.6

Is your HassOS up to date?

I was running an older version of HassOS and I was hopeful that upgrading it would resolve my issue but I’m still only seeing ALSA 0 and ALSA 1 after upgrading to 2.8. I’m not in front of my device but when I get home I’m going to power cycle it to see if that causes it to pick it up.

Just add “dtoverlay=hifiberry-dacplus” to Your config.txt on boot volume. Insert sdcard from RPi to Your computer, find boot volume and edit Your config.txt.
That’s it ! After that now I have :

hassio > hw audio
audio:
  input: {}
  output:
    0,0: 'bcm2835_alsa - bcm2835 ALSA: 0'
    0,1: 'bcm2835_alsa - bcm2835 ALSA: 1'
    0,2: 'bcm2835_alsa - bcm2835 ALSA: 2'
    1,0: 'HifiberryDacp - snd_rpi_hifiberry_dacplus: 0'
1 Like

I’ve created an integration here - https://github.com/willholdoway/core/tree/HifiBerry-Integration/homeassistant/components/hifiberry

I would really appreciate your feedback, it seems to work fine with my hardware but this is my first time writing an integration from scratch :slight_smile:

2 Likes

Hey! I have yet to pull anything from Github into Home Assistant, is it possible to get a complete step-by-step guide on how to get this integration? :slight_smile:

Hi, I have the Hifiberry Digi+ Pro and running hassio (OS 5.3 beta 64bit due to ssd boot) on RPI4. Is it possible for this integration to help me in this regard?

Hi there,
I just moved from a Rasbian based installation to Home Assistant OS 5.10. Unfortunately, my Hifiberry-DAC+ is not recognized automatically.
I tried to locate the config.txt in /boot to add “dtoverlay=hifiberry-dacplus” as suggested further up in the thread but it seems there were some changes to the directory structure - at least I can’t find it. Any idea how I can get the Hifiberry-DAC+ working?

audio:
  '0':
    name: bcm2835_headphonbcm2835 Headphones - bcm2835 Headphones
    type: Headphones
    devices:
      - chan_id: '0'
        chan_type: digital audio playback

Found a solution: I enabled the ssh debugging and could locate the config.txt in /mnt/boot. From there it was just the standard changed mentioned further up and on the hifiberry support pages.

1 Like

Hi, any recommendation how to run optical output on HiFiBerry Digi+ with Home Assistant OS 6.4 on RPI4?
In config.txt file i have:
#dtparam=audio=on
force_eeprom_read=0
dtoverlay=hifiberry-digi
but still no sound.

  • Spotify addon + analog sound (without hifiberry) is working.
  • hifiberry optical output on rapsbian is working

Anyone had any luck yet?

There’s also this thread at hifiberry: https://support.hifiberry.com/hc/en-us/community/posts/4406571293585-HiFiberry-Digi-Raspberry-Pi3B-Home-assistant-Hassio-
Though no solution yet also.

My setup (homeassistant os on a raspberry pi 3b & hifiberry DAC+) was working fine until I updated to HomeAssistant 7.0+ and then it all of a sudden stopped seeing my dac. Installed Volumio on a spare sd card yesterday and it saw the DAC just fine, so it’s not a hardware issue. Today I tried a fresh install of HA OS on the spare sd card to see if maybe something got corrupted during the update process, but no luck either. Something must have changed in HA OS with version 7.0 that is causing issues.

Update: My issue was resolved after I removed some standoffs that were apparently too tall and causing a bad connection between the pi and the dac. Make sure your dac is seated all the way down on the pins for a reliable connection

Just noticed this: https://github.com/home-assistant/architecture/blob/4d66082eab81d5f4740e0d86333f9135a90e6aad/adr/0019-GPIO.md

Correct me if I’m wrong, but this affects the hifiberry hat right?

Update: this was not the issue

It says “Devices connected on GPIO that are exposed on the system as regular serial devices are exempted from this ADR.”
Does anyone know how the HifiBerry (DAC+ in my case) is exposed? i have found this article https://www.hifiberry.com/blog/techtalk-external-dacs/ which talks about this shortly and mentions the data is converted to serial before beeing sent to the DAC, but i am not sure if this means the same thing

Edit: i asked the HifiBerry support and this was their answer

Our sound cards are not serial devices, but I don’t understand at all, what kind of “integration” is required for the DAC+. It’s simply a sound card and you and the HomeAssistant developers should not care about the GPIOs at all as there is no direct GPIO access

so it is not a serial device, the part about GPIO-access i dont really understand, maybe someone can explain?

I also found this: Add HifiBerry integration by willholdoway · Pull Request #50894 · home-assistant/core · GitHub so maybe it will be available soon

Hi folks! Did anyone manage to eventually get their HiFi Berry board working on a Raspberry Pi running the latest Home Assistant OS?

Home Assistant 2022.7.5
Supervisor 2022.07.0
Operating System 8.2
Frontend 20220707.1 - latest