OK I have the home cinema 7.2 amp, not a TV but I guess that's not important. I might have a look myself but I do have the ability to offer you a VPN (it wont be particularly quick cross Atlantic though) but I will try to have a dig around myself with those UPNP tools etc and see what I can do. Im pretty sure those errors are going to be something generic/silly - surly everyone is getting them?
I notice there is a homebridge plugin and as I'm slowly moving in that direction - maybe I will see if that works. Ive actually got to the point where there are some annoying things with this new amp, so much so that I may return it as not fit for purpose - we shall see.
Thanks for the reply!
Regards,
Phil
Sony TV Network Remote Control Plugin
Re: Sony TV Network Remote Control Plugin
I have an older 2011 model,(KDL-46EX723 Generation 1 device) that doesn't have any pin code, so the eventghost plugin doesn't work for me.
However there's a workaround.
There is a nifty little utility called DLNALib.exe(229 KB) that is custom made for communicating with your Sony TV.
It can be downloaded from here:https://github.com/KHerron/SonyAPILib/t ... /bin/Debug
Download these 3 files and put in a folder of your choice:(Example C:\Sony)
First we need to create a device file, that is the utility will pull an xml file from the TV.
Locate the IP adress of your TV and run the command below, (Substitute with your own IP) from the command prompt, (/b switch)
If you for some reason have another portnumber or url, you can run the utility with it's Device Locator function, (/l switch):
In my case it created a file called KDL-46EX723.xml in the C:\Sony folder that can be renamed to anything, ex, myDevice.xml
Now we can register the device, (your computer) to the TV with the command below, (/r switch)
Be Prepared to react at the Device or enter a PIN code, If device is Gen3, console will prompt for PIN.
Cookie data will be saved to the C:\ProgramData\Sony folder.
That's it!
The above process only needs to be done once.
Now we can start firing off remote buttons that can be added to eventghosts Windows command action, (/a switch)
(Example Volume down)
You can find more button codes here: https://github.com/KHerron/SonyAPILib/w ... mmand-List
DLNALib documentation: https://github.com/KHerron/SonyAPILib/w ... ib-example
SonyAPILib Wiki: https://github.com/KHerron/SonyAPILib/wiki
Second option is:
Download and use curl.exe,(only one exe, same install procedure as DLNALib.exe)
No need to register the device if it's generation 1.
Command below:
Here is the command itself (VolumeDown.xml)
Third option is:
With batch files & curl, (generation 3): https://github.com/mdrichardson/tv-control
Cheers!
However there's a workaround.
There is a nifty little utility called DLNALib.exe(229 KB) that is custom made for communicating with your Sony TV.
It can be downloaded from here:https://github.com/KHerron/SonyAPILib/t ... /bin/Debug
Download these 3 files and put in a folder of your choice:(Example C:\Sony)
- DLNALib.exe
- SonyAPILib.dll
- Newtonsoft.Json.dll
First we need to create a device file, that is the utility will pull an xml file from the TV.
Locate the IP adress of your TV and run the command below, (Substitute with your own IP) from the command prompt, (/b switch)
Code: Select all
DLNALib.exe /b http://192.168.0.100:52323/DMR.xml C:\Sony
Code: Select all
DLNALib.exe /l
Now we can register the device, (your computer) to the TV with the command below, (/r switch)
Code: Select all
DLNALib.exe /r C:\Sony\myDevice.xml /log
Cookie data will be saved to the C:\ProgramData\Sony folder.
That's it!
The above process only needs to be done once.
Now we can start firing off remote buttons that can be added to eventghosts Windows command action, (/a switch)
(Example Volume down)
Code: Select all
DLNALib.exe /a C:\Sony\myDevice.xml IRCC XSendIRCC AAAAAQAAAAEAAAATAw==
DLNALib documentation: https://github.com/KHerron/SonyAPILib/w ... ib-example
SonyAPILib Wiki: https://github.com/KHerron/SonyAPILib/wiki
Second option is:
Download and use curl.exe,(only one exe, same install procedure as DLNALib.exe)
No need to register the device if it's generation 1.
Command below:
Code: Select all
curl -d @"C:\Sony\VolumeDown.xml" -c cookies -b cookies http://192.168.0.100:80/IRCC
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<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>AAAAAQAAAAEAAAATAw==</IRCCCode>
</u:X_SendIRCC>
</s:Body>
</s:Envelope>
With batch files & curl, (generation 3): https://github.com/mdrichardson/tv-control
Cheers!

Re: Sony TV Network Remote Control Plugin
I managed to get the plugin working for my generation 1 TV from 2011, (Plugin v.0.0.4)
All i did was edit line 123 in __init__.py from:
To:
And after some network sniffing of DLNALib.exe i also changed line 142
from:
To:
Above is mac number of computer.
Great fun!
All i did was edit line 123 in __init__.py from:
Code: Select all
conn=urllib2.Request('http://' + globalIp + '/sony/IRCC', globalSOAPStrings.contentStart + commandString + globalSOAPStrings.contentEnd, globalSOAPStrings.headers)
Code: Select all
conn=urllib2.Request('http://' + globalIp + '/IRCC', globalSOAPStrings.contentStart + commandString + globalSOAPStrings.contentEnd, globalSOAPStrings.headers)
from:
Code: Select all
'X-Auth-psk': globalPreSharedKey,
Code: Select all
'X-CERS-DEVICE-ID': 'TVSideView:94-C6-92-1D-7C-45',
Great fun!
