There was an earlier thread about this which is now closed. I'd like to ask for some more specific guidance around a couple of the suggestions that were made by @knolleary and @Colin if I may.
The daemon I'm trying to use as a trigger, spotifyd, accepts an onevent parameter for "a script that gets evaluated in the user's shell when the song changes" which seems to provide the opportunity. But I need a little bit of help to work out how to do this simply without causing other issues. Apologies if this is a bit basic.
One suggestion was to use curl to generate an http request that Node-RED would monitor:
- presumably the IP would be that of the Node-RED server and a particular port specified in both the curl request and Node-RED listening node. The port could be anything not currently used - am I right?
- does it matter that Node-RED will never respond to the curl request? Would this create a growing stack of unanswered requests that never clear?
Another suggestion would be to send an MQTT message:
- can that be done simply from shell?
- does it matter if the MQTT broker is located on another networked machine?
Thanks for the help.