Hey everyone. It’s been a very long time since I’ve attempted to write a SmartApp and am having trouble with how to begin, let alone the code necessary to accomplish it.
I’m trying to write an app that monitors the Now Playing field (trackDescription) of a specific Sonos speaker and whenever it changes, to send off that value of the now playing track as a string via an HTTP Post request to another web service I have running. The goal is to show the now playing track at all times on a separate display that is near the speaker. The web service works no problem and I can manually trigger http requests with hardcoded strings and it displays with no issue.
The HTTP request I need to send out is (the access keys and URI are not real, just need to understand the syntax):
“text”: " Now Playing",
“text”:" Song Title - Song Band", //<-----now playing track string goes here
Any help here would be absolutely completely appreciated. It is a very simple app in that when a value changes, to just send off that value in a webhook, but I can’t for the life of me even think about where to begin, let alone the syntax of how to write it.