Sony Devices Binding

Just to let everyone know - David put together a quick ESH sony audio plugin PR and I’m starting some discussions with him on the subject. The public API documentation is great - most of what I have done is confirmed by it and there were a couple of gems that I didn’t know about (the biggest being a different way to connect that doesn’t require authentication and will support a wider range of devices - including my HT-NT5 soundbar).

While I’m working on making the binding mergable and implementing some of the stuff the API shows - I’ll be having discussions with him and @Kai on the future direction of this binding (whether to make this an ESH binding or not).

5 Likes

Great news and work, @tmrobert8 !

…Does this mean there’s still a chance this will work with my STR-DN1060? :grin:

@bartus
One of the reference hardware for the API is a DN1080 - so I’m betting that the DN1060 would work fine as well.

1 Like

Excellent, can’t wait to try it out!

i had this working on 2 of my 3 sony tvs. but i got a dead sd card and had to start over.
i now cant find the tvs in the inbox. i have removed the openhab remote from the tvs. now i cant work out why they are not being found :frowning:
i can see the binding has loaded as its in the list of installed bindings
i cant find the logs as openhab log viewer isnt working after starting over.
any help working this out would be great :slight_smile:
thanks

I got really excited when I first saw this thread, because I have one SA-NS300 and seven Sony SA-NS400 speakers through the house, and I was hoping that your binding might include them. I wrote some scripts to control them through OH, including putting them into Party mode for announcements, but it would be nice to have it all wrapped into a binding that makes use of audio sinks. I have started to deconstruct the Sonos binding with the intent of putting together a Sony HomeShare binding, but if these devices would become supported by your binding, then I’m probably wasting my time. They are slightly older tech, but is there any chance you would/could be adding support for these speakers?

@freke awesome to see that Sony made a public API! On the device page, only three speakers are listed. Why is it limited to there three? Will other speakers follow or are more speakers than the listed once supported? What about the SRS-ZR7 for example?

Hi @dominicdesu
I hope more speakers will be listed and supported by SONY in the future (I don’t know when or which, it is decided in Tokyo), the main reason it is only three, is manpower. It is a lot of work to go through to make this possible, so we selected one of each category (Soundbar, Receiver, Wireless Speaker) and in different price range to start with to make sure that something got released.

The SRS-ZR7 is almost the same as SRS-ZR5 so even if it is not officially supported it will (most likely) work with @tmrobert8 OpenHAB binding.

@freke nice, thanks for the explanation. So the devices already have the capability to be controlled via an API, just the (public) API is missing :upside_down_face:
I am currently looking for a replacement for my Panasonic AllPlay speakers, and the Sony Multiroom speakers look very promising! I’ll keep an eye on the API development :slight_smile:
Thanks for your and @tmrobert8’s effort!

Hi @tmrobert8
I looked in to the docs I have about the HT-NT5 and it uses the same API version as STR-DN1070, this is the receiver I first used to test the API and you should not have any authentication problems with it.

That sad, I had some problems with WebSockets in the beginning, saying that I needed authentication. In the end it was the WebSocket library I used that caused the problem it added “Origin: file://” to the upgrade message and that causes the problem I got.
So it might be worth checking the http header to see if anything there is causing your auth problem. Even if non of the audio products are using the authentication the functionality, is there in the backend and can cause unexpected errors if trigged.

Finally made it work on my Sony Bravia KDL-48W600B! I’m still very new at this so if there’s anything else you need let me know and I’ll try to post it. I just mapped the power, volume slider and mute switches for now and they’re all working.

Transform:

