Problem getting started on a PiZero

Hello all!
I am trying to get a Pi Zero to act as a bluetooth dongle to my old stereo. I found balenaSound through this great article/walk-through: https://www.balena.io/blog/turn-your-old-speakers-or-hi-fi-into-bluetooth-receivers-using-only-a-raspberry-pi/

I got BalenaSound almost working on a Pi3+ (some issue with bluetooth stuttering, and line out levels). So I put the project aside for a couple of months, as I had to use the Pi3+ to its original purpose.

After checking, there seems to be fixes for my issues, so I read up a bit more, and decided to get a PiZ with a Pirate Audio DAC.

I have followed the walk-through, and everything seems fine in the balena cloud, but looking at the logs in the “terminal window” I could see more or less all services waiting on the sound-supervisor. and after filtering for the sound-supervisor I could see it exits with an error whenever it tries to start.

So it seems it cannot find a module “pulseaudio”. Isn’t this supposed to be a part of the project, or have I missed something? I searched for pulse audio, but could not find anything relating to it missing.

Any suggestion on what to check next?

Supervisor log:
26.12.20 04:54:49 (+0100) sound-supervisor > node build/index.js
26.12.20 04:54:49 (+0100) sound-supervisor
26.12.20 04:54:56 (+0100) sound-supervisor internal/modules/cjs/loader.js:834
26.12.20 04:54:56 (+0100) sound-supervisor throw err;
26.12.20 04:54:56 (+0100) sound-supervisor ^
26.12.20 04:54:56 (+0100) sound-supervisor
26.12.20 04:54:56 (+0100) sound-supervisor Error: Cannot find module ‘@tmigone/pulseaudio’
26.12.20 04:54:56 (+0100) sound-supervisor Require stack:
26.12.20 04:54:56 (+0100) sound-supervisor - /usr/src/build/audio-block/index.js
26.12.20 04:54:56 (+0100) sound-supervisor - /usr/src/build/index.js
26.12.20 04:54:56 (+0100) sound-supervisor at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
26.12.20 04:54:56 (+0100) sound-supervisor at Function.Module._load (internal/modules/cjs/loader.js:687:27)
26.12.20 04:54:56 (+0100) sound-supervisor at Module.require (internal/modules/cjs/loader.js:903:19)
26.12.20 04:54:56 (+0100) sound-supervisor at require (internal/modules/cjs/helpers.js:74:18)
26.12.20 04:54:56 (+0100) sound-supervisor at Object. (/usr/src/build/audio-block/index.js:12:22)
26.12.20 04:54:56 (+0100) sound-supervisor at Module._compile (internal/modules/cjs/loader.js:1015:30)
26.12.20 04:54:56 (+0100) sound-supervisor at Object.Module._extensions…js (internal/modules/cjs/loader.js:1035:10)
26.12.20 04:54:56 (+0100) sound-supervisor at Module.load (internal/modules/cjs/loader.js:879:32)
26.12.20 04:54:56 (+0100) sound-supervisor at Function.Module._load (internal/modules/cjs/loader.js:724:14)
26.12.20 04:54:56 (+0100) sound-supervisor at Module.require (internal/modules/cjs/loader.js:903:19) {
26.12.20 04:54:56 (+0100) sound-supervisor code: ‘MODULE_NOT_FOUND’,
26.12.20 04:54:56 (+0100) sound-supervisor requireStack: [ ‘/usr/src/build/audio-block/index.js’, ‘/usr/src/build/index.js’ ]
26.12.20 04:54:56 (+0100) sound-supervisor }
26.12.20 04:54:56 (+0100) sound-supervisor npm ERR! code ELIFECYCLE
26.12.20 04:54:56 (+0100) sound-supervisor npm ERR! errno 1
26.12.20 04:54:56 (+0100) sound-supervisor npm ERR! sound-supervisor@1.0.0 start: node build/index.js
26.12.20 04:54:56 (+0100) sound-supervisor npm ERR! Exit status 1
26.12.20 04:54:56 (+0100) sound-supervisor npm ERR!
26.12.20 04:54:56 (+0100) sound-supervisor npm ERR! Failed at the sound-supervisor@1.0.0 start script.
26.12.20 04:54:56 (+0100) sound-supervisor npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
26.12.20 04:54:56 (+0100) sound-supervisor

Hello Jonas, That does seem strange. My initial instinct would be to reflash the SD card and follow the steps again (including recreating the app on the cloud, since it’s a different device type), in case something was missed. I’ll ping the team that created the project in case they have any more insight.

Hi,

I created a new application, and flashed the SD-card, now everything is working. Thanks for the suggestion. Seems strange something got missed during creation/flashing without some error, but things happens.

One thing you might want to ping the project team with is when re-naming the device using the SOUND_DEVICE_NAME it seems to work fine for all services except bluetooth, Thankfully the image on the project page is an old one, so after adding BLUETOOTH_DEVICE_NAME I could make the device show up is I wanted.

Now I just have to figure out the loudness, quite different levels between airplay and bluetooth, but that is something for tomorrow.

Thanks again for the help!

/Jonas

Hello Jonas,

I did a quick search and found this issue that’s similar to what you’re pointing out. It should’ve been fixed in this pull request so you might want to check out a newer version just in case.

Let us know if that works.
Cheers,
Nico.

Hi Nico,

Got everything working with said SOUND_DEVICE_NAME & BLUETOOTH_DEVICE_NAME set. Still there seems to be quite a bit of different levels between bluetooth connectivity and airplay connectivity. Nothing major, just a bit strange for a line level.

/Jonas