Genie Community Forum

Home Assistant Addon Audio debugging

Hello,

I recently installed the hassio almond edge addon and it worked right away using the chat.

The problem that I came across is that the configured audio input and output devices are not working and I’m not sure which possibilities are their to debug this. The setup is on a amd64, debian 10 running home assistant supervised.

image

Also wonder if it was right installing the “Almond Edge” version from the github repo (GitHub - stanford-oval/almond-hassio-repository) and not using the “stable”? I see the edge version is a little bit newer but it doesn’t have a change log.

Maybe I should install “Almond Stable” instead because since v2 it’s having all the audio features on board if I don’t miss anything?

Hello!

If you install the edge version, you’ll be running the very latest code with all the fixes we’re working on as of late. The stable version was released a few months ago, and given this is a fast changing project, it’s probably out of data. Which is to say, please do install the edge version, and if you have time, help us make it robust!

This said, both should have working sound. You should see in the logs if there are any sound-related errors. For example, something like “Connection refused” during initialization indicates that PulseAudio is not available, which happens if PulseAudio crashes.

It’s also worth checking PulseAudio’s logs directly. In Home Assistant OS, PulseAudio runs in its own container, and you can get to the logs with docker logs. I’m not 100% sure what’s the configuration in Supervised. You might need to make sure you’re not running two PulseAudio servers at the same time (one coming normally from Debian for your regular user and one in the Home Assistant container) because only one of them can drive the audio HW at any time.

1 Like

Already a hit! Get this error when almond starts:

Failed to cache event sound: Operation not supported
error on PulseAudio Error: Connection refused
    at PulseAudioContext.<anonymous> (/opt/almond/node_modules/pulseaudio2/lib/pulse.js:120:36)

This could be the cause indeed. Actually I’m just setting up a new machine with home assistant OS (so no debian involved). I will just give that a try with the same audio hardware before debugging further.

Thank’s so much for your help and keep on going with this great project :rocket:

1 Like

Hi,

I apologize, if this is not customary here (I’m a newbie…), but as I see that you got the issue pretty much handled,so I wish to continue the topic with a very similar issue.

I’m running Home Assistant OS 6.6 + core-2021.11.5 + supervisor-2021.10.8 with addon Almond version 2.0.1on Raspberry Pi 4B 4GB, tried with Jabra 501 and some Microsoft USB headset as audio hw.
I cannot hear anything drom the speaker, nor is HA + Almond reacting to my voice commands.

I could not find from the log (Almond log under supervisor) anything about “PulseAudio”, but in general it is populated with browser -based notifications and other notifications like “Unhandled HA entity sensor…”, “BaseDevice.engine is deprecated and should not be used in new code”. etc.

I do not know, are there any other e.g. text based logs, at least I could not find any.

I do not know PulseAudio, or where it should be running. I don’t think I have access to any container logs, the closest I can get is with addon “Portainer”, but could not find anything from there either.

How to go on?

Hi @MEKadan,

Welcome and sorry to hear Almond is not working.

To access the container logs, you will need to enable debugging in the Home Assistant OS, and set up SSH there. Follow the guide at Debugging the Home Assistant Operating System | Home Assistant Developer Docs
From there, you can run docker ps to see the list of running containers, and docker logs followed by a container name to see its logs.

By the way, we’re working on a new release of Almond (rebranded as Genie). Our latest development version of the assistant reworked sound support quite a bit. Would you be able to test it?
If so, please follow the instructions in our wiki (note: the screenshot still refer to Almond but the text is correct - we’ll update them soon)