I had a look into this some more and think i found a promising solution for that.
Do you already know the auth method pre-shared key (PSK)?
In the Sony documentation you’ll find a description how to set up the tv and an .html file with some supported http-requests in it. I added some (for me) interesting functions to play around an attached the file for reference here in this post. After the download you have to change the file back to html.
displaycontrol.txt (4.5 KB)
With it i can control the tv just with the IP and the pre-shared key (PSK). No port or whatever needed.
Another good thing is that you do not have to register the tv with the binding anymore (four-digit code). I unregistered the binding on my TV but the html file still works fine. Maybe you could add this auth method to the binding, since i assume this will be much more robust (because regular port changes don’t matter anymore) when this binding is merged and used more often in the future. Since you have a working discovery for the devices i suppose this is sufficent to find out if the thing can be declared as “online” in openhab.
Sadly it really seems that the api is “broken” in some way because there is really no way anymore to find out which app is running.
getApplicationStatusList() just shows three applications:
-- appControl.getApplicationStatusList() --
status: 200
{
"result": [
[
{
"name": "textInput",
"status": "off"
},
{
"name": "cursorDisplay",
"status": "on"
},
{
"name": "webBrowse",
"status": "off"
}
]
],
"id": 1
}
getPlayingContentInfo() unfortunately just says illegal state when an app ist running
-- avContent.getPlayingContentInfo() --
status: 200
{
"error": [
7,
"Illegal State"
],
"id": 1
}
However tv channels are reported reliably
-- avContent.getPlayingContentInfo() --
status: 200
{
"result": [
{
"uri": "tv:dvbt?trip=9999.441.41104&srvName=BBC HD",
"source": "tv:dvbt",
"title": "BBC HD",
"dispNum": "024",
"tripletStr": "9999.441.41104",
"programTitle": "Global with Matthew Amroliwala",
"startDateTime": "2019-08-22T17:00:00+0200",
"durationSec": 1800
}
],
"id": 1
}