Skip to content
Kirk edited this page Jul 2, 2015 · 37 revisions

Welcome to the SonyAPILib Wiki!

SonyAPILib.dll v5.2

Written by: Kirk Heron 2015

This API Library Methods and Properties can be used to: Discover, Register and Control UPnP/DLNA devices equipped with a LAN or WiFi port. Even though this API was created to control Sony devices, it can also be used to control ANY UPnP/DLNA device that is running one of the following services:

  • RenderingControl - urn:schemas-upnp-org:service:RenderingControl:1
  • AVTransport - urn:schemas-upnp-org:service:AVTransport:1
  • Connection Mannager - urn:schemas-upnp-org:service:ConnectionManager:1
  • IRCC - urn:schemas-sony-com:service:IRCC:1
  • Party - urn:schemas-upnp-org:service:Party:1

Sony Smart devices are loaded with 1 of 3 different generations of a Linux based web server. Depending on the year of the device will determine the generation of the API loaded in the device. Generations 1 and 2 mainly use UPnP SOAP services to communicate or send commands. Generation 3 devices are now mainly using JSON to communicate or send commands. Devices other than Sony will be found to use SOAP commands and should operate correctly.

To access ALL features of any Sony generation device, a Registration process MUST be completed! (It has been determined by several users that registration is not required to send commands, however other features will not be available.) Depending on the Generation of the device will determine the correct Registration process to follow. For example, Generation 1 devices will automatically display a confirmation screen on the device(TV) to complete the registration. Generation 2 devices have to be put in to "Registration Mode" before a registration attempt is made. Generation 3 devices will display a PIN Code on the screen that has to be confirmed with the device before registration is complete. Devices other than Sony may NOT require a registration process, and may operate correctly.

All generations of Sony devices uses an IRCC Name:Value pair for sending commands to the device. Retrieval of this list from the device is determined by the generation of the device. Generations 1 and 2 will have an actionList_Url that contains the URL method used to retrieve the remoteCommandList from the device. You MUST have completed the registration process before the device will return this information. Generations 1 & 2 devices will return an XML file (String) containing the Name:Value pairs. For example: <command name="VolumeUp" type="ircc" value="AAAAAQAAAAEAAAASAw==" />.Generation 3 devices uses a JSON command to retrieve the Command list and returns a JSON value like this: {"name":"VolumeUp","value":"AAAAAQAAAAEAAAASAw=="}

Clone this wiki locally