-
Notifications
You must be signed in to change notification settings - Fork 19
Home
### 5.3 is under Construction. Wiki is undergoing Updates!
This API Library provides Methods and Properties 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 with 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 still 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 some features may 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 should still 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=="}
. Non-Sony devices may not run the IRCC:1 service, and may not have a RemoteCommandList. This API should still operate correctly as long as they are running 1 of the services mentioned above.
For more information see:
SonyAPI_Lib Class
SonyAPI_Lib Changes
Structure