Troubleshooting AirPlay Connection issue

I am new to Balena Cloud and would like some troubleshooting advice. It has previously connected to both Spotify on Android phone and Music on iPhone. I am using a Raspberry Pi 4 as the server connected via wifi and audio cable to an amplifier. Router is in the same room as the pi and devices are all connected to same network. Previously this had worked but does not right now with the iPhones in my house. Everything seems normal on the dashboard. I have restarted the pi and the iPhones to no effect.

I am not exactly sure where to begin with debugging.

Hello, sorry just to clarify are you referring to balena-sound or is this you own application?

Correct. This is the balena-sound app.

Great, thanks.
Could you try running the device diagnostics from the diagnostics page and share the output with us?

Here you go. Currently Android devices and iOS devices are not finding the balena-sound device.

(Attachment b68a9ffe5f1e4be852921ea7d3e7e50f_2020.04.28_00.10.20+0000.txt is missing)

Can you access this:

Hi @steve_cline, I acknowledge that we received the logs file you sent. In the supervisor logs I see:

Apr 28 00:07:04 b68a9ff resin-supervisor[28563]: (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
Apr 28 00:07:04 b68a9ff resin-supervisor[28563]: (node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Apr 28 00:08:10 b68a9ff resin-supervisor[28563]: [event]   Event: Device state report failure {"error":{"message":""}}
Apr 28 00:08:41 b68a9ff resin-supervisor[28563]: [error]   LogBackend: unexpected error: Error: getaddrinfo EAI_AGAIN
Apr 28 00:08:41 b68a9ff resin-supervisor[28563]: [error]         at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)

This is a DNS issue within the local network. The device supervisor attempts to determine the IP address of but it doesn’t get DNS server in time. Is DNS currently working on the network where the device in installed?

You could try running this command from another machine on the same network: curl It should return OK if DNS resolves fine.

That command returned OK from a PC on the same network.

Hi there – there are a few things to check here:

  • Check your router’s admin interface to see if your device is showing up.
  • Have a look at the Troubleshooting page (; in particular, check your Pi to see if the LED is flashing a repeated pattern of four blinks, which indicates problems connecting to the Internet.
  • It might be worth checking the iPhones to make sure they’re not sharing their network connections (unlikely, but worth ruling out).
  • Are you able to open a Terminal session to your device from the Balena Cloud dashboard? If so, what happens when you run the curl command given above?

All the best,

I ran through all those options. I could not see the device on the router. I actually have another router in the house that is connected to the main router through ethernet. I was able to connect the device to that and, so far, both types of devices are finding in. I am concerned though because that router is on another floor on the other side of the house while the original is in the same room as the Pi.

I can get in to a terminal session and I would ultimately like to solve this with the other wifi. What troubleshooting would you suggest?

Hi there – If I understand you right, you’re able to connect to the balena-sound device from both Android and iOS phones if you connect the balena-sound device to the further-away router. If I’ve got that right, I’m not sure what might be going wrong. I do wonder if the orignal place you had the balena-sound device perhaps did not have a very good connection to WiFi – this would explain the DNS problems, and the fact that it did not show up on your router’s admin page. Can you try placing it in different places around the room to see if that helps?

I will try some of those options out. Do I need to modify anything to connect via ethernet?

Hi Steve, you don’t need any special configuration. Just plugging the network cable will do.

I think I may have been able to make the wifi connection more stable…we’ll see. It also seems to be running from both Android and iOS controllers.

I am also wondering if there is a bash script example or startup command you might be able to provide that resets the volume level in the alsamixer at reboot. Right now, it resets to 36, which is very low. I would like to be able to automate the volume reset to 70 at reboot. Can I just put the command in the crontab file or do I need to write a script to do this and then run it through crontab @reboot?

Thanks for your help.

Hi there Steve, you can set these values via Environment Variables in the balenaCloud dashboard, and the values should persist across reboots:


If you enter a value of ‘70’ for each of them, you should be all set.