How can I speed up the process (asked by @petewill)

147 views
Skip to first unread message

SonyAPILib

unread,
Apr 10, 2015, 1:14:51 PM4/10/15
to sony-api...@googlegroups.com
Is there a way to speed up the process? There seems to be a 15-25 second delay?

SonyAPILib

unread,
Apr 10, 2015, 1:22:40 PM4/10/15
to sony-api...@googlegroups.com
Yes @petewil, there is a way.

This was a reported bug (by You) that has been fixed.

To speed up the process, you have to get away from using Discovery().
This will require you to either Hard Code some information, or add code that loads this information from a file or database.
This process has also been shown in the "Manual_Initialize_Example".

To speed up your process,
Set the 4 main properties of the SonyDevice before you run the Initialize() method.

For example:
SonyAPI_Lib mySonyLib = new SonyAPI_Lib();
            mySonyLib.LOG.enableLogging = false;
            SonyAPILib.SonyAPI_Lib.SonyDevice mySonyDev = new SonyAPI_Lib.SonyDevice();
            mySonyDev.Name = "STR-DN840 9C7529";
            mySonyDev.Device_IP_Address = "192.168.0.16";
            mySonyDev.actionList_URL = @"http://192.168.0.16:50001/cers/ActionList.xml";  // If not Gen 3, this must point to your device's ActionList.xml file. If Gen 3, set to empty string. ""
            mySonyDev.control_URL = @"http://192.168.0.16:8080/upnp/control/IRCC"; // This must match the controlURL for the IRCC:1 service in all generations device description file.
            mySonyDev.Generation = 1; // If manually setting the 2 above properties, you must set this property.
            mySonyDev.initialize();
            string results = mySonyDev.send_ircc(mySonyDev.getIRCCcommandString("VolumeUp"));

If you are running this on a Generation 3 device, you will need to set the "actionList_URL" property to an empty string.
for example:
mySonyDev.actionList_URL = "";
Reply all
Reply to author
Forward
0 new messages