luisiam / homebridge-foscamcamera

Foscam Plugin for HomeBridge (API 2.1): https://github.com/nfarina/homebridge
Apache License 2.0
42 stars 6 forks source link

Crashing with the follow error #35

Open livefeed opened 7 years ago

livefeed commented 7 years ago

Crashing my bridge, any help to fix this error would be great;

Unhandled Rejection Detected at: Promise Promise {

{ RequestError: Error: connect ETIMEDOUT MyIP:8010 at new RequestError (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request-promise/lib/errors.js:11:15) at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request-promise/lib/rp.js:60:32) at self.callback (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request/request.js:186:22) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Request.onRequestError (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request/request.js:845:8) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at Socket.socketErrorListener (_http_client.js:310:9) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at emitErrorNT (net.js:1278:8) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) name: 'RequestError', message: 'Error: connect ETIMEDOUT MyIP:8010', cause: { Error: connect ETIMEDOUT MyIP:8010 at Object.exports._errnoException (util.js:1022:11) at exports._exceptionWithHostPort (util.js:1045:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14) code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect', address: 'MyIP', port: 8010 }, error: { Error: connect ETIMEDOUT MyIP:8010 at Object.exports._errnoException (util.js:1022:11) at exports._exceptionWithHostPort (util.js:1045:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14) code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect', address: 'MyIP', port: 8010 }, options: { rejectUnauthorized: true, qs: [Object], uri: 'http://MyIP:8010/cgi-bin/CGIProxy.fcgi', method: 'GET', callback: undefined, transform: undefined, simple: true, resolveWithFullResponse: false }, response: undefined } } reason: { RequestError: Error: connect ETIMEDOUT MyIP:8010 at new RequestError (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request-promise/lib/errors.js:11:15) at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request-promise/lib/rp.js:60:32) at self.callback (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request/request.js:186:22) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Request.onRequestError (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request/request.js:845:8) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at Socket.socketErrorListener (_http_client.js:310:9) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at emitErrorNT (net.js:1278:8) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) name: 'RequestError', message: 'Error: connect ETIMEDOUT MyIP:8010', cause: { Error: connect ETIMEDOUT MyIP:8010 at Object.exports._errnoException (util.js:1022:11) at exports._exceptionWithHostPort (util.js:1045:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14) code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect', address: 'MyIP', port: 8010 }, error: { Error: connect ETIMEDOUT MyIP:8010 at Object.exports._errnoException (util.js:1022:11) at exports._exceptionWithHostPort (util.js:1045:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14) code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect', address: 'MyIP', port: 8010 }, options: { rejectUnauthorized: true, qs: { usr: '******', pwd: '******', cmd: 'getMotionDetectConfig1' }, uri: 'http://MyIP:8010/cgi-bin/CGIProxy.fcgi', method: 'GET', callback: undefined, transform: undefined, simple: true, resolveWithFullResponse: false }, response: undefined } Restarting homebridge due to an error restarting... Unhandled Rejection Detected at: Promise Promise { { RequestError: Error: connect ETIMEDOUT MyIP:85 at new RequestError (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request-promise/lib/errors.js:11:15) at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request-promise/lib/rp.js:60:32) at self.callback (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request/request.js:186:22) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Request.onRequestError (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request/request.js:845:8) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at Socket.socketErrorListener (_http_client.js:310:9) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at emitErrorNT (net.js:1278:8) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) name: 'RequestError', message: 'Error: connect ETIMEDOUT 7MyIP:85', cause: { Error: connect ETIMEDOUT MyIP:85 at Object.exports._errnoException (util.js:1022:11) at exports._exceptionWithHostPort (util.js:1045:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14) code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect', address: 'MyIP', port: 85 }, error: { Error: connect ETIMEDOUT MyIP:85 at Object.exports._errnoException (util.js:1022:11) at exports._exceptionWithHostPort (util.js:1045:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14) code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect', address: 'MyIP', port: 85 }, options: { rejectUnauthorized: true, qs: [Object], uri: 'http://MyIP:85/cgi-bin/CGIProxy.fcgi', method: 'GET', callback: undefined, transform: undefined, simple: true, resolveWithFullResponse: false }, response: undefined } } reason: { RequestError: Error: connect ETIMEDOUT MyIP:85 at new RequestError (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request-promise/lib/errors.js:11:15) at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request-promise/lib/rp.js:60:32) at self.callback (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request/request.js:186:22) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Request.onRequestError (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request/request.js:845:8) at emitOne (events.js:96:13) at ClientRequest.emit (events.js:188:7) at Socket.socketErrorListener (_http_client.js:310:9) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at emitErrorNT (net.js:1278:8) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) name: 'RequestError', message: 'Error: connect ETIMEDOUT MyIP:85', cause: { Error: connect ETIMEDOUT MyIP:85 at Object.exports._errnoException (util.js:1022:11) at exports._exceptionWithHostPort (util.js:1045:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14) code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect', address: 'MyIP', port: 85 }, error: { Error: connect ETIMEDOUT MyIP:85 at Object.exports._errnoException (util.js:1022:11) at exports._exceptionWithHostPort (util.js:1045:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14) code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect', address: 'MyIP', port: 85 }, options: { rejectUnauthorized: true, qs: { usr: '******', pwd: '*******', cmd: 'getMotionDetectConfig1' }, uri: 'http://MyIP:85/cgi-bin/CGIProxy.fcgi', method: 'GET', callback: undefined, transform: undefined, simple: true, resolveWithFullResponse: false }, response: undefined }
luisiam commented 7 years ago

