Is a Roon bridge listening to anything locally on the machine it’s running on? I want to build a super-simple play/pause button connected to my Raspberry Pi (and maybe a Next button if I get fancy ;p) and figured it would be nice if there was a way to just send a command to the bridge through a socket or similar. Is that possible or do I have to go through the API and talk to the core?
I had a prototype hardware layout which used an Arduino, 3 buttons, and a rotary encoder with button. The 3 buttons were for prev, play/pause, and next. The rotary encoder was for the volume/mute. It sent crafted JSON via serial to an instance of Nodejs running the API. The biggest challenge I had was dynamically switching zones, so the project never left my workbench.
While researching how to implement it, I originally wanted to do keyboard emulation, but was not able to find a way to implement play/pause with anything except the API. For the Pi, I did have some luck with the rpi-gpio nodejs module with hooks into the Roon API, but still had a tough time coming up with a clean way to switch zones.
Since I was tied to the API, I went ahead and switched to the serial interface so that it wasn’t locked into a Pi. But I never finished the proof of concept due to the zone switching issue. And I haven’t really touched it in months…
I may get back to it and just have the buttons control a “current zone” as selected with a local copy Roon Web Controller. But I don’t want to add too many dependencies to that project since a vast majority of people wouldn’t use it.
Interesting! I’m not worried about zone switching, since I’m going to make this mostly for myself. It’s going to run on the same Pi that’s also doing the streaming, so the zone also isn’t going to change. I figured I’d just have the zone name in a config file.