WebCore, Bravia, and Alexa?


#1

Not really a developer here, just a guy with an idea… and just enough semi-knowledge to be dangerous.

The Bravia ST smartapp works well to control a Bravia smart TV’s basic functionality.
The functions in that app are available to webcore.
It is possible to pass variables to webcore via endpoint.
It is possible to have Alexa hear numbers and translate those to variables.

So it would be possible to write an Alexa skill that hears you say “alexa, channel two fifteen”,
And that skill would send a string including 2 1 and 5, in that order, to a piston’s endpoint.
The endpoint for a piston can receive those and, based on it, send 2 1 5 to the Bravia.
Which then changes the channel on your cable box to 215 via the IR blaster included with the tv.

I’m imagining this because it’s now been three months since Sony released Alexa control of the 2017 sets and a handful of 2016 units… and they have done nothing since. And when you ask them about it, they say they have no ETA for any other sets. So who knows whether they will ever get around to your set or mine??

Anyway, we currently have the means to do it without Sony. I tested channel change and input change pistons, and they work well.

I’ll have to start exploring Alexa skill writing… along with passing variables to webcore.


#2

There is a url locates on the piston details page. And I believe you can pass variables into it by adding them to the end of that url. ?variableName=“your data”

I have yet to test this tho. But I hope this helps


#3

Yep, been using the feature with simple http get for a few weeks. But I think you have to be a bit more detailed, use json or something, when passing variables. In this instance, multiple variables will likely have to be passed at one time.


#4

I own an x900e (2017). What DHT are you using? SteveAbratt’s ?

Thanks!


#5

Yep. Channel up/down, volume up/down, channel numbers, and video source select all tested well in the pistons.

The variable strings that would need to be passed from Alexa:
$var1 $var2 $var3 $var4 $var5

Alexa would hear something like
"Alexa, Bravia up channel". ‘Bravia’ would be the skill invocation, “up channel” would put whatever variable you’ve assigned that function into $var1.
Likewise “up volume”, “down volume”, “down channel”.
But if it hears “channel three twenty four”, it needs to ignore the word “channel” and simply build the string $var1 = 3, $var2 = 2, $var3 = 4 and send that.

Inputs would likely have to be custom commands. I would not want to have to remember what input my appleTv is on, I would h]just want to say “alexa, Bravia input Apple TV” and have it select the appropriate hdmi input.


#6

Bravia has the following commands for channel:
num1( )
num2( )
num3( )
Etc.

Imagine “alexa, Bravia channel six forty four”.

Alexa then sends three variables.
Var1 = 6
Var2 = 4
Var3 = 4

Based on that, I want in webcore to send to the Bravia, in order,
num6( )
num4( )
num4( )

I’m not seeing a way to:
With Bravia
do
num&var1&( )

Is there a way to accomplish that?
Or am I gonna have to build a whole slew of if-thens?

Also I have tried, and failed, to leverage remotecommand. I know what the commands are; for example, the remote command string for 2 is "AAAAAQAAAAEAAAABAw=="
If I could get that to work, I could easily build a variable table. But I can’t get the thing to output correctly.


#7

Update: still failing at sending these commands via variable. I seem to have to select them from the device function list.

Is there something I’m missing?


#8

post a green snapshot?

what native commands are available under the device bravia in wC?