when i asked Google for Tasker autovoice and Sony Bravia first hit was this site:
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 😦
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!
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:
It will load the needed codes and stores them in variables.
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.
The RESTask-part is not saved in this task. We have to put it in by hand (copy&paste).
<?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
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“
parameter 1 %SONYIRCC_Stop
use the variable-select-icon an filter!
You only have to put in these 2 things.
Just one command!
Return code: 200 –> It works!
Now: a simple voice command:
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.
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
No „ok google“? – use autovoice continuous