Permalink
Browse files

Small tweaks for Roku. Put font-awesome-min back to be close to defau…

…lt (have to remove suffix after file extension, thats it). Still showing problems in FF - not sure why. Add in -ONOFF suffix for panasonic, as its on each command anyway. Still need to test Panasonic - added header info from andresns gist.
  • Loading branch information...
1 parent b1ce553 commit f6c5f202945e453a1a80a92d979e5db43253b502 @imbrianj committed Dec 29, 2013
Showing with 21 additions and 405 deletions.
  1. +9 −2 controllers/panasonicController.js
  2. +8 −8 controllers/rokuController.js
  3. +4 −395 css/font-awesome.min.css
  4. 0 tmp/ps3.lock
@@ -40,7 +40,14 @@ exports.panasonicController = exports.panasonicController || (function () {
host : that.deviceIp,
port : that.devicePort,
path : path,
- method : method
+ method : method,
+ headers : {
+ 'content-type' : 'text/xml',
+ 'accept' : 'text/xml',
+ 'cache-control' : 'no-cache',
+ 'pragma' : 'no-cache',
+ 'soapaction' : '"urn:panasonic-com:service:p00NetworkControl:1#X_SendKey"'
+ }
};
},
@@ -51,7 +58,7 @@ exports.panasonicController = exports.panasonicController || (function () {
var response = '',
action = 'X_SendKey',
urn = 'panasonic-com:service:p00NetworkControl:1',
- value = '<X_KeyEvent>NRC_' + that.command + '</X_KeyEvent>';
+ value = '<X_KeyEvent>NRC_' + that.command + '-ONOFF</X_KeyEvent>';
if(that.text) {
action = 'X_SendString';
@@ -58,10 +58,10 @@ exports.rokuController = exports.rokuController || (function () {
}
return {
- host : that.deviceIp,
- port : that.devicePort,
- path : path,
- method : method
+ host : that.deviceIp,
+ port : that.devicePort,
+ path : path,
+ method : method
};
},
@@ -86,10 +86,10 @@ exports.rokuController = exports.rokuController || (function () {
for(i in reply.apps.app) {
app = reply.apps.app[i];
- apps[app['$']['id']] = { 'name' : app['_'],
- 'id' : app['$']['id'],
- 'link' : 'http://' + config.config.deviceIp + ':8060/launch/11?contentID=' + app['$']['id'],
- 'image': 'http://' + config.config.deviceIp + ':8060/query/icon/' + app['$']['id']
+ apps[app['$']['id']] = { 'name' : app['_'],
+ 'id' : app['$']['id'],
+ 'link' : 'http://' + config.config.deviceIp + ':8060/launch/11?contentID=' + app['$']['id'],
+ 'image' : 'http://' + config.config.deviceIp + ':8060/query/icon/' + app['$']['id']
};
markup = markup + template.replace('{{DEVICE_ID}}', config.config.deviceID);
Oops, something went wrong.

2 comments on commit f6c5f20

Collaborator

andresn replied Dec 31, 2013

Panasonic Smoke Tests (prioritized / as of this commit):

Smoke test:
Volume Up: OK
Volume Down: OK
Mute On / Off: OK (provide mute state on load?)
Channel Up: OK
Channel Down: OK

Submenu: OK (but doesn't open main TV menu, options menu instead).
Arrow up, bottom, left, right: OK (also work under Netflix, and Youtube context).
Cancel: OK (perhaps actually have the word exit or cancel?)

Power Off: OK (also provide state on load?)
Power On: Error: {"command":"POWER","device":"Panasonic","cmdStatus":"Device is off or unreachable"} Device unreachable (duh.. but wonder why they wouldn't have a dedicated server or something?)

Change Input: OK

Number Pad: OK (works ok when watching TV, seem comments about under Netflix context)

Vierra Link (class fa fa-th, looks like a numb pad): OK, but does nothing? whats it supposed to do?
Internet: OK
Hdmi 4: Does nothing, with the following GET / request error: Bevey.ajax.requestcommon.js:393. (anonymous function)

Text Input: string / command goes through, but nothing happens (under a Netflix signon context, other commands such as arrows work):
. XHR finished loading: "http://192.168.2.8:8080/?text=andresn&device=panasonic&ts=1388471855133". common.js:393
{"text":"andresn","device":"Panasonic", "cmdStatus":"ok"}

Number Pad, same as text input:
. XHR finished loading: "http://192.168.2.8:8080/?device=panasonic&command=D9&ts=1388471871214". common.js:393
{"command":"D9","device":"Panasonic","cmdStatus":"ok"}

Same deal when under Youtube context.

Overall, AWESOME.

Owner

imbrianj replied Dec 31, 2013

Much of the actions were guess-work as I didn't have a device to test against. The list of available commands is in the keymap array in the panasonicController if you feel like testing out which commands are worth putting in the interface? The templates/panasonic.tpl contains the generic markup you can edit. For finding power state, that's a universal problem and I'm looking to sort that out next - button actions may differ based on the state of a given device (the most obvious being the on or off state). I'm wondering if I can just "ping" the device - or fire a dummy event against it.

About the text input not working - for Samsung, at least - it only works with supported apps. I know Netflix does not support third party keyboards. The web browser does, though. Try testing text input on a few different apps and see if it doesn't work or if it's just not supported by some apps. I can look into this, though.

Unsure of what's causing that client-side JS error. Looks like missing XHR params - you're letting it do all the standard event delegation? What's the actual link you're clicking that's causing this error?

Lastly - do you know if your TV supports WOL? If so, we can know "if TV return ERRCONN, the power button should execute a magic packet to WOL the TV" - which would be an effective solution if it's not listening for standard REST events in an off state.

Please sign in to comment.