Sony TV Network Remote Control Plugin
Sony TV Network Remote Control Plugin
UPDATE: See below for the 2018 update. (Time certainly flies!)
I've created a plugin that interfaces directly with the IP interface on compatible Sony Bravia TVs. I've tested this on my 2013 model (and now my 2018 model). I believe this may work on other Sony models with a network interface.
To install the plugin, copy the folder in the attached .zip file into the "plugins" folder under your EventGhost installation folder. Using the configuration dialog for the plugin, set the IP address to match the TV's IP (thus, you should also set your TV to use a static IP address (or set your router to give the TV the same address all the time)) and set the TV's "pre-shared key." You can set the pre-shared key on the TV via:
Settings--Network--Home network setup--IP Address Control--Authentication (Set to: Normal & Preshared Key) / Preshared Key (Set to any four-digit number, e.g., 1111)
You can then add actions to an EventGhost macro corresponding to remote control buttons. There is also a "SendCommand" action by which you can send any IRCC code, which may be useful if your TV uses different codes.
Note that this cannot turn on the TV, since by default the network interface turns off when the TV is on standby. (The TV can be turned on using the WOL feature of compatible TVs, or using a CEC interface, such as RCAware.)
Some of this code was based off the RokuNetworkControl plugin, so thanks to barnabas1969, and also to blaher who added updates and a configuration dialog.
_________________________________________________
2018 UPDATE: I've upgraded my TV to another Sony (XBR75X900F), and I'm happy to report that the plugin still works.
I've updated the version of the plugin last revised by blaher to fix a few bugs. I also added an Action to determine the current input (by URI), which I've found useful for keeping things integrated. Note that I had some trouble with the other updated versions of this plugin in the thread, but this version is currently working for me:
I've created a plugin that interfaces directly with the IP interface on compatible Sony Bravia TVs. I've tested this on my 2013 model (and now my 2018 model). I believe this may work on other Sony models with a network interface.
To install the plugin, copy the folder in the attached .zip file into the "plugins" folder under your EventGhost installation folder. Using the configuration dialog for the plugin, set the IP address to match the TV's IP (thus, you should also set your TV to use a static IP address (or set your router to give the TV the same address all the time)) and set the TV's "pre-shared key." You can set the pre-shared key on the TV via:
Settings--Network--Home network setup--IP Address Control--Authentication (Set to: Normal & Preshared Key) / Preshared Key (Set to any four-digit number, e.g., 1111)
You can then add actions to an EventGhost macro corresponding to remote control buttons. There is also a "SendCommand" action by which you can send any IRCC code, which may be useful if your TV uses different codes.
Note that this cannot turn on the TV, since by default the network interface turns off when the TV is on standby. (The TV can be turned on using the WOL feature of compatible TVs, or using a CEC interface, such as RCAware.)
Some of this code was based off the RokuNetworkControl plugin, so thanks to barnabas1969, and also to blaher who added updates and a configuration dialog.
_________________________________________________
2018 UPDATE: I've upgraded my TV to another Sony (XBR75X900F), and I'm happy to report that the plugin still works.
I've updated the version of the plugin last revised by blaher to fix a few bugs. I also added an Action to determine the current input (by URI), which I've found useful for keeping things integrated. Note that I had some trouble with the other updated versions of this plugin in the thread, but this version is currently working for me:
- Attachments
-
- SonyNetworkRemote-0.0.4.zip
- (3.64 KiB) Downloaded 105 times
Last edited by tobyg on Sat Oct 19, 2019 8:24 pm, edited 10 times in total.
-
- Posts: 7
- Joined: Mon Jun 02, 2014 1:00 am
Re: Sony TV Network Remote Control Plugin
Hello Tobyg!
I´d like to use such a plugin for my Sony Receiver DA5800ES. Do you have any ideas where I can find some information how to get in contact with the Ip Interface of the Receiver? Sony provides an iPhone app so there must be a way to control...
Any idea will be helpful
Thanks and greetings!
I´d like to use such a plugin for my Sony Receiver DA5800ES. Do you have any ideas where I can find some information how to get in contact with the Ip Interface of the Receiver? Sony provides an iPhone app so there must be a way to control...
Any idea will be helpful