*AD=AAAAAgAAABoAAAA7Aw%3D%3D
ActionMenu=AAAAAgAAAMQAAABLAw%3D%3D
acTVila=AAAAAgAAABoAAAByAw%3D%3D
Analog2=AAAAAQAAAAEAAAA4Aw%3D%3D
Analog=AAAAAgAAAHcAAAANAw%3D%3D
Analog?=AAAAAgAAAJcAAAAuAw%3D%3D
AnalogRgb1=AAAAAQAAAAEAAABDAw%3D%3D
AppliCast=AAAAAgAAABoAAABvAw%3D%3D
Assists=AAAAAgAAAMQAAAA7Aw%3D%3D
Audio=AAAAAQAAAAEAAAAXAw%3D%3D
AudioMixDown=AAAAAgAAABoAAAA9Aw%3D%3D
AudioMixUp=AAAAAgAAABoAAAA8Aw%3D%3D
AudioQualityMode=AAAAAgAAAJcAAAB7Aw%3D%3D
Blue=AAAAAgAAAJcAAAAkAw%3D%3D
BS=AAAAAgAAAJcAAAAsAw%3D%3D
BSCS=AAAAAgAAAJcAAAAQAw%3D%3D
ChannelDown=AAAAAQAAAAEAAAARAw%3D%3D
ChannelUp=AAAAAQAAAAEAAAAQAw%3D%3D
ClosedCaption=AAAAAgAAAKQAAAAQAw%3D%3D
Component1=AAAAAgAAAKQAAAA2Aw%3D%3D
Component2=AAAAAgAAAKQAAAA3Aw%3D%3D
Confirm=AAAAAQAAAAEAAABlAw%3D%3D
CS=AAAAAgAAAJcAAAArAw%3D%3D
CursorDown=AAAAAgAAAJcAAABQAw%3D%3D
CursorLeft=AAAAAgAAAJcAAABNAw%3D%3D
CursorRight=AAAAAgAAAJcAAABOAw%3D%3D
CursorUp=AAAAAgAAAJcAAABPAw%3D%3D
Ddata=AAAAAgAAAJcAAAAVAw%3D%3D
DeleteVideo=AAAAAgAAAHcAAAAfAw%3D%3D
DemoMode=AAAAAgAAAJcAAAB8Aw%3D%3D
DemoSurround=AAAAAgAAAHcAAAB7Aw%3D%3D
Digital=AAAAAgAAAJcAAAAyAw%3D%3D
DigitalToggle=AAAAAgAAAHcAAABSAw%3D%3D
Display=AAAAAQAAAAEAAAA6Aw%3D%3D
DOT=AAAAAgAAAJcAAAAdAw%3D%3D
Down=AAAAAQAAAAEAAAB1Aw%3D%3D
DpadCenter=AAAAAgAAAJcAAABKAw%3D%3D
DUX=AAAAAgAAABoAAABzAw%3D%3D
Eject=AAAAAgAAAJcAAABIAw%3D%3D
Enter=AAAAAQAAAAEAAAALAw%3D%3D
EPG=AAAAAgAAAKQAAABbAw%3D%3D
Exit=AAAAAQAAAAEAAABjAw%3D%3D
Favorites=AAAAAgAAAHcAAAB2Aw%3D%3D
FlashMinus=AAAAAgAAAJcAAAB5Aw%3D%3D
FlashPlus=AAAAAgAAAJcAAAB4Aw%3D%3D
FootballMode=AAAAAgAAABoAAAB2Aw%3D%3D
Forward=AAAAAgAAAJcAAAAcAw%3D%3D
GGuide=AAAAAQAAAAEAAAAOAw%3D%3D
Green=AAAAAgAAAJcAAAAmAw%3D%3D
Hdmi1=AAAAAgAAABoAAABaAw%3D%3D
Hdmi2=AAAAAgAAABoAAABbAw%3D%3D
Hdmi3=AAAAAgAAABoAAABcAw%3D%3D
Hdmi4=AAAAAgAAABoAAABdAw%3D%3D
Help=AAAAAgAAAMQAAABNAw%3D%3D
Home=AAAAAQAAAAEAAABgAw%3D%3D
iManual=AAAAAgAAABoAAAB7Aw%3D%3D
Input=AAAAAQAAAAEAAAAlAw%3D%3D
InternetVideo=AAAAAgAAABoAAAB5Aw%3D%3D
InternetWidgets=AAAAAgAAABoAAAB6Aw%3D%3D
Jump=AAAAAQAAAAEAAAA7Aw%3D%3D
KeyPad=AAAAAgAAABoAAAB1Aw%3D%3D
Left=AAAAAQAAAAEAAAA0Aw%3D%3D
Media=AAAAAgAAAJcAAAA4Aw%3D%3D
MediaAudioTrack=AAAAAQAAAAEAAAAXAw%3D%3D
Mode3D=AAAAAgAAAHcAAABNAw%3D%3D
Mute=AAAAAQAAAAEAAAAUAw%3D%3D
MyEPG=AAAAAgAAAHcAAABrAw%3D%3D
Netflix=AAAAAgAAABoAAAB8Aw%3D%3D
Next=AAAAAgAAAJcAAAA9Aw%3D%3D
Num0=AAAAAQAAAAEAAAAJAw%3D%3D
Num11=AAAAAQAAAAEAAAAKAw%3D%3D
Num12=AAAAAQAAAAEAAAALAw%3D%3D
Num1=AAAAAQAAAAEAAAAAAw%3D%3D
Num2=AAAAAQAAAAEAAAABAw%3D%3D
Num3=AAAAAQAAAAEAAAACAw%3D%3D
Num4=AAAAAQAAAAEAAAADAw%3D%3D
Num5=AAAAAQAAAAEAAAAEAw%3D%3D
Num6=AAAAAQAAAAEAAAAFAw%3D%3D
Num7=AAAAAQAAAAEAAAAGAw%3D%3D
Num8=AAAAAQAAAAEAAAAHAw%3D%3D
Num9=AAAAAQAAAAEAAAAIAw%3D%3D
OneTouchRec=AAAAAgAAABoAAABiAw%3D%3D
OneTouchStop=AAAAAgAAABoAAABjAw%3D%3D
OneTouchTimeRec=AAAAAgAAABoAAABkAw%3D%3D
OneTouchView=AAAAAgAAABoAAABlAw%3D%3D
Options=AAAAAgAAAJcAAAA2Aw%3D%3D
PAP=AAAAAgAAAKQAAAB3Aw%3D%3D
Pause=AAAAAgAAAJcAAAAZAw%3D%3D
PhotoFrame=AAAAAgAAABoAAABVAw%3D%3D
PicOff=AAAAAQAAAAEAAAA%2BAw%3D%3D
PictureMode=AAAAAQAAAAEAAABkAw%3D%3D
PictureOff=AAAAAQAAAAEAAAA%2BAw%3D%3D
Play=AAAAAgAAAJcAAAAaAw%3D%3D
PopUpMenu=AAAAAgAAABoAAABhAw%3D%3D
Power OFF=AAAAAQAAAAEAAAAvAw%3D%3D
Power ON=AAAAAQAAAAEAAAAuAw%3D%3D
Power=AAAAAQAAAAEAAAAVAw%3D%3D
PowerOff=AAAAAQAAAAEAAAAvAw%3D%3D
Prev=AAAAAgAAAJcAAAA8Aw%3D%3D
ProgramDescription=AAAAAgAAAJcAAAAWAw%3D%3D
RakurakuStart=AAAAAgAAAHcAAABqAw%3D%3D
Rec=AAAAAgAAAJcAAAAgAw%3D%3D
Red=AAAAAgAAAJcAAAAlAw%3D%3D
Return=AAAAAgAAAJcAAAAjAw%3D%3D
Rewind=AAAAAgAAAJcAAAAbAw%3D%3D
Right=AAAAAQAAAAEAAAAzAw%3D%3D
SceneSelect=AAAAAgAAABoAAAB4Aw%3D%3D
SEN=AAAAAgAAABoAAAB9Aw%3D%3D
ShopRemoteControlForcedDynamic=AAAAAgAAAJcAAABqAw%3D%3D
Sleep=AAAAAQAAAAEAAAAvAw%3D%3D
SleepTimer=AAAAAQAAAAEAAAA2Aw%3D%3D
Social=AAAAAgAAABoAAAB0Aw%3D%3D
Stop=AAAAAgAAAJcAAAAYAw%3D%3D
SubTitle=AAAAAgAAAJcAAAAoAw%3D%3D
SyncMenu=AAAAAgAAABoAAABYAw%3D%3D
Teletext=AAAAAQAAAAEAAAA%2FAw%3D%3D
TenKey=AAAAAgAAAJcAAAAMAw%3D%3D
Theater=AAAAAgAAAHcAAABgAw%3D%3D
TopMenu=AAAAAgAAABoAAABgAw%3D%3D
TrackID=AAAAAgAAABoAAAB%2BAw%3D%3D
Tv=AAAAAQAAAAEAAAAkAw%3D%3D
Tv_Radio=AAAAAgAAABoAAABXAw%3D%3D
TvAnalog=AAAAAQAAAAEAAAA4Aw%3D%3D
TvAntennaCable=AAAAAQAAAAEAAAAqAw%3D%3D
TvInput=AAAAAQAAAAEAAAAlAw%3D%3D
TvPause=AAAAAgAAABoAAABnAw%3D%3D
TvPower=AAAAAQAAAAEAAAAVAw%3D%3D
TvSatellite=AAAAAgAAAMQAAABOAw%3D%3D
Up=AAAAAQAAAAEAAAB0Aw%3D%3D
Video1=AAAAAQAAAAEAAABAAw%3D%3D
Video2=AAAAAQAAAAEAAABBAw%3D%3D
VolumeDown=AAAAAQAAAAEAAAATAw%3D%3D
VolumeUp=AAAAAQAAAAEAAAASAw%3D%3D
WakeUp=AAAAAQAAAAEAAAAuAw%3D%3D
Wide=AAAAAgAAAKQAAAA9Aw%3D%3D
WirelessSubwoofer=AAAAAgAAAMQAAAB%2BAw%3D%3D
WriteChapter=AAAAAgAAAHcAAABsAw%3D%3D
Yellow=AAAAAgAAAJcAAAAnAw%3D%3D