Can you post your config.json?

livefeed commented 7 years ago

{ "bridge": { "name": "Homebridge", "username": "****", "port": 51826, "pin": "123-45-*" }, "description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.", "accessories": [ { "accessory": "Chamberlain", "name": "Garage Door", "username": "MYEMAIL", "password": "*****", "deviceId": "***" }, { "accessory": "WUNDERGROUND", "name": "Weather Underground", "device": "WURecklinghausen", "key": "**", "city": "pws:KM**" } ], "platforms": [

            {
              "platform": "Indigo",
              "name": "My Indigo Server",
              "protocol": "http",
              "host": "127.0.0.1",
              "port": "8176",
              "path": "",
              "username": "******",
              "password": "*****",
              "includeActions": true,
              "includeIds": ["1970511626", "1202930629", "188029385", "1841980619"],
              "excludeIds": ["98765", "43210"],
              "treatAsSwitchIds": ["13579", "24680"],
              "treatAsLockIds": ["112233", "445566"],
              "treatAsDoorIds": ["224466", "664422"],
              "treatAsGarageDoorIds": ["223344", "556677"],
              "treatAsWindowIds": ["123123", "456456"],
              "treatAsWindowCoveringIds": ["345345", "678678"],
              "thermostatsInCelsius": false,
              "accessoryNamePrefix": ""
              },
              {
              "platform" : "HomeBridgeControllerLink"
              },
             {
        "platform": "FoscamCamera",
        "name": "Foscam",
        "cameras": [
            {
                "username": "*******",
                "password": "*****",
                "host": "MYIP",
                "port": 86,
                "spkrEnable": true,
                "spkrCompression": true,
                "spkrGain": 1
            },
            {
                "username": "*****",
                "password": "******",
                "host": "MYIP",
                "port": 88,
                "spkrEnable": true,
                "spkrCompression": true,
                "spkrGain": 1
            },
            {
                "username": "*****",
                "password": "*****",
                "host": "MYIP",
                "port": 85,
                "spkrEnable": true,
                "spkrCompression": true,
                "spkrGain": 1

            },
            {
                "username": "*****",
                "password": "***",
                "host": "MyIP",
                "port": 8010,
                "spkrEnable": true,
                "spkrCompression": true,
                "spkrGain": 1
            }
        ]
    }
]

}

luisiam commented 7 years ago

Assumming MyIP is something like 192.168.1.10?

livefeed commented 7 years ago

Yes, just hiding it to post here!

livefeed commented 7 years ago

luisiam, happy to let you remote into my machine if that would help?

luisiam commented 7 years ago

What version of node and homebridge are you using?

livefeed commented 7 years ago

Everything is current

luisiam commented 7 years ago

Can I have the node version that you are using? And what cameras are you using?

livefeed commented 7 years ago

My cameras are Foscam R2 v3- 4 of them.

Node v6.9.4 Npm 4.1.2

luisiam commented 7 years ago

Are you using LAN IP? Are you able to access the camera config page using that IP and port?

livefeed commented 7 years ago

All 4 are over wifi and yes I can access them, it seems if the camera goes offline for whatever reason it throws the plugin into a fit and it crashes.

livefeed commented 7 years ago

Any thoughts on this?