Ditto to all the above, and thank you for putting so much work into this. This is a great handler.
Using successfully on a Sony 2015 Bravia XBR 55x850c.
Ditto to all the above, and thank you for putting so much work into this. This is a great handler.
Using successfully on a Sony 2015 Bravia XBR 55x850c.
If anyone would mind helping me set this up, step by step⊠please let me know. I am getting no where and very frustrated. I have a XBR-49X700D.
Thanx
Jim
I can certainly try my best to help you jimâŠ
you need to follow the instructions on the first post as closly as possible, or your going to struggle
if you go through them can you let me know any parts of the instructions you get stuck on?
Ok, I created a device handler in smarthings dev but it doesnât do anything. When I search for new devices in smartthings, my tv does not show up. I think I am missing a step. Can you please email kc7ryd@yahoo.com with your replies. Thanks a ton for the help.
I created a CoRE piston to poll the TV status. Works like a charme
so you pasted the code into the IDE ?
lets check its correctly setup, log back into the smartthings dev environment on your computer where you pasted the code, and click âMy Device Handlersâ
look down the list and find sony bravia Tv, it should say Published next to it, if it isnt in the list or isnt published it wont work.
if it is in the list but not published click on it and it should take you to see the code you pasted. In the top corner, press the publish button, then the âfor meâ button
now on the website, click âmy devicesâ link, and in the top corner add new device. Give it a name like living room tv
you can set label to the same
you should be able to leave zigbee and network id empty
in the âtypeâ, scroll right to the bottom of the list, hopefully you will see âsony bravia TVâ
Version i think self published
select the location
select the hub
group can be empty
click create, now click on the link at the top âlive loggingâ, keep the live logging page open on your computer while you pick up your mobile phone
open the smart things app, and go to my home, hopefully sony tv will be listed, click on it, then press the settings cog button in the top right (if this doesnt open up automatically the first time which i think it might.
It will ask you to name your device again it may already have the name in it that you entered on the IDE i cant remember.
you can choose an icon, ive set mine to a TV icon
now this is where you enter the IP address of the TV, you should ideally have set the IP address on your tv to a static address so it doesnât change otherwise the app might stop working. but this is beyond the scope of this tutorial. The details of setting up the TV correctly are in the first post on this page.
enter the ip address into the app
for example (this wont be the same for your tv so make sure you find it) if your TV displays, IP Address 192.168.0.10
ip address part 1 will be: 192
part 2 will be: 168
part 3 will be: 0
part 4 will be: 10
the port number is usually 80 unless you change it on the tv
PSK passphrase you will have setup when doing the steps in the first post
make sure you have the IDE live logging page open on your computer when you click done on the phone app
you should see on your computer a line appear that looks something like this
Netid c0a80065:0050
copy the part that looks like: c0a80065:0050 with your computer mouse
still on the comuter click âmy devicesâ again, and click on sony TV
click the edit button at the bottom, and find the âDevice Network IDâ box
Paste in the code into that box and click update
that should be it
Let me know how you get on
Steve,
I am guessing at the port number (80). Is there any way for me to confirm that is what my router is using?
The basis is a very simple Basic piston
If
Trigger happens every n minutes
Then
Using TV
->Refresh
This will give you the current status of the TV. Works very very well.
I added some more conditions (motion sensor in the living room, only at home) whatever.
Based on the TV status radio, lights and other devices switch on and off.
Hopefully that helps
Got it!!! I am not even going to tell you the STUPID mistake I made.
Just in more questionâŠin smartthings when I look at the ârecentlyâ for SonyTV, it only show that it was turned on this morning⊠there are no other log entries even after I press selections in smarthingsâŠi.e. Off,on, volume,mute. Why?
Firstly thanks for adding and supporting the integration! I managed to get this to work on a 50W829B but Iâm right down at the start of the learning curve.
I did have the problem that I couldnât turn the TV back on with the power tile - only the WOL function. Now thereâs a good chance Iâm just using the wrong source version but the area I was looking at is:
def on() {
log.debug "Executing 'on'"
if (state.tv == "polling"){
WOLC()
def json = "{\"method\":\"setPowerStatus\",\"version\":\"1.0\",\"params\":[{\"status\":true}],\"id\":102}"
def result = sendJsonRpcCommand(json)
} else {
def json = "{\"method\":\"setPowerStatus\",\"version\":\"1.0\",\"params\":[{\"status\":true}],\"id\":102}"
def result = sendJsonRpcCommand(json)
}
}
I was wondering about a couple of things, one or both might have something to do with my problem.
a) Firstly it doesnât ever seem to get into the first part of the âifâ so I removed the âifâ completely so it always calls the WOLC() function.
b) The WOLC() returns - but not executes - a HubAction object and (as far as I can tell) this HubAction will only execute if passed on out to the calling environment.:
So Iâve ended up with something like:
def on() {
log.debug "Executing 'on'"
def result = WOLC()
def json = "{\"method\":\"setPowerStatus\",\"version\":\"1.0\",\"params\":[{\"status\":true}],\"id\":102}"
sendJsonRpcCommand(json)
return result
}
Something else - whereas on my TV remote âDigitalâ changes back to TV from an HDMI input - I canât get the Digital tile to work here?
Finally, I wanted to set a channel after switching on the TV. As digital() didnât work I used num1() in a call like this inside the on() method:
runIn (2,num1)
Now these 2014 Sonys are slow to respond to commands right after switch on, so although 2 seconds is enough from warm itâs not from cold - but this is obviously a problem due to the TV booting and not ST.
@jwsg ive been having trouble turning on my tv recently from standby, the wake on lan button works, but the âonâ button doesnât, (when in powersave sleep) im guessing youâre seeing the same issue as me. I think most dont have power save enabled so havenât seen the issue, you solution may just work. Ill have a proper look at it at some point.
@Kc7ryd no idea, maybe need to add something to the code to make it show up there. ill have a look into it next time i play with the code.
First and foremost, Thanks to @steve.bratt for coding this for us. Is there a way to make the âtilesâ titles in he app to read âApple TVâ âDVDâ instead of HDMI 1, HDMI 2? I tried to change the code lines that I thought would do this (I changed the one that referred to Label: HDMI 1), but I was unable to get the titles on the app tiles to change. I am sure this is an easy change to the code, but really donât know what code lines I need to changeâŠ
yes this should be simple, look for these lines of code
standardTile(âtv_sourceâ, âdevice.switchâ, inactiveLabel: false, height: 1, width: 1, decoration: âflatâ) {
state âdefaultâ, label:âSourceâ, action:âtv_sourceâ, icon:""
in the above example change Label:âsourceâ to Label:âWhatever you want it to display asâ
just make sure you save and publish after you make the change
Worked perfectly! Thanks for the detailed instructions!
I think i can use icons t5oo, but it would probably take me ages to find them all
icons would be nice. I did get the inputs renamed to APPLE TV, DVD, etc. I was tempted to change the size of the inputs to 2x2, but chickened out. I would really only do this if I had an icon to easily identify the most used buttons like inputs and channel up /down.
Very cool though. I dig it, but my wife thinks iâv gone nuts, ha ha ha!!!
Confirmed on 2016 X850D. Great work, sir!
Question: is there a way to put the Set Top Box option in? On the remote you press the Action Menu button, cursor over to the Menu drop down, then click Power (STB). If that could be automated, all would be awesome.
This works really well ! Congratulations ⊠also thanks for the detailed instructions to get it up and running.
I would like to add to the functionality so it can perform the following steps (I have 2016 Sony XBR65x850d)
Switch TV on
Open YouTube or Netflix
Search for an items (pre programmed)
Run that item
I this specific case I am thinking about one of the âscreensaverâ movies that shows a fish tank.
Does anyone know if the commands to execute this type of function exist and where I might find them ?
Thanks