GithubHelp home page GithubHelp logo

node-panasonic-viera's People

Contributors

tomhaskell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

node-panasonic-viera's Issues

(http)errors are hidden from the caller

Hi Tom,

I'm trying to incorporate your library into a homebridge-plugin: homebridge-panasonictv (work is being done in my fork).

This basically works pretty well, but I would like to be notified about errors that might occur. Specifically when the TV is not reachable, but this code hides/swallows the errors from the caller:

var req = http.request(post_options, function(res) {
        //console.log('STATUS: ' + res.statusCode);
        //console.log('HEADERS: ' + JSON.stringify(res.headers));
        res.setEncoding('utf8');
        res.on('data', self.callback);
    });
req.on('error', function(e) {
    console.log('error: ' + e.message);
    console.log(e);
});

Do you think it's viable to extend the callback with an error object?

Can't run it on Raspberry

Have you ever tried to run this code from Raspberry Pi? It works very well from my Windows Laptops as well as from Android devices, but not from my Pis (1+3, Rasbian and ArchLinux). On the Raspberries I always receive Error 403.

I reduced what you do to:

curl 'http://192.168.178.142:55000/nrc/control_0' \
    -H 'soapaction: "urn:panasonic-com:service:p00NetworkControl:1#X_SendKey"' \
    --data-binary '<?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_SendKey xmlns:u="urn:panasonic-com:service:p00NetworkControl:1"><X_KeyEvent>NRC_MUTE-ONOFF</X_KeyEvent></u:X_SendKey></s:Body></s:Envelope>' \
    -w '%{http_code}'

https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=197992
https://stackoverflow.com/questions/47367993

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.