Netflix search with Tasker and Autovoice on Sony Bravia television

Look at the video and you see what the program does.

Maybe you only need part 2, if you want more the function after you started Netflix without starting Netflix first.

You should first install the other parts in my former posts

http://www.wennes.de/vdr/sonynetflixsearch.tsk.xml
http://www.wennes.de/vdr/SONY_Netflix.txt
http://www.wennes.de/vdr/sonynetflix_voice.tsk.xml
http://www.wennes.de/vdr/tv_on.tsk.xml

The code is for testing purposes only and is not really well. It somehow evolved …

Tasker set and get volume from sony bravia

Screenshot_2016-08-13-23-30-37

It works! You can set and read the values of the volume of a Sony Bravia with Tasker.
Look at the pictures and download the XML files.

www.wennes.de/vdr/sony_screen.scn.xml

www.wennes.de/vdr/sonyvolume.tsk.xml

1) just get the volume from the television into %SONY_Volume
3) set %SONY_Volume and the tv to 50

Screenshot_2016-08-13-23-12-23

you need RESTask – just download this task

Screenshot_2016-08-14-00-01-52

This is all you need for setting the ruler in the scene – okay some funny voice also

Screenshot_2016-08-13-23-14-16

Set the values before displaying the scene

Screenshot_2016-08-14-00-14-27

Please give me feedback… positive and negative.

I want to improve.

 

 

Tasker, autovoice and sony bravia

when i asked Google for Tasker autovoice and Sony Bravia first hit was this site:

https://medium.com/@philw_/talking-to-your-sony-bravia-tv-over-http-with-google-now-tasker-xbmc-and-roku-7b71fe634966#.kwr2hipdh

It is a cool idea. But i want/need it fully handsfree. The main problem seems to be authentication with cookies.

So i searched for other possibilities.

I found a sweet shellscript. https://github.com/breunigs/bravia-auth-and-remote

 

The cookie was saved! But after 2 weeks it stopped working and a new one had to be created and saved. -uncool 😦

mysonyremote

The Html-Interface

I already built a additional .php script around it.
The Page on my Raspberry is used on the tabletts and smartphones.
It is also triggered by the autovoice-scripts via http-get.

On Fhem there is a bravia-addon which refreshes the cookie by itself. Good idea. It also shows and sets the volume. This still has to be investigated…[Update: it works…see new post]

Then this eye-opening link came up:

setting a preshared key –> https://www.domoticz.com/forum/viewtopic.php?t=8301
[Settings] → [Network] → [Home Network Setup] → [IP Control] → [Pre-Shared Key] → [sony]

It worked really phantastically with the script. The changes can also be found here.

But still the TV can not be controlled via tasker/autovoice directly.
The problem is: You cannot send header-fields (like the preshared key) with the builtin http-post-command.

But there is RESTask. With this additional free plugin you can send the needed headers!

Let´s go

I want to have a simple way to create the commands.
On this post from Ratchet_Guy he explains how to save and restore variables in tasker. Let´s copy & paste…

Import and start the following task:Screenshot_2016-08-08-17-35-50

http://www.wennes.de/vdr/getsonyvariables.tsk.xml

It will load the needed codes and stores them in variables.

You may delete it after running it.
I also offer a smaller list. Just enable command #4
http://www.wennes.de/vdr/SONY_IRCC.txt
http://www.wennes.de/vdr/SONY_IRCC_MINIMAL.txt

After that the sendsonycode-task has to be loaded and Parameters need to be put in.
Put in your Television IP.

Please connect Tv to Ethernet if you want to be able to wake it up with WOL later.

Screenshot_2016-08-08-17-56-30

http://www.wennes.de/vdr/sendsonycode.tsk.xml

The RESTask-part is not saved in this task. We have to put it in by hand (copy&paste).

Screenshot_2016-08-08-18-09-12

Screenshot_2016-08-08-18-09-33

http://%SONY_TV_IP/sony/IRCC

 

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<soap:Body>
<u:X_SendIRCC xmlns:u="urn:schemas-sony-com:service:IRCC:1">
<IRCCCode>%Mycode</IRCCCode>
</u:X_SendIRCC>
</soap:Body>
</soap:Envelope>

 

the needed Headers

3

"urn:schemas-sony-com:service:IRCC:1#X_SendIRCC"

Under X-Auth-PSK put in your previously defined Pre-Shared-Key.
My preshared key is sony

Ready for sending commands!

create new task „send_stop“

add „Perform Task“

Screenshot_2016-08-08-18-17-52

edit

Screenshot_2016-08-08-18-18-47

name    sendsonycode

parameter 1    %SONYIRCC_Stop

use the variable-select-icon an filter!

You only have to put in these 2 things.

Just one command!

 4

Return code: 200  –>  It works!

Now: a simple voice command:

Screenshot_2016-08-08-18-19-53

when i say „okay google   stop“, it sends the code…

 

Switch on – only wake-on-lan.

connect tv to Ethernet
(maybe okay a little bit late, new ip?)

install the WOL-Plugin. Just use your TV´s MAC and IP.

https://play.google.com/store/apps/details?id=com.benfinnigan.wol

Screenshot_2016-08-08-18-34-43

create task

Screenshot_2016-08-08-18-37-38

Start this task and look how your television is booting.

My television then takes about one minute to be able to accept commands from the network.
It also takes about five minutes to shut down completely. So, when I send a wake-up command in these five minutes it will be available almost instantly.

Create your own remote

Screenshot_2016-08-08-19-02-43

Screenshot_2016-08-08-19-03-01

Screenshot_2016-08-08-19-03-25

 No „ok google“? – use autovoice continuousScreenshot_2016-08-08-19-09-32

Screenshot_2016-08-08-19-10-38

Cool effect:

If you work with cec, you can control all the connected machines with these commands through your sony!