Node.js module for controlling Sony BRAVIA TV running Android TV
https://github.com/jtai/node-bravia-androidtv.git
node-bravia-androidtv =====================
Node.js module for controlling Sony BRAVIA Android TV (tested with KDL65W850C)
The code is inspired by alanreid/bravia and borrows structure from ttu/node-yamaha-avr. Support for additional status commands inspired by aparraga/braviarc and breunigs/bravia-auth-and-remote.
Note that this model does not support Wake-On-LAN for power on, you send it a
WakeUP command over HTTP instead. Thanks to Michael Tout on this
openremote.org thread
for the hint. You must turn on "Remote Start" on the TV for this to work.
Authentication
node auth.js
From then on the authentication cookie handling is done for you.
Status
node status.js
The result should be active or standby.
Query the playing content info by running
node status.js playing
The result should be something like
{ uri: 'extInput:hdmi?port=4',
source: 'extInput:hdmi',
title: 'HDMI 4/ARC' }
Query the current volume info by running
node status.js volume
The result should be something like
{ target: 'speaker',
volume: 5,
mute: false,
maxVolume: 100,
minVolume: 0 }
Commands
node command.js
To send a command (e.g., PowerOff), run
node command.js PowerOff