Hello,
I already have a script that sends a serial command to my audio receiver from my Pi GPIO pins and I would like to launch that script everytime playback is started or resumed from Volumio/Volspotconnect.
In which file should I put the command line so it’s fired when playback starts?
Write a deamon that listens to the socket events:
1a. nodejs snippet:
const io=require('socket.io-client');
const socket= io.connect('http://localhost:3000');
//Listen for any state change
socket.on('pushState', function (data) {
console.log(data);
});
Shortcut all this and directly hack into volspotconnect’s index.js and call your script directly from there — but that of course will not trigger from other sources.