I am starting to do some coding of extensions for my own use. One I’m starting to consider is volume control of an external device.
Right now, I have Event Ghost running on my main endpoint. The endpoint is a Windows box running RoonBridge as a service. Event Ghost responds to various inputs and sends correct IR codes to my Peachtree Pre/Dac to control volume, among other things.
My plan for the extension is rather kludgy. Presently, the endpoint has fixed volume in Roon. I plan on switching that to DSP volume. The DSP volume would be pegged at 99% (or -1db, I guess). When the extension saw a change of volume for that endpoint, it would determine if it was up or down and then send a message to the Event Ghost instance on the endpoint to do its thing. The DSP volume would be reset to 99%.
This is really kludgy. Anyone have any thoughts on a different, viable approach?
I use home assistant to integrate roon with other devices. One of the things I do is to send IR codes to turn on and select inputs when I see a roon zone start playing. This means that you can just use a roon remote - and the devices turn on and off correctly ( I pause and restart roon after the device is turned on). I also use zwave switches to power on devices too.
I maintain the HA roon automation - but the real power of HA are the huge range of other integrations, You can do a lot of things with the built in automation tools.
So that might help.
Depending on your preferred language I also maintain a python wrapper to the roon api. There is a demo that shows you how to subscribe to events.
I’m actually using pyRoon now. I see that the Roon API has a volume control services that the extension can publish, but I’m not seeing if/how it’s implemented in pyRoon. I may need to figure this all out in Node.
BTW, my goal is to control volume in the Roon remote app, which I don’t think you described your setup doing.
A quick update. I took a look at the SebuZet code and manually imported it. It works. I am at the point where I am registering a volume controller and receiving control_volume messages from the core. I’ll need to figure out what update to send back to the core after controlling the volume, but some reasonable steps forward have been accomplished.
I have the last main puzzle piece done, namely, the proper update back to the core (it was trivial, actually).
I 100% would like to share my code. Right now it’s just stub code, that is, it just sets everything up and sends/receives updates. Where/how should I post?