It’s trivially easy to get RoonBridge on RasPi communicate play/stop status into IFTTT (or execute any command available on your RasPi. Anyone who can paste commands on linux can do it. If you use IFTTT, you can figure out how to switch the amps (Harmony Remote, WeMo Switch, …). If you delve a little deeper into RasPi projects, you can do about anything you want: send http commands, MQTT messages, change a color led, send commands through IR led, switch a relay…)
Prerequisites:
You have a working RoonBridge on RasPi. I used Debian Jessie and the easy install. The RasPi is connected through USB to a Devialet 120. If you were able to install RoonBridge yourself, you’ll be able to do it. If you want to use IFTTT, you need a free account and a maker channel key.
Disclaimer:
Information given is as is, and I take no responsibility in whatever happens after you use this information. For myself, I’m gonna test this for a few weeks before switching my tube amps with it. If you’re amp doesn’t handle cycling power well, test it out with switching a light, sending yourself messages or mails or whatever.
Caveats
This method sends an “ON” command with every new push on the play button, or new stream. I can’t think about a scenario where periodic “ON” commands would do any harm, but beware.
I’ve been testing this for a few hours. I don’t now if this method needs finetuning for log rotation etc.
How-to
-
login over ssh. If you installed RoonBridge, you know how to do it!
-
Install Swatch and dependencies. This program executes commands on occurrence of text in the logfile
sudo apt-get install swatch
- Fire up nano to create the config file for Swatch. You can prepare the text on your pc, and paste the whole text in, or you can use nano.
sudo nano /etc/swatch.conf
- Paste the following text. Don’t forget to insert your IFTTT Maker Channel key twice, and also fill in the commands for On and OFF. The latter is done in the IFTTT interface.
You can also change the command between quotes to anything that performs the required action on your Pi
watchfor /status":“Teardown/
exec “curl https://maker.ifttt.com/trigger/your_command_for_off_here/with/key/your_key_here”
watchfor /starting playback: now/
exec “curl https://maker.ifttt.com/trigger/your_command_for_on_here/with/key/your_key_here”
-
save the config file by pressing and quit nano by pressing <-x>
-
to autostart on boot we’ve got edit rc.local:
sudo nano /etc/rc.local
- Paste the following on a new line before the last line (exit 0)
swatch --config-file=/etc/swatch.conf --tail-file=/var/roon/RAATServer/Logs/RAATServer_log.txt --daemon
-
save the config file by pressing and quit nano by pressing <-x>
-
type “sudo reboot”, wait a minute and start using roon remote to start, stop and start. Your IFTTT actions should fire.
Any comments are welcome. I guess this can use some finetuning and error handling
@crieke: I hope this answers your question in another thread.
Steven