i would like to integrate volumio with my Loxone Home Automation. What already works is to play, pause, stop and change volume via CLI commands being sent to volumio which is rather easy. But the home automation is limited to receiving numeric values as feedback from HTTP calls, but can receive text sent to it. Also it is limited to request status every 10 seconds. (e.g. for current volume).
Therefore i would like to create a script running in background sending things like current volume, Artist, title etc. to the home automation server. The thing is, i have no experience with shell-scripting but have some coding experience with php and java(from 10 years back , during education ) and am well capable of using the bash.
Would anyone be willing to provide me with a starting point on how to read the volumio status (artist, title, volume) into variables in a shell script and where to put it that it is executed after a reboot?
I’ve found a script where LMS varibles are being sent to loxone:
output=$(wget -4 -q -O - --user $LOXUSER --password $LOXPASS http://$LOXIP/dev/sps/io/$LOXMODE/$playerMode)
so this would be easy to adapt i think…
To make it push that stuff permanently i think a “while true” would do? can i limit that to just happen if there is any of those variables updated in order not to flood the home automation?
In a second step i would like to define favorites for webradio stations that i would like to start via the home automation. can i do that via a CLI command?
Thank you in advance!