so when everything is filled i get this
{
"id": 1,
"name": "Input 2",
"input": "stream=1007",
"info": {
"name": "Deep House Lounge - internet radio",
"state": "playing",
"artist": "cody p",
"track": "awkward 007 mix",
"station": "DEEP HOUSE LOUNGE - [www.deephouselounge.com]",
"img_url": "https://secureimg.stitcher.com/feedimagesplain328/42300.jpg",
"supported_cmds": [
"play",
"stop"
]
}
}
and when there is nothing i get this
{
"id": 1,
"name": "Input 2",
"input": "None",
"info": {
"name": "None",
"state": "stopped",
"img_url": "static/imgs/disconnected.png",
"supported_cmds": []
}
}
as you can see there are some things missing like artist track etc and that gives warning in openhab
this is what i have done so far i only need this because the amplipi binding doesnt provide them and my java is not there
Thing http:url:music1 "music zone1" [
baseURL="http://192.168.1.138",
refresh=20] {
Channels:
Type string : artist_source1 "artist source 1" [stateExtension="/api/sources/0", stateTransformation="JSONPATH:$.info.artist"]
Type string : track_source1 "track source 1" [stateExtension="/api/sources/0", stateTransformation="JSONPATH:$.info.track"]
Type string : station_source1 "station source 1" [stateExtension="/api/sources/0", stateTransformation="JSONPATH:$.info.station"]
Type string : status_source1 "status source 1" [stateExtension="/api/sources/0", stateTransformation="JSONPATH:$.info.state"]
Type image : image_source1 "station image source 1" [stateExtension="/api/sources/0/image/400"]
}
String Current_artist_source1 {channel="http:url:music1:artist_source1"}
String Current_track_source1 {channel="http:url:music1:track_source1"}
String Current_station_source1 {channel="http:url:music1:station_source1"}
String State_station_source1 {channel="http:url:music1:status_source1"}
Image Current_image_source1 {channel="http:url:music1:image_source1"}