RobDYI
December 19, 2017, 5:03am
1
I got this to work from my mac so it can be integrate into HA to control my Sony TV. I wanted more control than the bravia component. It is really easy to setup, I changed my sony TV passcode to 0000 and set it to ip control.
for Netflix
$ ./send_command.sh 192.168.2.112 AAAAAgAAABoAAAB8Aw==
List of command
ActionMenu
Analog
Analog2
AnalogRgb1
AndroidMenu
Assists
Audio
AudioMixDown
AudioMixUp
Blue
BS
BSCS
ChannelDown
ChannelUp
ClosedCaption
Component1
Component2
Confirm
CS
CursorDown
CursorLeft
CursorRight
CursorUp
Ddata
DemoMode
DemoSurround
Digital
DigitalToggle
Display
DOT
Down
DpadCenter
DUX
Enter
EPG
Exit
FeaturedApp
FeaturedAppVOD
FlashMinus
FlashPlus
FootballMode
Forward
GGuide
GooglePlay
Green
Hdmi1
Hdmi2
Hdmi3
Hdmi4
Help
Home
iManual
Input
Jump
Left
Media
MediaAudioTrack
Mode3D
Mute
Netflix
Next
Num0
Num1
Num11
Num12
Num2
Num3
Num4
Num5
Num6
Num7
Num8
Num9
OneTouchTimeRec
OneTouchView
Options
PAP
Pause
PhotoFrame
PicOff
PictureMode
PictureOff
Play
PopUpMenu
PowerOff
Prev
Rec
Red
Return
Rewind
Right
ShopRemoteControlForcedDynamic
Sleep
SleepTimer
Stop
SubTitle
SyncMenu
Teletext
TenKey
TopMenu
Tv_Radio
Tv
TvAnalog
TvAntennaCable
TvInput
TvPower
TvSatellite
Up
Video1
Video2
VolumeDown
VolumeUp
WakeUp
Wide
WirelessSubwoofer
Yellow
3 Likes
RobDYI
January 14, 2018, 8:44pm
2
A full list of command for my bravia.
num1: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAAAw==β
num2: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAABAw==β
num3: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAACAw==β
num4: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAADAw==β
num5: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAEAw==β
num6: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAFAw==β
num7: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAGAw==β
num8: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAHAw==β
num9: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAIAw==β
num0: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAJAw==β
num11: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAKAw==β
num12: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAALAw==β
enter: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAALAw==β
gguide: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAOAw==β
channelup: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAQAw==β
channeldown: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAARAw==β
volumeup: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAASAw==β
volumedown: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAATAw==β
mute: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAUAw==β
tvpower: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAVAw==β
audio: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAXAw==β
nediaaudiotrack: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAXAw==β
tv2: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAkAw==β
input: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAlAw==β
tvinput: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAlAw==β
tvantennacable: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAqAw==β
wakeup: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAuAw==β
poweroff: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAvAw==β
sleep: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAvAw==β
right: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAAzAw==β
left: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAA0Aw==β
sleeptimer: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAA2Aw==β
analog2: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAA4Aw==β
tvanalog: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAA4Aw==β
display: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAA6Aw==β
jump: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAA7Aw==β
oicoff: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAA+Aw==β
oictureoff: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAA+Aw==β
teletext: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAA/Aw==β
video1: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAABAAw==β
video2: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAABBAw==β
analogrgb1: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAABDAw==β
home: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAABgAw==β
exit: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAABjAw==β
picturmode: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAABkAw==β
confirm: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAABlAw==β
up: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAB0Aw==β
down: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAQAAAAEAAAB1Aw==β
closedcaption: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAKQAAAAQAw==β
component1: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAKQAAAA2Aw==β
component2: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAKQAAAA3Aw==β
eide: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAKQAAAA9Aw==β
rpg: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAKQAAABbAw==β
oap: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAKQAAAB3Aw==β
tenkey: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAMAw==β
bscs: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAQAw==β
ddata: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAVAw==β
stop: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAYAw==β
pause: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAZAw==β
play: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAaAw==β
rewind: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAbAw==β
forward: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAcAw==β
dot: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAdAw==β
rec: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAgAw==β
return: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAjAw==β
blue: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAkAw==β
red: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAlAw==β
green: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAmAw==β
yellow: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAnAw==β
subtitle: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAoAw==β
cs: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAArAw==β
bs: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAsAw==β
digital: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAAyAw==β
options: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAA2Aw==β
media: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAA4Aw==β
prev: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAA8Aw==β
next: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAA9Aw==β
dpadcenter: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAABKAw==β
cursorup: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAABPAw==β
cursordown: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAABQAw==β
cursorleft: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAABNAw==β
cursorright: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAABOAw==β
shopremotecontrolforceddynamic: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAABqAw==β
flashplus: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAB4Aw==β
flashminus: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAB5Aw==β
demomode: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAJcAAAB8Aw==β
analog: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAHcAAAANAw==β
mode3d: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAHcAAABNAw==β
digitaltoggle: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAHcAAABSAw==β
demosurround: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAHcAAAB7Aw==β
ad: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAAA7Aw==β
audiomixup: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAAA8Aw==β
audiomixdown: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAAA9Aw==β
photoframe: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAABVAw==β
tv_radio: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAABXAw==β
syncmenu: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAABYAw==β
hdmi1: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAABaAw==β
hdmi2: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAABbAw==β
hdmi3: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAABcAw==β
hdmi4: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAABdAw==β
topmenu: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAABgAw==β
popupmenu: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAABhAw==β
onetouchtimerec: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAABkAw==β
onetouchview: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAABlAw==β
dux: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAABzAw==β
footballmode: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAAB2Aw==β
imanual: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAAB7Aw==β
netflix: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAABoAAAB8Aw==β
assists: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAMQAAAA7Aw==β
featuredapp: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAMQAAABEAw==β
featuredappvod: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAMQAAABFAw==β
googleplay: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAMQAAABGAw==β
actionmenu: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAMQAAABLAw==β
help: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAMQAAABNAw==β
tvsatellite: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAMQAAABOAw==β
airelesssubwoofer: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAMQAAAB+Aw==β
androidmenu: β/Users/user/bravia/./send_command.sh 192.168.2.112 AAAAAgAAAMQAAABPAw==β
1 Like
Gabber
(Ivan Gabriel)
February 20, 2018, 10:35pm
3
Dear, I have installed the original component for the sony bravia tv. I configured it fine. The tv shuts on and off with alexa voice commands. I want also control other things, like turning on netflix, but I donβt know how to do this. Where do I have to put all this command lines? I am New with home assistant, so forgive me for asking maybe stupid questions. Thank you in advance!
RobDYI
February 20, 2018, 10:39pm
4
For you to do this, you need to have access to the command line of where Home Assistant is installed. I have a mac where i downloaded the program above and can simply run the program called send_command.sh like this
./send_command.sh 192.168.2.112 AAAAAgAAABoAAAB8Aw==
Are you on a Raspberry PI and how did you install?
Gabber
(Ivan Gabriel)
February 21, 2018, 7:39am
5
Hello RobDYI, Thank you for the Quick reply! I have installed home assistant on a Raspberry Pi indeed. Greetings and Thank you for helping me!
frank451
(aaron)
February 21, 2018, 9:02am
6
Hi
I have two older model Sony Bravia TVs with network port, however theyβre not compatible with the bravia component - from memory there is no where to put the PSK in the TV etc.
Would this command option work with the the older models?
Thanks
RobDYI
February 21, 2018, 6:16pm
7
To install and try you need to ssh into your Pi, probably the same way you installed HA.
These are the command to type, you need to setup your TV as below.
git clone https://github.com/breunigs/bravia-auth-and-remote
cd bravia-auth-and-remote
./send_command.sh 192.168.2.112 AAAAAgAAABoAAAB8Aw==
Setup TV
You need to set your TV to use a pre-shared key.
Navigate to: [Settings] β [Network] β [Home Network Setup] β [IP Control]
Set [Authentication] to [Normal and Pre-Shared Key]
There should be a new menu entry [Pre-Shared Key]. Set it to 0000. If you choose
anything else, you need to change the PSK in the send_command.sh script.
Gabber
(Ivan Gabriel)
February 21, 2018, 7:37pm
8
Hey RobDYI, I feel stupid right now. Sorry :-). I installed home assistant with this video https://youtu.be/c2IUIUnxjUY . So I am not sure what you mean by ssh. Is there a video or some thing that shows me the way? Thanks a lot! Greetings
RobDYI
February 21, 2018, 7:53pm
9
I donβt think you can install this program on your installation. I think you have hass.io installed which I donβt.
Iβm on hass.io with a 2013 bravia and I send commands like this (option button on the remote)
shell_command:
sony_options: |-
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:X_SendIRCC xmlns:u="urn:schemas-sony-com:service:IRCC:1"><IRCCCode>AAAAAgAAAJcAAAA2Aw==</IRCCCode></u:X_SendIRCC></s:Body></s:Envelope>' http://10.0.1.4/sony/IRCC?
Hi @RobDYI , do you know how to install this script when running HA in a Docker container? Is this still the easiest way for full IP control over the Sony Bravia? Thanks for the help.
RobDYI
October 27, 2018, 5:24pm
12
You can google for ip control bravia and their are several different github project that you can try. I would suggest using this custom components as it added some basis ip control like on and netflix but not all. I really only needed the numbers in ip control so I can program changing channels.
I found your script yesterday and I thought I would give it a try. While it was working, I now suddenly had this error coming up:
./send_command.sh 192.168.1.6 aaaaaqaaaaeaaabgaw==
Command failed (HTTP_CODE: 500, try running it in a console)
And I am running it in a console
RobDYI
November 22, 2018, 3:42pm
14
Perhaps your TV ip address changed. I set mine as static.
Mine is static too⦠And can also ping it.
Ali_Kiaie
(Ali Kiaie)
April 14, 2019, 3:06pm
16
is there an instruction for hassio? those run this run that are aliens to me
or maybe can share their configs and scrips for me.
RobDYI
April 14, 2019, 3:51pm
17
I would try this if it fits your needs.
Edit: this component is available in the default HACS repository.
More info here -> https://github.com/custom-components/media_player.braviatv_psk .
Please install the component from there and donβt use the outdated instructions from the post below.
Using Home Assistant for some weeks now and it works great
I have a Sony Bravia TV and I have used the braviatv platform, but that was not working very well for me.
After some days the state card wasnβt updating anymore and I got a lβ¦
Ali_Kiaie
(Ali Kiaie)
April 14, 2019, 5:39pm
18
thanks. I want to make use of the shell commands. but I am not sure how to find the path of where config folder is on hassio
Ali_Kiaie
(Ali Kiaie)
April 16, 2019, 6:07am
19
Hi, can you explain this for me? I have a sony android tv and try to get this to work
RobDYI
April 18, 2019, 4:11pm
20
I donβt use hass.io but I think its fairly tied down so you might no be able to run shell commands on the same machine as the hass.io .
You can try another computer on the network like here.
Apologies for thread revival. These instructions:
login into your hass.io pi
ssh root@[HASSIO IP]
create the folder
mkdir /config/.ssh
create key
ssh-keygen
tell it to store it in
/config/.ssh/id_rsa
The default location for storing this key with Hass.io seems to be /root/.ssh instead of /config/.ssh. My keys stay there after reboot and seem to work - is there a reason youβve put this in your /config directory?