alanreid / bravia Goto Github PK
View Code? Open in Web Editor NEWControl your Sony Bravia TV using nodejs
Control your Sony Bravia TV using nodejs
This is the higher-level HTTP control.
No need to enable "simple IP control" on the TV - works without (e.g a Bravia 2015 KDL40W-705)
As far as the TV is concerned "Simple IP control" is per Sony doc "Sony Simple IP Control Protocol for BRAVIA" - "The protocol has 24 bytes fixed-size data format.." It's just firing packets, control and status reporting. Doc claims all the lower level functions are available in the HTTP version, unclear how the notifies would work though.
Found more details here - this is the pro stuff, but consumer appears similar if not identical.
https://pro-bravia.sony.net/develop/integrate/ip-control/
Readme refers to a demo.js but I don't see one in the repo
Hi, would it be possible to have access to cam? Cam was only supported by Skype APP, but this is not supported any more. So I'm thinking about to use the cam for Smarthome stuff...
I've got a Bravia UhD and this code pairs ok with it - but when it tries to send a command, I just get a flash on sony logo / on screen but no effect.
I also extended the makeCommandRequest with a response function but all I see coming back is a blank response.
Any suggestions?
Every time i run the demo it keeps asking for a password. I already tried to empty cookies.json, but that didn't help.
Tested your updates but i get:
ReferenceError: that is not defined
at updateCookieJar (/home/pi/bravia/lib/index.js:242:3)
at /home/pi/bravia/lib/index.js:188:9
at /home/pi/bravia/lib/index.js:161:7
at Request._callback (/home/pi/bravia/lib/index.js:225:7)
at Request.self.callback (/home/pi/bravia/node_modules/request/request.js:200:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (/home/pi/bravia/node_modules/request/request.js:1067:10)
at emitOne (events.js:82:20)
at Request.emit (events.js:169:7)
Looking at the code, the examples are completely wrong, no?
You have implemented ES6 style classes with a static discover() method, though it looks like you can new Bravia() with a known IP and it works.
The new ES6 way seems much more elegant.
Hi,
I was wondering if it will be possibile to integrate your code with homebridge(https://github.com/nfarina/homebridge) as an accessory or plugin.
Do you have any hint in this case?
Anycase tonight I'll try to take a look to get it work, so I can give command to my bravia through Siri.
hey,
how can I start a movie directly in netflix?
best regards
Elias Bennour
Hi Alan,
An error is happening =
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the socketwatcher package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls socketwatcher
npm ERR! There is likely additional logging output above.```
Node Version v4.1.2
I could't run npm install
.
Show message:
yuan@Yuan-MacBook-Pro sony/bravia (master) » npm install
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] license should be a valid SPDX license expression
> [email protected] install /Users/yuan/Desktop/sony/bravia/node_modules/arpjs/node_modules/pcap/node_modules/socketwatcher
> node-gyp rebuild
CXX(target) Release/obj.target/socketwatcher/socket_watcher.o
In file included from ../socket_watcher.cpp:5:
In file included from ../socket_watcher.hpp:8:
In file included from ../node_modules/nan/nan.h:80:
In file included from ../node_modules/nan/nan_new.h:190:
../node_modules/nan/nan_implementation_12_inl.h:181:66: error: too many
arguments to function call, expected at most 2, have 4
return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~
/Users/yuan/.node-gyp/2.2.1/deps/v8/include/v8.h:4188:3: note: 'New' declared
here
static Local<Signature> New(
^
1 error generated.
make: *** [Release/obj.target/socketwatcher/socket_watcher.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:199:12)
gyp ERR! System Darwin 14.4.0
gyp ERR! command "/usr/local/bin/iojs" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/yuan/Desktop/sony/bravia/node_modules/arpjs/node_modules/pcap/node_modules/socketwatcher
gyp ERR! node -v v2.2.1
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
> [email protected] preinstall /Users/yuan/Desktop/sony/bravia/node_modules/arpjs/node_modules/getmac/node_modules/extract-opts/node_modules/typechecker
> node ./cyclic.js
npm ERR! Darwin 14.4.0
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "install"
npm ERR! node v2.2.1
npm ERR! npm v2.11.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the socketwatcher package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls socketwatcher
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/yuan/Desktop/sony/bravia/npm-debug.log
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.