Sony TV Plugin error

Loving the product and pushing my way through it with lots of self-help and research. I am now stuck on the plugin I found on the old forum and imported into a new file (to eliminate any other factors). Too reluctant to go back to IR on my Sony Bravia TV. It works just fine on iRule (yeah… another refugee that has seen the light) over IP.

It basically seems to work, but then keeps getting an error “Object reference not set to an instance of an object”, which seems to be refreshed and work after going back to the tile in groups.

Way beyond me at this stage, so any guidance appreciated. I’ll upload the hrp as soon as it lets me.

You should be able to upload your HRP now. Or you can email it to me at & I can take a look.

Thanks Bill. Files attached.Test - LCD plugin.hrp (137.8 KB)
SonyTV.plugin (12.9 KB)

It’s the WOL calls that’s causing the plugin to fail. You haven’t specified values for WiredMac & WifiMac. You need to go through the code & eliminate lines of code that depend on these settings. The WOL.wake calls definitely need to be removed if you don’t plan on supplying those MAC values.

I’m actually surprised this is even working at all for you. You left 4 setting values undefined. The only one you filled out was HostName. I really would have figured that XAuthPSK had to be required for this to work. I’m pretty sure that’s your pairing key to the TV set. I don’t think it will authenticate without that. I can’t say for certain because I didn’t write the plugin nor do I have a Bravia TV to test. So you might be on your own with this or you’ll have to contact the original author of the plugin.

OK thanks. I had put the WiredMac in at one stage, but it made no difference. I’ll also try the XAuthPSK setting, as perhaps it is half working off the device being trusted to iRule app on the same tablet.

Appreciate the review.

FYI, I have since put in WiredMac and XAuthPSK (after reconfiguring the TV to use it). I am not using WiFi, so left those two blank. It works for a while, then I get the error again :frowning: So, no change.

Not sure about WOL, as it initially works and will power up the TV.

Going back the original post where I found the plugin to see if anyone can help or I see any clues:
Sony TV Plugin - Home Remote Group

I wrote a new version of the plugin which does not use WoL, it sends the commands twice and seems to be more reliable. Try to use this version see if it works better.
Make sure that the IP address (hostname) and authentication are correct. This document might help you in case you have a problem wth authentication: Overview | BRAVIA Professional Displays Knowledge Center

SonyTV.plugin (13.0 KB)

I hope it will help you…

Thanks Joseph. Really appreciate your help. I’ll give it a go.

Hi Josep (apologies for getting your name wrong yesterday). The later plugin works perfectly for me. Thank you so much again for your assistance. :grinning:

1 Like

I have setup up my TV with a PSK and it authorizes fine and a display control app I downloaded allows limited control of the TV. I guess I now have to learn how to build a plugin that works in Home Remote. Is there a chance your plugin is available so I can learn from what you have done. Any help would be appreciated. I am new to the xml/xaml programming world so an example of how it is done would be very useful. Thanks for the feedback, it all makes progress possible.

Bruce, I am not sure about what you need. I modified a plugin for Sony TV and it might be helpful if you want to write yours. You can download it from the above August 4 reply. I am attaching the templates I am using; TVTile.xaml and TVDetails.xaml.
I hope it will help you.
TVDetails.xaml (92.7 KB) TVTile.xaml (4.2 KB)

Thanks, I will have a look and see if I can see how this all works (newbie to xaml).

Hi Josep, just started looking at IP control of my Bravia again and I have a couple of questions about the app integration in your plugin for the Sony TV. How do you get the “uri” for the app you are launching and the iconpath? The ones in your app are for the apps you have access to and I would like to access an Emby app that is loaded on my Bravia tv.
Thanks, Bruce.

Hi Bruce, sorry for the late reply, I just did not see the posts. This is the link where you can get the info fron the Bravia TV apps: getApplicationList (v1.0) | BRAVIA Professional Displays Knowledge Center (
I use Postman to send the command to the TV…

Thank You Josep, I am tardy in my responses as well so no worries. I plug away at this as well as a lot of other things. I have your plugin loaded in my remote design and it all appears to be working well. I just want to customize the apps in your plugin so that my Bravia can launch and terminate the apps I have configured. The API programming is all new to me so it is a slow process. My previous coding experience is C with small microcontrollers for instrumentation so this is a dramatic evolution in programming for me.
Cheers, Bruce