Thanks and greetings!
Re: Sony TV Network Remote Control Plugin
Medienuser,
Unfortunately, I only have experience with the TV. I agree that if there is an iPhone app then there should be a way to get it working.
Unfortunately, I only have experience with the TV. I agree that if there is an iPhone app then there should be a way to get it working.
Re: Sony TV Network Remote Control Plugin
tobyg: I wanna thank you for your excellent work! This is working perfectly with my Sony Bravia KD-65X9005A.
Re: Sony TV Network Remote Control Plugin
Thanks tobyg for your work.
I have a Sony X850, one of the 2015 Series 4k TV's. I have had some troubles making the plugin work so here are some comments in case someone finds it useful.
IP control includes access security. It seems to need a cookie, or auth first before it will work. The controlling device has to be registered with the TV and after registration the TV is using HTTP cookie basic authentication with each packet. Likely the cookie is different for each device - randomly generated at authentication and with a limited valid lifetime. See "http://www.openremote.org/display/forum ... TP+control" for great info. Using the method described by Michael Tout so you can also get the particular codes of your TV set.
Alternatively you can use a preshared key and this is what got the plugin working for me. Adjust the TV settings as:
In the plugin change the ip address as indicated by tobyg and add the line "'X-Auth-PSK': '1111'," to headers:
where 1111 is your preshared key.
I have a Sony X850, one of the 2015 Series 4k TV's. I have had some troubles making the plugin work so here are some comments in case someone finds it useful.
IP control includes access security. It seems to need a cookie, or auth first before it will work. The controlling device has to be registered with the TV and after registration the TV is using HTTP cookie basic authentication with each packet. Likely the cookie is different for each device - randomly generated at authentication and with a limited valid lifetime. See "http://www.openremote.org/display/forum ... TP+control" for great info. Using the method described by Michael Tout so you can also get the particular codes of your TV set.
Alternatively you can use a preshared key and this is what got the plugin working for me. Adjust the TV settings as:
Code: Select all
Settings
Network
Home network setup
IP Control
Authentication
Normal & Preshared Key
Preshared Key
1111 <- just choose one>
Simple IP Control
On
Code: Select all
headers = {
'X-Auth-PSK': '1111',
'User-Agent': 'TVSideView/2.0.1 CFNetwork/672.0.8 Darwin/14.0.0', ...
-
- Experienced User
- Posts: 89
- Joined: Wed Feb 08, 2012 9:41 pm
- Location: Germany
Re: Sony TV Network Remote Control Plugin
The modyfied plugin operates well with my Sony KD-49X830 4k Android TV. It would be nice if someone could add a configuration menu to the plugin.
Re: Sony TV Network Remote Control Plugin
And thank you! I had been using Curl to do it, but this is far more elegant. I'll post my EG config with the updated codes for my TV when I get a chance.paseant wrote:Thanks tobyg for your work.
I wonder if there's a way to 'ping', or send a command to discover whether the TV is on? If not I'll just use the power on/off commands as triggers to enable/disable folders for quicker switching, i.e. on startup you need a delay before switching inputs, running programs, etc., but not if it's on already.
Cheers!
Re: Sony TV Network Remote Control Plugin
I've added my .ini with codes, and the pre-shared key of "1111" for a 2015 Bravia TV, a KDL65W850C, because the codes are probably more up to date, and it was a bit of a hassle formatting them from the TV's "getRemoteControllerInfo" dump. But after a bit of Excel to duplicate just the names, and Notepad ++'s keyboard macro recorder I got there in the end. Hopefully this will save someone else that hassle.
Setting the key on the TV, and changing the IP in the attached .ini should be all you need to do.
Edit: I forgot to mention that with the newer models you can wake them up over the network now, rather than relying on a separate WOL packet, as mentioned in the first post by tobyg.
Edit: New version posted below.
Setting the key on the TV, and changing the IP in the attached .ini should be all you need to do.
Edit: I forgot to mention that with the newer models you can wake them up over the network now, rather than relying on a separate WOL packet, as mentioned in the first post by tobyg.
Edit: New version posted below.
Last edited by blaher on Mon Apr 04, 2016 1:37 am, edited 2 times in total.
Re: Sony TV Network Remote Control Plugin
Thank you so much for the plugin, I have become really desperate trying to write my own python script. It always returned an "Invalid action" when I tried to send IRCC Codes.
Thanks again!
Thanks again!

Re: Sony TV Network Remote Control Plugin
Here you go, this version has a configuration box for both the TV's IP, and the pre-shared key. Hope it helps someone.HTPCanwender wrote:It would be nice if someone could add a configuration menu to the plugin.
I've never programmed anything like this before, so the code probably looks weird to others, but it seems to work!

Edit: it also adds a list of all the possible codes as macros, as it's easier to delete the tree if you don't need them, than to do them one by one, if you do.
- Attachments
-
- SonyNetworkRemote v0.0.2.zip
- Plugin with configuration box.
- (3.28 KiB) Downloaded 425 times
-
- Experienced User
- Posts: 89
- Joined: Wed Feb 08, 2012 9:41 pm
- Location: Germany
Re: Sony TV Network Remote Control Plugin
Thank you.
Re: Sony TV Network Remote Control Plugin
hi there, is it also possible to turn ON the TV?
Thank you!!
Thank you!!
- kgschlosser
- Site Admin
- Posts: 5508
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Sony TV Network Remote Control Plugin
In the first post it states you cannot turn the TV on. It is the same for Samsung. When the TV gets powered off it also turns off the wifi/wired network card inside of it. You can either use a serial connection. Or some kind of ir blaster. What I have done myself is I used a microcontroller called an esp8266 which costs about 6 dollars USD. An it led about .50 USD and an old cell phone charger as a power supply. And a USB cable to plug into the TV. The microcontroller has WiFi built in and is pretty easy to connect to EG to tell it to send the it to turn the TV on. I went alittle further with it by opening up the TV and mounting the IR led inside right next to the eye. I didn't want to see the wires attached to the front of the TV. The USB cable I used to tell if the TV is on or off. You may need a 10k ohm pulldown resistor. The USB ports only get powered up when the TV is on. This is a surefire way to get the state of the TV. Also makes a nice way to shut down your whole system in the event you lose your remote in the sofa and don't have the time to look for it. Because EG will know that the TV lost power without you asking via a remote and can issue the commands to either turn on or off the other pieces. Simply by pressing the power button on the TV it's self.
Re: Sony TV Network Remote Control Plugin
Heck yes !!!3000 wrote:tobyg: I wanna thank you for your excellent work!
Me too.Medienuser wrote:Hello Tobyg!
I´d like to use such a plugin for my Sony Receiver...
Thanks and greetings!
I guess will have to wait a while Medien.
Keep Wishing I Will.
eventghost.net
Be there or be square.
Be there or be square.
Re: Sony TV Network Remote Control Plugin
I used to do it via an HDMI-CEC Adapter. I thought maybe I could eliminate that. But the alternative is too complicated for me.
But thank you for your answer! Always a help
edit: still thinking about your answer:
I have an HTPC. Can I install the esp8266 onto the mainboard and connect it via usb to my Sony TV? Not sure how this would work ...
But thank you for your answer! Always a help

edit: still thinking about your answer:
I have an HTPC. Can I install the esp8266 onto the mainboard and connect it via usb to my Sony TV? Not sure how this would work ...