breunigs / bravia-auth-and-remote

Shell snippets to auth and send remote control commands to Sony Bravia TVs
ISC License
249 stars 50 forks source link

Add send_name.sh script to wrap send_command.sh #19

Closed tensiondriven closed 1 year ago

tensiondriven commented 1 year ago

This PR adds a script called send_name.sh which wraps the existing scripts with the goal of making the repo a little easier to use. It uses environment variables for configuration and executes a sequence of commands (or a single command) with a short delay between each. It also has a decent amount of Usage/Help text to hopefully allow new users to get started quickly.

Demo run:

 % BRAVIA_IP=10.1.1.83 BRAVIA_PSK=0000 ./send_name.sh     
The following commands are available:

Num1                Media
Num2                Prev
Num3                Next
Num4                DpadCenter
Num5                CursorUp
Num6                CursorDown
Num7                CursorLeft
Num8                CursorRight
Num9                ShopRemoteControlForcedDynamic
Num0                FlashPlus
Num11               FlashMinus
Num12               DemoMode
Enter               Analog
GGuide              Mode3D
ChannelUp           DigitalToggle
ChannelDown         DemoSurround
VolumeUp            *AD
VolumeDown          AudioMixUp
...

Run a command with './send_name.sh COMMAND'.
j@lounge ~/Code/bravia-auth-and-remote
 % BRAVIA_IP=10.1.1.83 BRAVIA_PSK=0000 ./send_name.sh TvPower
  /home/j/Code/bravia-auth-and-remote/send_command.sh 0000 10.1.1.83 AAAAAQAAAAEAAAAVAw==
✓