I’ve set up a Pimoroni Pirate Audio (amp) for playing rain sounds when the kids sleep, and using the controls to play/pause and adjust volume (display is disabled - it’s too bright at nighttime.
The issue is that whenever the Pi Zero reboots, I need to manually load the file that contains the rain sounds (e.g., via my phone). But for this, the Pi needs to be connected to wi-fi. That’s fine when we’re at home, but it means I can’t easily bring it elsewhere.
I’m trying to figure out how to load the file automatically in some way. My initial thought was to send some command and run a small script via cron. But I really have trouble finding what that command should be.
I’ve read about JSON-RPC, but I just can’t wrap my head around how it works.
Any help is greatly appreciated!