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!

2 Kommentare zu “Tasker, autovoice and sony bravia

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden /  Ändern )

Google Foto

Du kommentierst mit Deinem Google-Konto. Abmelden /  Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden /  Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden /  Ändern )

Verbinde mit %s