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.
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 api.balena-cloud.com api.balena-cloud.com:443
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 api.balena-cloud.com 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 api.balena-cloud.com/ping. It should return OK if DNS resolves fine.
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 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?