# New Sony Bravia TV integration for 2015 - 2016 alpha

**URL:** <https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357>\
**Category:** Community Created Drivers\
**Tags:** dth\_av\
**Created:** [November 23, 2016, 11:45pm UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357 "2016-11-23T23:45:39Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![bennetm3](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bennetm3](https://community.smartthings.com/u/bennetm3)\
**Post date:** [November 26, 2016, 12:46am UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/21 "2016-11-26T00:46:00Z")

</div>

> [@steve.bratt](#):
>
> I’ve updated the code with the latest proddings @bennetm3 should be happy as i added the pic off button

Thank you so much Steve. I will give it a test asap.

---

<div class="post-metadata">

**Author:** ![viguera](https://avatars.discourse-cdn.com/v4/letter/v/90db22/32.png) [@viguera](https://community.smartthings.com/u/viguera)\
**Post date:** [November 26, 2016, 5:17am UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/22 "2016-11-26T05:17:27Z")

</div>

> [@MikeDL](#):
>
> Edit: Never mind. That is for each section of the ip address.

Yeah that bit is sort of confusing…

It would probably make more sense to just ask for the IP address and call iphex() with the value. Right now ipaddress() is joining the octets with a period, then iphex() is tokenizing them and converting them before joining the whole thing.

Seems unnecessary, but maybe there’s a reason for it?

---

<div class="post-metadata">

**Author:** ![steve.bratt](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/steve.bratt/32/20541_2.png) [@steve.bratt](https://community.smartthings.com/u/steve.bratt)\
**Post date:** [November 26, 2016, 9:28am UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/23 "2016-11-26T09:28:33Z")

</div>

Well the main reason is the validation, the inputs are supposed to only accept numbers from 0-254 which should have made it more difficult to enter something wrong for those users not sure what they need to enter, I didn’t think it would let you enter an entire IP address in there not sure why there is a range field. Maybe I nered to set it as an integer so you can’t type a decimal point in. You probably wouldn’t have made the same mistake if it stopped you typing after 3 numbers. Also all 4 are required fields so again not sure why smartthings allowed you to leave the values blank

---

<div class="post-metadata">

**Author:** ![bennetm3](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bennetm3](https://community.smartthings.com/u/bennetm3)\
**Post date:** [November 26, 2016, 11:37am UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/24 "2016-11-26T11:37:52Z")

</div>

Picture Off is working perfectly for me - Thank you so much. 😄

---

<div class="post-metadata">

**Author:** ![steve.bratt](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/steve.bratt/32/20541_2.png) [@steve.bratt](https://community.smartthings.com/u/steve.bratt)\
**Post date:** [November 26, 2016, 3:46pm UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/25 "2016-11-26T15:46:01Z")

</div>

updated again, just working through all of the remote buttons

nothing particularly new, just lots more to press, ill try to make it look better if possible as i go

---

<div class="post-metadata">

**Author:** ![jamieyates79](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jamieyates79/32/28466_2.png) [@jamieyates79](https://community.smartthings.com/u/jamieyates79)\
**Post date:** [November 27, 2016, 12:00pm UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/26 "2016-11-27T12:00:06Z")

</div>

I just updated to the latest version of the device handler. Turning the TV on and off as part of routines (e.g. Good Morning!, I’m Back!, etc) is working well. It’s amazing to walk down the stairs in the morning and have the downstairs lights switch on (one lamp in the lounge and Hue Blooms in the kitchen and dining room) AND have the TV turn itself on!

Is the status working on other peoples TV’s? On my X8309C the status doesn’t seem to work at all?

---

<div class="post-metadata">

**Author:** ![steve.bratt](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/steve.bratt/32/20541_2.png) [@steve.bratt](https://community.smartthings.com/u/steve.bratt)\
**Post date:** [November 28, 2016, 9:54am UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/27 "2016-11-28T09:54:48Z")

</div>

I’m not sure if the “swtich tv off” is broken with the latest code.i dont seem to be able to turn my tv off via smart things at the moment. but ill have a dig into that when i get some time, it could just be me if ive made a change since last time i uploaded the code.

the status of the TV polls about every 5 mins its a smart things default i think, so the status should sync up after about 5 mins, if you turn it on or off via the remote control. unfortunately its not instant polling.

---

<div class="post-metadata">

**Author:** ![bennetm3](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bennetm3](https://community.smartthings.com/u/bennetm3)\
**Post date:** [November 28, 2016, 4:17pm UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/28 "2016-11-28T16:17:48Z")

</div>

On / Off still working fine for me from SmartThings and Alexa with the latest code.

I did notice you seem to have buttons for Guide and EPG.  
Are they the same thing ?

Apart from that all seems to be working fine.

---

<div class="post-metadata">

**Author:** ![Basejumper86](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@Basejumper86](https://community.smartthings.com/u/Basejumper86)\
**Post date:** [November 28, 2016, 10:39pm UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/29 "2016-11-28T22:39:13Z")

</div>

Hey Steve- First off thanks for the code here! Really nice to see someone get this done around here :).

I actually have a brand new Sony XBR75940D, and am able to use your code to turn off the TV along with multiple other buttons that seem to work just fine.

My only issue is, I am not able to turn on the TV. Once on, everything works, but when off, for some reason can not wake the TV up. Any thoughts on this here?

Thanks!

---

<div class="post-metadata">

**Author:** ![bane2000](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bane2000/32/33741_2.png) [@bane2000](https://community.smartthings.com/u/bane2000)\
**Post date:** [November 28, 2016, 11:05pm UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/30 "2016-11-28T23:05:04Z")

</div>

I have the same response as Basejumper86 when trying to turn on my Sony KDL50W805C.

Almost everything else works except WOL and turning on when on standby.

Thanks again for the script, your efforts are appreciated!

---

<div class="post-metadata">

**Author:** ![Basejumper86](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@Basejumper86](https://community.smartthings.com/u/Basejumper86)\
**Post date:** [November 28, 2016, 11:08pm UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/31 "2016-11-28T23:08:38Z")

</div>

Interestingly, to follow up, if you hit the Netflix button the TV does power on to Netflix. So its not a power/standby issue then I would think?

---

<div class="post-metadata">

**Author:** ![steve.bratt](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/steve.bratt/32/20541_2.png) [@steve.bratt](https://community.smartthings.com/u/steve.bratt)\
**Post date:** [November 29, 2016, 10:16am UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/32 "2016-11-29T10:16:32Z")

</div>

hmm interesting. Its possible they have changed the codes, or some of the other stuff is working differently. ill create a slightly different version of the code for you to test in the next few days so bear with me.I think ikk set an option in the settings to use remote codes instead of the current way i turn the tv on and off, for those who cant get that working.

were you able to set the network address successfully?

the buttons ive created are spat out by the TV itself as capabilities, so im just adding them all on (slowly), i have no idea what they do tbh. i actually dont use digital TV so ive not tested them

---

<div class="post-metadata">

**Author:** ![steve.bratt](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/steve.bratt/32/20541_2.png) [@steve.bratt](https://community.smartthings.com/u/steve.bratt)\
**Post date:** [November 29, 2016, 10:35am UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/33 "2016-11-29T10:35:30Z")

</div>

oh @Basejumper86 and @bane2000 I believe you have to turn WOL on in the network settings on your TV i forget exactly how the option is worded but it wouldn’t surprise me if Wake on Lan is disabled. However that would be separate to not being able to turn your tv on. anyway let me knock this code together and try to figure out why i cant turn my TV off anymore. and we can go from there

---

<div class="post-metadata">

**Author:** ![pmusselman](https://avatars.discourse-cdn.com/v4/letter/p/e19adc/32.png) [@pmusselman](https://community.smartthings.com/u/pmusselman)\
**Post date:** [November 29, 2016, 11:49pm UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/34 "2016-11-29T23:49:24Z")

</div>

Wow this is amazing. Please let me know how I can help or contribute. This adds a whole new experience to a smart home,

Here is what I noticed. I was not able to turn on my TV (XBR-55X850D 2016) via the smartapp. I should note that I do have a tivo and sonos. However, if I power on the TV via the remote I can use all the tiles as advertised (at least 85%). Really nice work!

---

<div class="post-metadata">

**Author:** ![steve.bratt](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/steve.bratt/32/20541_2.png) [@steve.bratt](https://community.smartthings.com/u/steve.bratt)\
**Post date:** [November 30, 2016, 8:52am UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/35 "2016-11-30T08:52:55Z")

</div>

I figured out my TV had just changed its IP address which is why it wasn’t working properly, so I’ve fixed the IP now. Interestingly the WOL packet still worked via Mac address which is why I could turn it on. I’ll try to have a bash with it tonight I have a feeling the remote codes may work for the new tv’s that are struggling if any of you with 2016 tv’s could test some code for me that would be great

---

<div class="post-metadata">

**Author:** ![MikeDL](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@MikeDL](https://community.smartthings.com/u/MikeDL)\
**Post date:** [November 30, 2016, 3:32pm UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/36 "2016-11-30T15:32:13Z")

</div>

I can’t get it working on a W800C. I have control working on home assistant so I think the pin is correct. I do not see any errors in the logs. Maybe port?

---

<div class="post-metadata">

**Author:** ![steve.bratt](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/steve.bratt/32/20541_2.png) [@steve.bratt](https://community.smartthings.com/u/steve.bratt)\
**Post date:** [November 30, 2016, 3:45pm UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/37 "2016-11-30T15:45:04Z")

</div>

hmm the w800c appears to be a full on android TV not sure if that makes a difference?

only thing i can suggest is go through the network settings and make sure control over ip or simple control over network or something to that effect is turned on and you have seen that the PSK security is turned on with a pin. unfortunatley the tv wont come back with an error to log, it will just not respond, not too helpful

---

<div class="post-metadata">

**Author:** ![steve.bratt](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/steve.bratt/32/20541_2.png) [@steve.bratt](https://community.smartthings.com/u/steve.bratt)\
**Post date:** [November 30, 2016, 4:46pm UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/38 "2016-11-30T16:46:53Z")

</div>

ok so this is a complicated one, but if one of you who has a TV that doesnt work on and off but the buttons work could follow the below instructions and post up the results, it could help get things working

Make sure you are on the same network as your tv via wifi or lan (as in dont do this at work if your tv is at home)

first using chrome install this extension [https://chrome.google.com/webstore/detail/rest-web-service-client/ecjfcmddigpdlehfhdnnnhfgihkmejin?utm\_source=gmail](https://chrome.google.com/webstore/detail/rest-web-service-client/ecjfcmddigpdlehfhdnnnhfgihkmejin?utm_source=gmail)

assuming that works look for the new icon in the extensions bar its 3 blue dots on a white background, click it, you should get a new tab open up with lots of different things on it

![](https://global.discourse-cdn.com/smartthings/original/3X/d/1/d15a73d647f50e8897298da3fc09634789d66bf6.png)

change the drop down to POST  
in the URL type [http://your](http://your) tv’s ip address/sony/system  
click accept at the top and click application/json  
click “add header” at the top and enter, X-Auth-PSK in the NAME field and the Psk passphrase you setup on your TV in the value field  
click the body tab  
in the empty white text box below the body tab paste the following text

“method”:“getMethodTypes”,“version”:“1.0”,“params”:[“1.0”],“id”:4694

click the “send” button at the top right.

click the response RAW tab and copy and paste all the text into a private message to me

if you get that far i may have other messages for you to try. this is from memory, so let me know via private message if it doesn’t work, when i get home later ill try it on my tv and let you know if what i posted is incorrect, please keep chatter about this to private messages so as not to clutter up or confuse this thread thanks.

assuming someone sends me some results ill get them to test a custom device type and hopefully get something that works for everyone

---

<div class="post-metadata">

**Author:** ![steve.bratt](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/steve.bratt/32/20541_2.png) [@steve.bratt](https://community.smartthings.com/u/steve.bratt)\
**Post date:** [November 30, 2016, 5:42pm UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/39 "2016-11-30T17:42:55Z")

</div>

additional, i have just updated the code again, I believe this has now fixed the Eco mode issue where the TV showed as on when it was in eco sleep.

so for those power conscious among you you can now enable eco mode and still have full on off compatibility with smart things. the boot process is slightly slower but you will save electricity. im not sure if you can adjust the length of time before going into full sleep but most people are unlikely to notice the wake up time difference especially in automations, for instance, if the TV on command triggers as you walk through the door, the TV is still likely to be on before you’ve taken your shoes off and sat on the sofa!

enjoy

---

<div class="post-metadata">

**Author:** ![jamieyates79](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jamieyates79/32/28466_2.png) [@jamieyates79](https://community.smartthings.com/u/jamieyates79)\
**Post date:** [December 1, 2016, 2:15pm UTC](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357/40 "2016-12-01T14:15:15Z")

</div>

@steve.bratt The latest version of the code has broken turning the TV on for me on my X8309C.

[Previous page](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357.md?page=1)

[Next page](https://community.smartthings.com/t/new-sony-bravia-tv-integration-for-2015-2016-alpha/64357.md?page=3)
