Sony TV Driver

It is entirely possible they changed the security in the newest models though, too. Not sure.

This works great on My Sony TV its a XH95 (Great TV BTW).

All I needed to do was goto Network IP Setup to specific my PSK. Which I popped into the Virtual Device.

This is great.

I noticed the status is also not auto polled.

When I get some time there is probably the answer in their developer resource:
https://pro-bravia.sony.net/develop/index.html

Thanks to the dude who created the driver.

I just installed this on my XBR-75X850G, it properly pulls the MAC address but nothing else works

Can't see a way to enable logging so don't know what to try

Thoughts?

Install the version below. He has added logging to this app.

Debug enabled.
Tried many options, on/off, volume, channel... nothing working yet

@JasonJoel

Thoughts on this?

Don't know offhand, I haven't used this in a while as I moved most lan based integrations to node-red.

That said I'll try to install it and see what happens.

I'm very new to Hubitat and wondered if anyone could give me a bit of direction on how to get this running.

I've taken this driver code -> https://raw.githubusercontent.com/Botched1/Hubitat/master/Drivers/Sony%20TV%20Lite/Sony%20TV%20Lite.groovy

I've uploaded that as a "New Driver" and then added a "Virtual Device" that is linked to the user-defined driver.

What do I have to do now? Do I need to specify an IP of the actual TV or how does this code know where my TV is?

A number of others in this thread have referred to Smart Things. I've never used smart Things. Do I need to integrate that somehow to get this working?

Here are my log files:

You need to specify the IP address of the TV. There are 4 fields to do this on the device page.
(you'll need to determine what your TV IP is)

IP address part 1: 192
IP address part 2: 168
IP address part 3: 1
IP address part 4: 47
Port: 80 (unless you changed it)
PSK:yourpasskey (found in your tv).

Then hit save preferences and see what the logs show.

I appreciate the reply and guidance @mike. I got a chance to try this tonight. I've replaced the values as directed and my code looks like this:

preferences {
	input name: "ipadd1", type: "number", range: "0..254", required: true, title: "192", displayDuringSetup: true
	input name: "ipadd2", type: "number", range: "0..254", required: true, title: "168", displayDuringSetup: true
	input name: "ipadd3", type: "number", range: "0..254", required: true, title: "2", displayDuringSetup: true
	input name: "ipadd4", type: "number", range: "0..254", required: true, title: "1", displayDuringSetup: true
	input name: "tv_port", type: "number", range: "0..9999", required: true, title: "80", displayDuringSetup: true
	input name: "tv_psk", type: "text", title: "PSK Passphrase Set on your TV", description: "sony", required: true, displayDuringSetup: true
	input "logEnable", "bool", title: "Enable debug logging", defaultValue: true		
}

}

I presume I've formatted something wrong as I'm getting the following error still.

Is the TV on the same subnet as the Hubitat?
has/does the tv have the option to turn on remote control (would be near the setting of the password). I cant remember if mine did or did not.

I'm not super familiar with the subnet issue. I've visited here: https://www.meridianoutpost.com/resources/etools/network/two-ips-on-same-network.php and this suggested they were. Of note, my Hubitat is connected via a switch (for additional LAN ports) and my TV is not. I'm not sure if that would make a different subnet.

The TV does have a remote control option and I have enabled it.

Thanks again for the guidance.

I've reconfirmed. The TV and Hubitat are directly connected to the same router. No switch in between. It's still not working. I just get the "Connection Refused" error message.

What is the Ip address of your hub? What is the IP address of your TV?

Once again, I appreciate the guidance.

TV:
image

Hubitat:
image

Current Code:

Right, but you don't change the IP address in the code, you enter it on the device details page... Changing the values of "title" in the code does nothing for you.

So what are the preferences in the device driver details page set to?

You know when you are being dumb? Like really, really dumb? A key feature of this is that you lack insight. You are being too stupid to ever figure out that you are being stupid.

Someone else needs to come along and make some simple statement that suddenly makes that lightbulb go off and then you appreciate how dumb your thinking truly was. That is what has occurred here...

The driver works as it should. All issues were my mistakes and lack of understanding. Thank you to those of you who have developed this. Thank you to those of you who gave advice.

3 Likes

No worries at all! And hopefully you didn't take my comments as condescending or trying to make you feel dumb (definitely was not intended that way)! :slight_smile:

And don't feel bad, I've probably done WAY dumber things than that.

Glad you got it working!!!

2 Likes

I have Sony X90J, and polling works fine though none of the commands are working.
I switched the pass key to a dummy - the polling still works. So I think the issue here is with the pass key or Sony changes.
I found that some remote android apps are requiring to uninstall updated from the Android TV remote service.
Regardless I didn't saw any pairing code on the TV - so I don't know what to enter on the PASS KEY field.

Ok, Got it.
(Just noticed that this was covered in the original post on ST :sweat_smile:)
To enable this on new tvs, you need to set a pre-shared key on your tv.
Go to: settings -> network -> home network -> ip control.
Set the Authentication to "Normal and Pre-Shared Key"
Then add a key in the Pre-Shared Key option below.
Enter the same key in the hubitat PSK field.