@nick_woodforth

Sounds like you need to delete your cache/temp directories and start over again since it sounds like you have bigger openhab issues than just this binding.

@freke

Absolutely kills me when you say “…looked into the docs I have about …” - would have loved to see those resources! The authentication issues I was having is because I didn’t know about the websockets until now (hadn’t really looked at what that port was doing - so never noticed the websocket protocol) and I was trying to figure out how to authenticate when I was missing the “actRegister” method. However - with the websocket protocol - I believe I should be able to get those working.

Would you be able to state whether ALL devices that implement webscalar service will have a websocket available (and thus can change everything over to a websocket rather than http posts)?

Thanks,
Tim

@tmrobert8 the short answer is, I don’t know.
From the sources I can see my guess is there is some older products that don’t have websockets support, it looks like the first versions of webscalar didn’t support websockets, but I don’t know.

To complicate it even more it is not certain that all methods is present in both even if both are supported. The only one I know of, is switchNotification, that is only pressent for websockets.

If “actRegister” method is missing no authentication is needed for that product :wink:
If it is present some functions will need authentication for both websockets and http.

@freke

That’s very helpful - thanks!

Can someone help?

Ive added the binding but in the paper UI there is no option to discover devices.

Thanks

@Mattrees007

Either the discovery messages from the devices can’t make it to the device openHAB is running on (ie firewall/network issue) or more than likely you’re running on 2.2 and the binding doesn’t work on 2.2 because of the apache client being used. You can look in the log and see if it says something like #386 - if it does, that’s the 2.2 issue I have.

