you may be able to set something like that up using CORE but im not 100% sure.
On my X850D, the POST looks like this to bring up YouTube:
POST: http://192.168.x.x/sony/appControl
Header name: X-Auth-PSK
Header data: sony
Header name: SOAPAction
Header data: âurn:schemas-sony-com:service:IRCC:1#X_SendIRCCâ
Data: {âmethodâ:âsetActiveAppâ,âparamsâ:[{âuriâ:âcom.sony.dtv.com.google.android.youtube.tv.com.google.android.apps.youtube.tv.activity.TvGuideActivityâ}],âidâ:10, âversionâ:â1.0â}
Iâve not yet figured out where (if itâs even possible) to insert the specs of the item you want to watch. But Iâm playing with it, and if I get it Iâll let you know
Ok, Iâve not yet built any devices or handlers or smartapps (I tend to work in Tasker as thatâs where Iâm comfortable). But I have an idea.
Right now, from an Alexa standpoint you can only turn the ST Bravia device on and off.
However, youâll notice that if in the ST Bravia device you tap the Netflix square while the tv is off, it will power up and take you directly to Netflix.
Sooo⌠why not have a âsubsetâ device in ST? Why not have a device called Netflix, and all you do with it is turn it on? I know in ST thatâs a bit silly when you already have the square available. But from an Alexa perspective, ST devices turn on/off rather than needing to be triggered via IFTTT. So instead of saying âAlexa, trigger Netflixâ and it having to make the AutoRemote call to Tasker, you would say âAlexa, turn on Netflixâ and it would instantly turn that on thru ST just as it instantly turns on my corner lamp smart bulb thru ST.
So my question: would I simply write a device that relies on the handler Steve wrote, but trims down the device functionality? Or would it also require a new handler?
the problem i think you will have is (and i dont know this as fact) i dont think you can have two devices pointing to the same IP address. so you could build a device handler that just turns the tv on to netflix, but you couldnt then use the standard one
well you may be able to work around that if you have both lan and wifi as the tv would have two ip addresses. but its a bit of a hack.
if i had time i could possibly develop the device handler to switch to one of a few imports depending on selection in the options. but im not sure i m going to be able to find time to create that any time soon.
Iâm gonna test it. Iâm taking the example you used as your starting point, deleting all functionality except the âonâ function, and assigning three things: HDMI4, COMPONENT1, NETFLIX. Each will get its own device handler. There will be no polling or status; I can determine easily enough whatâs running by looking at the screen. Each will access the same wired Ethernet port IP address. My thought is that if the device handler is merely sending a single command to an IP address, why would there be any system conflict with another handler that sends a different command to that IP address?
Iâll find out if that approach is flawed soon enough Iâm expecting to look at it this coming weekend. If it works, Iâll expand testing to various apps such as YouTube.
Thereâs no reason this wont work. You canât have two devices with the same IP address. You can access that device from as many applications as you like.
Mike, the unrepentant Windows 10 on mobile speaker upper and self appointed spokes person for all.
I ran short on time this weekend, so I did these in Tasker using IFTTT. So instead of saying âAlexa, turn on YouTubeâ I say âAlexa, trigger YouTubeâ. The commands I did are
YouTube
Netflix
Cable (powers on cable box)
Program guide
Amazon video
TV (switches to cable)
Photo sharing
Crackle
Cable box power
Hockey
Browser
Center channel (Enhances dialog if needed)
The benefit of doing it in Tasker rather than ST: Each command also force-switches to the appropriate input and mode on the Denon AVR. The âHockeyâ command does all the following:
Switches on the TV, if not ready on
Turns on the Denon, if not already on
turns on the cable box, if not already on
Turns cable box to NBCSN
Sets speaker levels as follows:
- center channel -12
- L,R, and all surrounds at +9 or above.
This eliminates theTV announcers, so I can enjoy the game as if I am in the arena.
As for YouTube, it seems that Intents are not yet handled well by the AndroidTV app. So I canât create a command that says âAlexa, trigger Waterfallâ and have it automatically play a waterfall video that I specify in the command. Hopefully they make that functionality available in the future.
I could also make these respond to notifications and calendar events. So I could hypothetically set up something that notifies me any time an NHL game will be shown on NBCSN. And then if Iâm home (checks the ST presence sensor, and/or other conditions via sharptools), automatically runs the Hockey command!
Hi there !
First of all thanks for your great script !
I didnât have any issue set it all up.
However I could control my 1 out of 5 times the TV (W705C) was answering to all the control.
Turn On, OFF, switching HDMI etc was fine but all of a sudden only WOL is working.
Do you guys have any idea whatâs going on ?
Regards
Did you give your TV a static IP address?
Yes I did.
Sorry, in this case I have no clue⌠.
I reinstalled everything this evening, and now everything seems to work !
Glen_King,
Thatâs awesome that you were able to figure out how to launch so many different apps! Would you mind sharing how you figured out what should go in there? I have the YouTube code working, but Iâm also interesting in launching Plex, Amazon, HBO Go, Showtime Anytime, Playstation Vue, etc⌠Iâve scoured the internet but canât find anything. Yours is the only successful post Iâve seen on the subject.
Do you mind sharing the the body of the post for those apps you got to work?
This the YouTube code Iâm talking about that I have working with my setup⌠just not sure how to duplicate this for other appsâŚ
{"method":"setActiveApp","params":[{"uri":"com.sony.dtv.com.google.android.youtube.tv.com.google.android.apps.youtube.tv.activity.TvGuideActivity"}],"id":10, "version":"1.0"}
The first component is:
{âmethodâ:âsetActiveAppâ,âparamsâ:
From there, hereâs Amazon video:
[{âuriâ:âcom.sony.dtv.com.amazon.aiv.eu.com.amazon.ignition.IgnitionActivityâ}],âidâ:10, âversionâ:â1.0â}
Crackle:
âuriâ:âcom.sony.dtv.com.crackle.androidtv.com.crackle.androidtv.CrackleBootActivityâ
Etc. To get the ones that exist on your own Bravia:
http://192.168.xxx.xxx/sony/system
SOAPAction: âurn:schemas-sony-com:service:IRCC:1#X_SendIRCCâ
{âmethodâ:âgetApplicationListâ,âparamsâ:,âidâ:10, âversionâ:â1.0â}
To do something like my âHockeyâ command you have to combine a number of separate commands including cursor and number controls. Thereâs a way to send text strings to the Bravia, but Iâve not gotten it to work yet.
Btw, Joao got Autocast working so that you can use Tasker to cast from an android device, and the Bravia will start playing it. So now I say âalexa, trigger _________â and the vid starts automatically on the Bravia. So far I have 4K youtube vids of aquarium, fireplace, garden, and other things. Itâs waaaay cool.
The only challenge I really have outstanding at this time is that I havenât yet found a way to determine whether the cable box is on or not. It is plugged into the Denon, and the video passes through to the Bravia (the audio is far superior that way, with no loss of image quality). The Denon reports neither whether something connected to it is on, nor toe status of the video or audio input. And I canât find a way to query the Bravia on this. I would even hook up a USB cable between the cable box and the Bravia, if I could find a way to query the Braviaâs USB ports for live connections.
I have a Sony 940d. It works like a charm. The only problem I have is that itâs not polling the TV. If I turn it on with the remote, it doesnât change to on within the app. Is there anything special I need to do for that? Thanks for the great work!
You can setup a very simple CoRE piston to poll the TV and sync the status. Works like a charmer.
Do you mind elaborating?
Iâve tried creating a core rule to both poll and refresh (the two commands I would think are related to this), but just doing that does not update the TV status.
Hereâs what the TV handler log shows:
9:45:47 PM: debug Executing âpollâ
9:45:47 PM: debug poll count 12
9:45:47 PM: debug Executing ârefreshâ
9:45:47 PM: debug Executing âpollâ
9:45:47 PM: debug poll count 11
Thanks!
nm. the hex for my device ID was wrong⌠my TV ip changed and Iâve only updated the preferences
Thanks!