Does Roon send SNMP messages?

I want to control my amplifiers remotely.
There are five amplifiers in a cabinet for the multi-room system, they are on all the time. I would like to use something like this:
http://www.iqtronic.com/products/ip-watchdog-iqsocket-lan/
to turn them on and off when Roon is playing.
Does Roon signal when it is playing and when it stops?
Or any other ideas of how I could accomplish this? MQTT on a Raspberry Pi to turn a relay on and off?

I use a Smart outlet controlled thru Alexa. You still have to initiate the command, but you could also set it up to turn on/off at selected times of day.

I had thought of using a smart outlet, but I want it to be completely automated.
At the moment I am using a rundown timer, so it switches off after eight hours but that does not really work well.
I thought of using a timer so that it switches off some time after I (normally) go to bed and I would have to switch it on manually, but that is not a great solution either.
My amplifiers (Parasound zAmps) are supposed to sense the line-in signal and turn on but this is completely unreliable. They also have a trigger input, I have a power supply on the rundown timer which turns on the amplifiers via this input and also turns on a fan in the top of the cabinet.
Any ideas? Can something be programmed via the API?

This is what Roon Convenience Switch extensions are for. Roon will send the extension a signal when the amps (or whatever) should turn on, or when the “power on/off” button in the UI is pressed (the button appears when such an extension is assigned to a zone).

If you want it to turn off automatically after it hasn’t been playing for X minutes or whatever, that’s obviously also doable with an extension.

I think you have two questions to answer:

(1) what’s the easiest way for a program you write to make the thing you want happen in the world (i.e., turn on/off appropriate amps and fans). This is this choice between the IQTronic socket vs. smart plugs vs. a relay connected to a Raspberry Pi that goes to the trigger port on your existing equipment. I could see various answers to this, depending on cost/complexity/your skill set. (As for me, I already had everything else triggering off of when my TV turned on and off, so all my script had to do is sent a HTTP request to my Roku TV to tell it to turn on/off.)

(2) what’s the easiest way for that program to find out what’s going on in Roon? This is the choice between writing your own native Roon extension in nodeJS, writing a Roon extension in Python using the third-party library that’s available, or consuming information provided by an existing Roon extension (like the MQTT extension). That mostly depends on complexity/your skill set. (As for me, I’m a Python guy so have implemented my custom convenience switch extension for my Roku TV using the Python library.)

Thanks for this. Further investigations reveals a number of smart sockets, and cheaper than the first one I linked to. This is important because if the aim is to cut down on unwanted energy use, rather than just for the fun of tinkering, then the less the initial outlay the better.
How to auto switch your power amp with IFTTT looked promising (I found a smart socket on Amazon that supports IFTTT):


But, it is not clear what I would have to do to make this work. Is there an extension I can install and play with?

Ah, clever. That’s a way of doing it without using an extension at all, just by having a script continuously watch the Roon RAAT log file on a Linux box that is running RoonBridge. It’s an alternate solution to question (2) in my post above. That’s certainly another way to do it. The drawback is that if the text format of the log file changes, it might break what the script is looking for – though that’s likely to be true of most of these kinds of solutions.

If you do that, all you need to do is have a Linux command that can be run to turn on and off the power. You could do that through IFTTT or some other way (e.g., with GPIO to a relay on a Raspbery Pi or whatever).

Using @StevenB instructions I have got the system to watch the logfile and switch the amplifiers on and off when that zone is playing, using IFTTT.
I still need to go through the logfile to make sure the logic works when I have grouped zones or transferred from one to another.
Thank you!
It would be better to do the switching directly rather than go out to IFTTT.com. I see that some cheap Chinese smart plugs run OpenWRT, maybe I should investigate this.

I have now got a Kankun KK-SP3 plug which I can control directly, without going out to IFTTT.
The mechanism I was using, watching the logfile, does not work because the logfiles rotate and when a new one is opened swatch does not follow it. More work needed…
EDIT: there is a switch, --tail-args, that you need to pass to swatch to have it watch the filename rather than the file descriptor.