Next version of the binding - which I’m still working on, will replace it with a good client and eliminate that issue.,

Tim

Hi Tim,

Posted above but have a little more information in case there’s anything obvious I’m missing, or something on this old device that’s obviously different from your code. Any suggestions would be extremely welcome.

TV: bravia KDL-32CX523 (old! c.2011)
Problem: All commands are working find apart from:

  • Power On - through there doesn’t seem to be WOL on this, or at least it doesn’t work, so maybe this won’t either

  • Power Off - this is the one I really want and isn’t working with the commands from the .map file (I’ve tried replacing the %3d with = as well. No Dice.

Power OFF=ircc:AAAAAQAAAAEAAAAvAw%3D%3D
Power ON=ircc:AAAAAQAAAAEAAAAuAw%3D%3D
Power=ircc:AAAAAQAAAAEAAAAVAw%3D%3D

Looking into it a bit further…
http://192.168.21.18/s2mtv/SSDgetDeviceInfo/

<response>
<header version="01">
<command>SSDgetDeviceInfo</command>
<code>0</code>
</header>
<sony>
<product id="DTV">
<referrer_id>F0BF977F643F</referrer_id>
<features>
<direct_url>true</direct_url>
</features>
<cers>
<x_unr_version>1.2</x_unr_version>
<x_cers_actionlist_url>http://192.168.21.18:80/cers/ActionList.xml</x_cers_actionlist_url>
</cers>
<ircc>
<x_ircc_version>1.0</x_ircc_version>
<scpd_url>http://192.168.21.18:80/IRCC/IRCCSCPD.xml</scpd_url>
<control_url>http://192.168.21.18:80/IRCC</control_url>
<event_sub_url/>
</ircc>
<iptv_params>
<build>PKG4.027EUA</build>
<language>en</language>
<rating>21</rating>
<age_rating>21</age_rating>
<mpaa_rating>X</mpaa_rating>
<rating_country>EUR</rating_country>
<block_unrated>f</block_unrated>
<ui_type>0</ui_type>
<drm_types>MARLINBB,SSL,WMDRM10</drm_types>
<config_types>CAD,FLX</config_types>
<audio_types>AAC,AAC-LC,AC3,HE-AAv1,HE-AAv2,MP3,WMA</audio_types>
<stream_types>HTTP,HTTPLS,HTTPS</stream_types>
<video_types>AVC,MPEG2,WMV9</video_types>
<container_types>3GPP,ASF,MOV,MP3,MP4,MPEG2TS</container_types>
<display_types>2D</display_types>
<metafile_types>M3U8</metafile_types>
<display_width>960</display_width>
<display_height>540</display_height>
</iptv_params>
</product>
</sony>
</response>

http://192.168.21.18/IRCC/IRCCSCPD.xml

<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<actionList>
<action>
<name>X_SendIRCC</name>
<argumentList>
<argument>
<name>IRCCCode</name>
<direction>in</direction>
<relatedStateVariable>X_A_ARG_TYPE_IRCCCode</relatedStateVariable>
</argument>
</argumentList>
</action>
<action>
<name>X_GetStatus</name>
<argumentList>
<argument>
<name>CategoryCode</name>
<direction>in</direction>
<relatedStateVariable>X_A_ARG_TYPE_Category</relatedStateVariable>
</argument>
<argument>
<name>CurrentStatus</name>
<direction>out</direction>
<relatedStateVariable>X_A_ARG_TYPE_CurrentStatus</relatedStateVariable>
</argument>
<argument>
<name>CurrentCommandInfo</name>
<direction>out</direction>
<relatedStateVariable>X_A_ARG_TYPE_CurrentCommandInfo</relatedStateVariable>
</argument>
</argumentList>
</action>
</actionList>
<serviceStateTable>
<stateVariable sendEvents="no">
<name>X_A_ARG_TYPE_IRCCCode</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>X_A_ARG_TYPE_Category</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>X_A_ARG_TYPE_CurrentStatus</name>
<dataType>string</dataType>
</stateVariable>
<stateVariable sendEvents="no">
<name>X_A_ARG_TYPE_CurrentCommandInfo</name>
<dataType>string</dataType>
</stateVariable>
</serviceStateTable>
</scpd>

http://192.168.21.18/cers/ActionList.xml

<actionList>
<action name="register" mode="2" url="http://192.168.21.18:80/cers/api/register"/>
<action name="getText" url="http://192.168.21.18:80/cers/api/getText"/>
<action name="sendText" url="http://192.168.21.18:80/cers/api/sendText"/>
<action name="getSystemInformation" url="http://192.168.21.18:80/cers/api/getSystemInformation"/>
<action name="getRemoteCommandList" url="http://192.168.21.18:80/cers/api/getRemoteCommandList"/>
<action name="getStatus" url="http://192.168.21.18:80/cers/api/getStatus"/>
<action name="BgmSearch::search" url="http://192.168.21.18:80/BgmSearch/search"/>
</actionList

http://192.168.21.18:52323/dmr.xml

<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:pnpx="http://schemas.microsoft.com/windows/pnpx/2005/11" xmlns:df="http://schemas.microsoft.com/windows/2008/09/devicefoundation">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>
<friendlyName>BRAVIA KDL-32CX523</friendlyName>
<manufacturer>Sony Corporation</manufacturer>
<manufacturerURL>http://www.sony.net/</manufacturerURL>
<modelName>KDL-32CX523</modelName>
<UDN>uuid:00000000-0000-1010-8000-F0BF977F643F</UDN>
<dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMR-1.50</dlna:X_DLNADOC>
<iconList>
<icon>
<mimetype>image/png</mimetype>
<width>32</width>
<height>32</height>
<depth>24</depth>
<url>/MediaRenderer_32x32.png</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/MediaRenderer_48x48.png</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>60</width>
<height>60</height>
<depth>24</depth>
<url>/MediaRenderer_60x60.png</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/MediaRenderer_120x120.png</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>32</width>
<height>32</height>
<depth>24</depth>
<url>/MediaRenderer_32x32.jpg</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/MediaRenderer_48x48.jpg</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>60</width>
<height>60</height>
<depth>24</depth>
<url>/MediaRenderer_60x60.jpg</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/MediaRenderer_120x120.jpg</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>
<serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>
<SCPDURL>/RenderingControlSCPD.xml</SCPDURL>
<controlURL>/upnp/control/RenderingControl</controlURL>
<eventSubURL>/upnp/event/RenderingControl</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
<serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
<SCPDURL>/ConnectionManagerSCPD.xml</SCPDURL>
<controlURL>/upnp/control/ConnectionManager</controlURL>
<eventSubURL>/upnp/event/ConnectionManager</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:AVTransport:1</serviceType>
<serviceId>urn:upnp-org:serviceId:AVTransport</serviceId>
<SCPDURL>/AVTransportSCPD.xml</SCPDURL>
<controlURL>/upnp/control/AVTransport</controlURL>
<eventSubURL>/upnp/event/AVTransport</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-sony-com:service:IRCC:1</serviceType>
<serviceId>urn:schemas-sony-com:serviceId:IRCC</serviceId>
<SCPDURL>http://192.168.21.18:80/IRCC/IRCCSCPD.xml</SCPDURL>
<controlURL>http://192.168.21.18:80/IRCC</controlURL>
<eventSubURL/>
</service>
</serviceList>
<av:X_MaxBGMCount xmlns:av="urn:schemas-sony-com:av">64</av:X_MaxBGMCount>
<av:X_StandardDMR xmlns:av="urn:schemas-sony-com:av">1.1</av:X_StandardDMR>
<av:X_IRCCCodeList xmlns:av="urn:schemas-sony-com:av">
<av:X_IRCCCode command="Power">AAAAAQAAAAEAAAAVAw==</av:X_IRCCCode>
<av:X_IRCCCode command="Power ON">AAAAAQAAAAEAAAAuAw==</av:X_IRCCCode>
<av:X_IRCCCode command="Power OFF">AAAAAQAAAAEAAAAvAw==</av:X_IRCCCode>
</av:X_IRCCCodeList>
<pnpx:X_compatibleId>MS_DigitalMediaDeviceClass_DMR_V001</pnpx:X_compatibleId>
<pnpx:X_deviceCategory>MediaDevices</pnpx:X_deviceCategory>
<pnpx:X_hardwareId>VEN_0033&DEV_0006&REV_01</pnpx:X_hardwareId>
<df:X_deviceCategory>Display.TV Multimedia.DMR</df:X_deviceCategory>
<av:X_IRCC_DeviceInfo xmlns:av="urn:schemas-sony-com:av">
<av:X_IRCC_Version>1.0</av:X_IRCC_Version>
<av:X_IRCC_CategoryList>
<av:X_IRCC_Category>
<av:X_CategoryInfo>AAEAAAAB</av:X_CategoryInfo>
</av:X_IRCC_Category>
<av:X_IRCC_Category>
<av:X_CategoryInfo>AAIAAACX</av:X_CategoryInfo>
</av:X_IRCC_Category>
<av:X_IRCC_Category>
<av:X_CategoryInfo>AAIAAAAa</av:X_CategoryInfo>
</av:X_IRCC_Category>
<av:X_IRCC_Category>
<av:X_CategoryInfo>AAIAAACk</av:X_CategoryInfo>
</av:X_IRCC_Category>
</av:X_IRCC_CategoryList>
</av:X_IRCC_DeviceInfo>
<av:X_UNR_DeviceInfo xmlns:av="urn:schemas-sony-com:av">
<av:X_UNR_Version>1.2</av:X_UNR_Version>
<av:X_CERS_ActionList_URL>http://192.168.21.18:80/cers/ActionList.xml</av:X_CERS_ActionList_URL>
</av:X_UNR_DeviceInfo>
<av:X_S2MTV_DeviceInfo xmlns:av="urn:schemas-sony-com:av">
<av:X_S2MTV_Version>1.0</av:X_S2MTV_Version>
<av:X_S2MTV_BaseURL>http://192.168.21.18:80/s2mtv</av:X_S2MTV_BaseURL>
</av:X_S2MTV_DeviceInfo>
</device>
</root>

EDIT

Well, I suspect it’s not your code as this has the same problem…

#!/bin/sh

set -e

#if [ "$1" = "" ] || [ "$2" = "" ]; then
#  echo "Usage: $0 <TV_IP> <IRCC_COMMAND>"
#  exit 1
#fi

cmd="<?xml version=\"1.0\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:X_SendIRCC xmlns:u=\"urn:schemas-sony-com:service:IRCC:1\"><IRCCCode>$2</IRCCCode></u:X_SendIRCC></s:Body></s:Envelope>"


code=$(curl -w "%{http_code}" --silent -XPOST http://$1/IRCC -d "$cmd" -H 'Content-Type: text/xml; charset=UTF-8' -H 'SOAPACTION: "urn:schemas-sony-com:service:IRCC:1#X_SendIRCC"' -H "X-Auth-PSK: 0000" -o /dev/null )

if [ "$code" = "200" ]; then
  echo "✓"
else
  echo "Command failed (HTTP_CODE: $code, try running it in a console)"
  exit 1
fi

I got my Sony KD65XD8577 working with the latest version as a scalar device. Great Job from you!
Now I would like to realize a Switch in the basic UI, which allows switching

  • some (very few) named channels
  • HDMI 3
  • Kodi (installed App)
  • and maybe other Apps (as the Sony has a really weird interface IMHO).

However, I do not get the point how to interpret the things it found. I have in the Paper UI:
App Kodi Status
sony:scalar:a2686999-8d9f-48f1-b37c-bc558eebf92a:appControl-com__0sony__0dtv__0org__0xbmc__0kodi__0org__0xbmc__0kodi__0Splash-appstatuscontent_copy
Switch
from which I made an Item

Switch TV_Kodi          "TV Kodi"           {channel="sony:scalar:a2686999-8d9f-48f1-b37c-bc558eebf92a:appControl-com__0sony__0dtv__0org__0xbmc__0kodi__0org__0xbmc__0kodi__0Splash-appstatus"}

Well it kind of works: If I switch the Item to ON, Kodi starts! Great. But the name ‘appstatus’ implicates that it would also show ON when KODI is running, what it doesn’t. But thats not so important.
I can also find more things, like for HDMI. What needs to be done now to bring them together as a selection box? I think I need some thing like an ‘input selector’, but I cannot find sth alike. Can you suggest sth?
Thanks
Thomas

@beardedfool
Power commands on all sony devices are flaky at best. From your actionList - do the getRemoteCommandList URL and double check the power like commands in it (although that’s how the binding get’s the commands for the map file). I have a feeling yours just ignores them - but I’d give a few versions a try (note: don’t replace the %3D with equals in the map file - those are encoded and decoded on purpose).