Hi ive created a new Device Handler for Sony Bravia Tv’s i’ve obviously been testing with mine which is a 2015 55 inch and all functions work well so far.
You will need to set up your tv on the network via lan or wifi and turn your tv’s security to PSK, ive tested with a passphrase of 1111 but you should be able to use whatever passphrase the TV allows.
Enable remote start on your TV: [Settings] → [Network] → [Home Network Setup] → [Remote Start] → [On]
Enable pre-shared key on your TV: [Settings] → [Network] → [Home Network Setup] → [IP Control] → [Authentication] → [Normal and Pre-Shared Key]
Set pre-shared key on your TV: [Settings] → [Network] → [Home Network Setup] → [IP Control] → [Pre-Shared Key] → [sony]
Give your TV a static IP address, or make a DHCP reservation for a specific IP address in your router.
Note: Within the Device on the SmartThings IDE the Device Network ID for Device instance must be hex of IP address and port in the form of 00000000:0000 (i.e. 10.0.1.220:80 is 0A0001DC:0050) - if you check the logs the smart device will log the correct address that you can copy paste, once the IP address has been set. If this is not set you wont get updated on/off status. Apparently you can get the Device handler to set it but ive not been able to properly test this yet.
the interface is basic and ive only added a few buttons from the remote, but over time I’ll try to add more
unfortunately there isn’t much in the way of feedback from the tv with the exception of the on or off status so the app works more like a remote than something we can read status from.
I would be interested in hearing some ideas about uses for the device handler however, as in smart apps for TV set up etc. My aim was to be able.to setup some sequences perhaps on a virtual button, for instance a Netflix scene button could in theory wake the TV from standby switch to Netflix and lower the lighting, or you might be able.to have an Xbox scene using one of the HDMI inputs. Not sure how all that would work perhaps a smart app would have to be put together. But maybe I’ll try that another time.
I forgot to mention if your going to have a go with this, can you let me know how you get on setting it up and if it works which model sony TV your using and how old it is,
Im wondering now also if the remote codes will work with CEC and if so i may be able to combine more remote codes from other devices such as surround sound amps and blueray players into the remote i have sony versions of both those things so i should be able to test it although mine are quite a bit older than this tv is
A further note, there is a small bug currently that sometimes shows the TV as on if it’s gone into eco sleep mode as the TV doesn’t respond to any polls for status in eco sleep. My intention is to somehow test for this in future and if the TV isn’t responding at all, ST should send a WOL packet and a turn on command from the normal on button instead of having a separate Wake on LAN button. However for this simple release I’ve not had time to look into that yet. You may want to turn eco sleep off while using this but I do intend to at least try to support it as best I can in future.
Great work, thanks Steve. Just got it working on my 2015 Bravia KDL-50W805C. Everything seems to work fine, not tried WOL. Setup was relatively straightforward once I’d found the TV’s IP address and converted it into hex.
Great news thanks everyone for getting back to me @bennetm3 is correct on the psk front I’ll edit the top post shorty with the full instructions there. Won’t have chance to work on this tonight but perhaps tomorrow I’ll bash about with it and get a few more buttons on there. Are you guys hoping all buttons will be available or are you after some specific functions? I was hoping I’d be able to control more of the buttons from smart apps but at the moment I can’t use any except the off and on one
For me the most useful function would be ‘Picture Off’ that appears under the Action Menu. I know that seems strange, but I use the speakers connected to the TV when watching on my projector and just turn off the screen.
Nice work on the Device Handler code. I have been working on/using something similar but just switched to yours.
My TV is a KDL65W850C
The one problem I have is that when using the json commands for turning the TV on and off, the LED below my TV screen blinks green and then red when trying to turn the TV back on.
It could just be my own TV, I have had to replace the main board once already.
But to get around this I updated the on and off commands to use the “TV Power” option instead. This mimics the behavior of my remote, and even though I’m just putting the TV in standby, I am no longer having the blinking LED issue.
have had a small bash around this afternoon. no major changes just trying some things out. I think ive solved the eco mode issue now however. so if your TV has gone into eco sleep. when you press the “on” button the the TV will send a wake on lan packet instead of a standby on packet. however if your tv is in standbye it will send a standby on packet instead, which should remove the need for us to have a wake on lan button and hopefully allow you to keep Eco mode turned on on your TV’s, turn on time is slightly slower but power saving may be much better. Still not yet to solved the TV thinking its on. when its in eco sleep but still bits to do @tinfranca unfortunately i couldn’t get the remote codes for power on and standby to work previously with my tv, but ill have another go later and report back