HifiBerry OS – Media Player integration

I had the same issue where HifiBerry integration stopped working but adding socketio_enabled=True on the rpi didn’t fix it.

Turns out I had to update HifiBerry. Sharing in case it helps anyone.

Hello,

I’m using Digi+ card on RPi 0W with HiFiBerryOS 20201213 installed.

I wanted to install this integration via HACS.
Everything went successfuly, but now I’m struggling with configuiring that.

Should I paste HiFiBarry’s IP in the “host” section?
What should I type in authtoken field?

Regards,
Jakub
hifiB

I have the same issue as @jaku2k.

The API is enabled on HifiBerry, and making requests using curl works:

curl -X POST http://192.168.1.197:81/api/player/pause
curl -X POST http://192.168.1.197:81/api/player/play

If I enter the IP address as ‘Host’ in the HiFiBerry configuration, it gives the ‘Failed to connect’ message.

Not sure if it’s related. If I click ‘Configure’ on the discovered device, it fills in the ‘172.17.0.1’ IP address like with Jakub, and not the actual device IP.

It works after adding socketio_enabled=True to /etc/audiocontrol2.conf.

@jaku2k maybe that is also what’s missing for you.

@tmds thank you for hint. Unfortunetly, it doesn’t work in my case (I’ve done it in the begging as it is told in the instruction).

I wanted to add Spotify connect capability to my RPi 0W HiFiberry using this feature, but thankfully, Spotify connect started to work natively on my device.

Hello everyone,
I’m about to purchase a DAC+ ADC pro and I2Audio PhonoOne to stream my vinyls and Spotify via Home Assistant.
Is it possible to run hifiberry OS in the same raspberrypi that runs my Hassio, or do I need a second pi?
I pretty new to Hassio and thus the documentation of the integration is not clear to me.
BR from Germany
Sebastian

You will need a second Pi.

Good luck!

Hello everybody,
I installed the integration but it doens’t work.
This is the log:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/hifiberry/__init__.py", line 31, in async_setup_entry
    hass.config_entries.async_setup_platforms(entry, PLATFORMS)
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

Do you have any idea?
Thank you.

this fixed mine seems something chaned recently

Thank you!
I will give a try asap and let you know.

Replaced and it works. Thak you!

1 Like

Hi,

I did the installation and my device with HiFiBerry OS is being auto discovered in HA. However, i’m being prompted to add an auth token. Where can I get this please? Cannot seem to find this information in the docs.

I checked also in /etc/audiocontrol2.conf but don’t have any auth token record there. Should I just create one?

I added a custom auth token and restarted HA. Now it work. Would be quite helpful if this was in the documentation on HACS

1 Like

@chrisazzopardi could you describe what you did exactly? I cannot figure out where I should generate an auth token.

Hello,

The integration is up and running, thanks to everyone that contribute to it.
I have a few questions about the media player in HA from hifiberry:
Could be it used in a tts.say command? I tried without lucky
Could be selected the source to play? I can play something on hifiberry selecting the source directly in the web ui from hifiberry OS, and control play/stop volume etc… from hifiberry media player on HA , but I cannot start to play nothing from HA entity… no action when I press play button (no sources shown)

Regards

Fran

Your /etc/audiocontrol2.conf should look like this:

[webserver]
enable=yes
port=81
socketio_enabled=True
authtoken=yourToken
1 Like

Could use some help with this HACS integration.

Was able to get integration to work by adding the socket_enabled=True line. No token was needed for HA to enable access using the newly released HiFiBerry64 OS.

That being said, once this HA integration was enabled I can no longer access the built-in web server by going to the device’s IP address. Is there a way to restore web control along with HA control? Not a bit deal other than needing to conduct periodic HiFiBerry OS updates.

Thanks in advance.