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

i'm getting error #1

Closed toshibochan closed 7 years ago

toshibochan commented 7 years ago

"[Thu Sep 29 2016 23:50:18 GMT-0700 (PDT)] ERROR LOADING PLUGIN homebridge-foscamcamera: [Thu Sep 29 2016 23:50:18 GMT-0700 (PDT)] Error: Could not locate the bindings file. Tried: → /usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/node-opus/node_modules/ogg-packet/node_modules/ref-struct/node_modules/ref/build/binding.node → /usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/node-opus/node_modules/ogg-packet/node_modules/ref-struct/node_modules/ref/build/Debug/binding.node → /usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/node-opus/node_modules/ogg-packet/node_modules/ref-struct/node_modules/ref/build/Release/binding.node → /usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/node-opus/node_modules/ogg-packet/node_modules/ref-struct/node_modules/ref/out/Debug/binding.node → /usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/node-opus/node_modules/ogg-packet/node_modules/ref-struct/node_modules/ref/Debug/binding.node → /usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/node-opus/node_modules/ogg-packet/node_modules/ref-struct/node_modules/ref/out/Release/binding.node → /usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/node-opus/node_modules/ogg-packet/node_modules/ref-struct/node_modules/ref/Release/binding.node → /usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/node-opus/node_modules/ogg-packet/node_modules/ref-struct/node_modules/ref/build/default/binding.node → /usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/node-opus/node_modules/ogg-packet/node_modules/ref-struct/node_modules/ref/compiled/4.2.1/linux/arm/binding.node at bindings (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/node-opus/node_modules/bindings/bindings.js:88:9) at Object. (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/node-opus/node_modules/ogg-packet/node_modules/ref-struct/node_modules/ref/lib/ref.js:5:47) at Module._compile (module.js:435:26) at Object.Module._extensions..js (module.js:442:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:311:12) at Module.require (module.js:366:17) at require (module.js:385:17) at Object. (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/node-opus/node_modules/ogg-packet/node_modules/ref-struct/lib/struct.js:49:11) at Module._compile (module.js:435:26)"

luisiam commented 7 years ago

Reinstall? What version of node are you using?

toshibochan commented 7 years ago

v4.2.1

toshibochan commented 7 years ago

node v4.2.1 raspberry pi 3

luisiam commented 7 years ago

I only tested it on 6.6. Not sure if that's the ptoblem

toshibochan commented 7 years ago

okay i will try update my node

leoneleone commented 7 years ago

I'm getting errors as well:

[9/30/2016, 12:36:27 PM] FoscamAccessory configured with C2_LivingRoom 192.168.1.157 88 3 Unhandled rejection TypeError: Cannot read property 'split' of null at new RTSPClient (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/RTSPClient.js:22:25) at new FoscamStream (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/FoscamStream.js:21:27) at FoscamAccessory._createStreamControllers (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/FoscamAccessory.js:213:26) at new FoscamAccessory (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/FoscamAccessory.js:125:14) at FoscamPlatform.configureCamera (/usr/local/lib/node_modules/homebridge-foscamcamera/index.js:139:22) at /usr/local/lib/node_modules/homebridge-foscamcamera/index.js:63:18 at /usr/local/lib/node_modules/homebridge-foscamcamera/index.js:111:9 at tryCatcher (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/util.js:26:23) at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/promise.js:510:31) at Promise._settlePromiseAt (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/promise.js:584:18) at Async._drainQueue (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/async.js:128:12) at Async._drainQueues (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/async.js:133:10) at Immediate.Async.drainQueues as _onImmediate at tryOnImmediate (timers.js:543:15) at processImmediate as _immediateCallback Unhandled rejection TypeError: Cannot read property 'split' of null at new RTSPClient (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/RTSPClient.js:22:25) at new FoscamStream (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/FoscamStream.js:21:27) at FoscamAccessory._createStreamControllers (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/FoscamAccessory.js:213:26) at new FoscamAccessory (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/FoscamAccessory.js:125:14) at FoscamPlatform.configureCamera (/usr/local/lib/node_modules/homebridge-foscamcamera/index.js:139:22) at /usr/local/lib/node_modules/homebridge-foscamcamera/index.js:63:18 at /usr/local/lib/node_modules/homebridge-foscamcamera/index.js:111:9 at tryCatcher (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/util.js:26:23) at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/promise.js:510:31) at Promise._settlePromiseAt (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/promise.js:584:18) at Async._drainQueue (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/async.js:128:12) at Async._drainQueues (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/async.js:133:10) at Immediate.Async.drainQueues as _onImmediate at tryOnImmediate (timers.js:543:15) at processImmediate as _immediateCallback

I'm running Node v6.7

luisiam commented 7 years ago

Try removing and reinstalling with npm install --unsafe-perm -g homebridge-foscamcamera

leoneleone commented 7 years ago

@luisiam still the same error

[9/30/2016, 7:07:37 PM] FoscamAccessory configured with C2_LivingRoom 192.168.1.157 88 3 Unhandled rejection TypeError: Cannot read property 'split' of null at new RTSPClient (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/RTSPClient.js:22:25) at new FoscamStream (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/FoscamStream.js:21:27) at FoscamAccessory._createStreamControllers (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/FoscamAccessory.js:218:26) at new FoscamAccessory (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/FoscamAccessory.js:125:14) at FoscamPlatform.configureCamera (/usr/local/lib/node_modules/homebridge-foscamcamera/index.js:139:22) at /usr/local/lib/node_modules/homebridge-foscamcamera/index.js:63:18 at /usr/local/lib/node_modules/homebridge-foscamcamera/index.js:111:9 at tryCatcher (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/util.js:26:23) at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/promise.js:510:31) at Promise._settlePromiseAt (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/promise.js:584:18) at Async._drainQueue (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/async.js:128:12) at Async._drainQueues (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/async.js:133:10) at Immediate.Async.drainQueues (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/async.js:15:14) at runCallback (timers.js:574:20) at tryOnImmediate (timers.js:554:5) at processImmediate as _immediateCallback Unhandled rejection TypeError: Cannot read property 'split' of null at new RTSPClient (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/RTSPClient.js:22:25) at new FoscamStream (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/FoscamStream.js:21:27) at FoscamAccessory._createStreamControllers (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/FoscamAccessory.js:218:26) at new FoscamAccessory (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/FoscamAccessory.js:125:14) at FoscamPlatform.configureCamera (/usr/local/lib/node_modules/homebridge-foscamcamera/index.js:139:22) at /usr/local/lib/node_modules/homebridge-foscamcamera/index.js:63:18 at /usr/local/lib/node_modules/homebridge-foscamcamera/index.js:111:9 at tryCatcher (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/util.js:26:23) at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/promise.js:510:31) at Promise._settlePromiseAt (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/promise.js:584:18) at Async._drainQueue (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/async.js:128:12) at Async._drainQueues (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/async.js:133:10) at Immediate.Async.drainQueues (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/async.js:15:14) at runCallback (timers.js:574:20) at tryOnImmediate (timers.js:554:5) at processImmediate as _immediateCallback Unhandled rejection TypeError: Cannot read property 'split' of null at new RTSPClient (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/RTSPClient.js:22:25) at new FoscamStream (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/FoscamStream.js:21:27) at FoscamAccessory._createStreamControllers (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/FoscamAccessory.js:218:26) at new FoscamAccessory (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/homebridge-foscam-stream/lib/FoscamAccessory.js:125:14) at FoscamPlatform.configureCamera (/usr/local/lib/node_modules/homebridge-foscamcamera/index.js:139:22) at /usr/local/lib/node_modules/homebridge-foscamcamera/index.js:63:18 at /usr/local/lib/node_modules/homebridge-foscamcamera/index.js:111:9 at tryCatcher (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/util.js:26:23) at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/promise.js:510:31) at Promise._settlePromiseAt (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/promise.js:584:18) at Async._drainQueue (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/async.js:128:12) at Async._drainQueues (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/async.js:133:10) at Immediate.Async.drainQueues (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/bluebird/js/main/async.js:15:14) at runCallback (timers.js:574:20) at tryOnImmediate (timers.js:554:5) at processImmediate as _immediateCallback

luisiam commented 7 years ago

Can you post your config.json?

leoneleone commented 7 years ago

`.... }, { "platform": "Nest", "token": "c.**_", "clientId": "", "clientSecret": "****", "code": "**_***",

            "username": "*********",
            "password": "*********"
    }, {
            "platform": "FoscamCamera",
            "cameras": [{
                    "username": "C2_LivingRoom",
                    "password": "*******",
                    "host": "192.168.1.157",
                    "port": 88,
                    "stay": 0,
                    "away": 14,
                    "night": 13,
                    "gain": 6,
                    "spkrEnable": true,
                    "spkrCompression": true,
                    "spkrGain": 1
            }, {
                    "username": "C2_*****",
                    "password": "******",
                    "host": "192.168.1.161",
                    "port": 88,
                    "stay": 0,
                    "away": 14,
                    "night": 13,
                    "gain": 6,
                    "spkrEnable": true,
                    "spkrCompression": true,
                    "spkrGain": 1
            }, {
                    "username": "C2_Bedroom",
                    "password": "*****",
                    "host": "192.168.1.81",
                    "port": 88,
                    "stay": 0,
                    "away": 14,
                    "night": 13,
                    "gain": 6,
                    "spkrEnable": true,
                    "spkrCompression": true,
                    "spkrGain": 1
            }, {
                    "platform": "Camera-ffmpeg",
                    "cameras": [{
                            "name": "Hallway Nest Camera",
                            "videoConfig": {
                                    "source": "re -i rtsp://stream-ire-bravo.dropcam.com/nexus_aac/*****/playlist.m3u8",
                                    "maxStreams": 2,
                                    "maxWidth": 1280,
                                    "maxHeight": 720,
                                    "maxFPS": 30
                            }
                    }]
            }]
    }]

} `

luisiam commented 7 years ago

C2_LivingRoom is actually the username you use to login to the camera?

leoneleone commented 7 years ago

Yes it is. The other two have similar prefixes. I blocked out the rest of the info with *s 🙂

leoneleone commented 7 years ago

Should I change the names of the cameras?

luisiam commented 7 years ago

Is that the name of the camera or the username to login?

leoneleone commented 7 years ago

Ah I see what you mean... No, according to the Foscam iOS app that is the "camera account". I'll use the "camera name" instead and see what happens :)

leoneleone commented 7 years ago

so C2_LivingRoom is the camera account name. Should I be using the "Camera Name" instead?

leoneleone commented 7 years ago

Camera Name: FoscamC2 LivingRoom Camera Account: C2_LivingRoom Password: ***

leoneleone commented 7 years ago

Selma to go through homebridge setup, but I can't see the cameras loaded in Home app. Adding/Searching for accessories but Home app can't find the cameras.

I think there might be a bug in iOS 10.0.2 or maybe I might have to do a Reset HomeKit Configuration (which I'm trying to avoid).

luisiam commented 7 years ago

Do you have homebridge-foscam2 completely removed? There may be UUID conflict with the previous version.

leoneleone commented 7 years ago

Yes. I've removed previous foscam plugins only using homebridge-foscamcamera

luisiam commented 7 years ago

Do you still see the previous accessories in the home app because it may still be in the cache. I am running 10.0.2 and I can successfully see my cameras.

leoneleone commented 7 years ago

Yes, all my previous homebridge accessories are there. Should I remove homebridge then re-add it you think? It's either that or I have to reset my HomeKit config (last resort)

luisiam commented 7 years ago

I mean previous foscam accessories, other accessories are fine.

leoneleone commented 7 years ago

No. no previous foscam accessories. Only homebridge-foscamcamera And homebridge-camera-ffmpeg plugins are part of my setup. I will try to remove my accessory plists. Maybe that will help

luisiam commented 7 years ago

May be you can try running a clean home ridge with foscamcamera plugin only on your test server to see if it works 

Regards, Luis Iam.

On Sat, Oct 1, 2016 at 1:34 PM -0700, "leoneleone" notifications@github.com wrote:

No. no previous foscam accessories.

Only homebridge-foscamcamera

And homebridge-camera-ffmpeg plugins are part of my setup.

I will try to remove my accessory plists. Maybe that will help

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

leoneleone commented 7 years ago

I'll need some time to setup homebridge on a new pi. will get back to you by monday.

Thanks for all your help 😊

toshibochan commented 7 years ago

@luisiam thanks for the new homebridge for foscam. i was able to install in may Mac. and all working good. just one question. the stream only doing VGA quality? how i can change video quality? because after use the home app and look the camera the stream quality in other app change to VGA. is possible use the sub stream instead of main stream?

luisiam commented 7 years ago

Glad that it finally works. You may want to thank you @planetbeing since he wrote the entire library for streaming. I just put everything together 😀

It is set up to choose the best resolution based on the connectivity. If I am on WiFi, it always streams at 720p. If I am on LTE, it always streams at VGA. If you want to limit to sub stream only, you can put

"maxMainStreams": 0

to the config.json. maxSubStreams works too if you want it vice versa.

toshibochan commented 7 years ago

the problem is i use other app on iPad for my q-see DVR and foscam and the and the foscam picture become low quality after i look on the home app. be great if we can chose SUB or MAIN Stream for homekit.

luisiam commented 7 years ago

Just add "maxMainStreams": 0 to the config.json. It will tell iOS that main stream is not available and force iOS to choose sub stream.

toshibochan commented 7 years ago

I did and no pic

luisiam commented 7 years ago

What did you see on the log? Is iOS requesting for streaming?

Regards, Luis Iam.

On Mon, Oct 3, 2016 at 6:27 PM -0700, "toshibochan" notifications@github.com wrote:

I did and no pic

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub, or mute the thread.

toshibochan commented 7 years ago

Strange thing happens to may mac. 2 days ago i update the node to 6.7.0 and your plugin was working. But yesterday I reboot the Mac and now node showing 4.2.1. I uninstall all node and install again but still showing old node

toshibochan commented 7 years ago

Same thing happens to my PI 3. I going to reinstall all again and test

toshibochan commented 7 years ago

I will let you know how works after reinstall Thanks again for make great things for make or live fun!

luisiam commented 7 years ago

Interesting. My node version never roll back to previous version. I am staying on 6.7.0 now and everything is nice and smooth

toshibochan commented 7 years ago

I don't know what happens!!! Super strange!

malignosama commented 7 years ago

Hello I managed to install the plugin but when running the home bridge I get this error message and I have no clue where the problem might be.

Unhandled rejection StatusCodeError: 404 - 404 Not Found

404 Not Found

File not found. ``` at new StatusCodeError (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request-promise/lib/errors.js:26:15) at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request-promise/lib/rp.js:68:32) at Request.self.callback (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request/request.js:187:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request. (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request/request.js:1048:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at IncomingMessage. (/usr/local/lib/node_modules/homebridge-foscamcamera/node_modules/request/request.js:969:12) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:185:7) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9) ``` I would appreciate any help. Thanks
luisiam commented 7 years ago

Can you give us more info?

  1. HomeBridge version.
  2. Node version.
  3. Camera model.
  4. Your config.json
malignosama commented 7 years ago

Sure.

  1. HomeBridge version - 3.10.8
  2. Node version - v6.7.0
  3. Camera model - EasyN F-series
  4. Config.json: { "bridge": { "name": "Evil-Base", "username": "C4:23:3C:A3:CE:30", "port": 51826, "pin": "025-42-666" },

    "description": "EVIL-BASE",

    "platforms": [
    {
           "platform": "HarmonyHub",
           "name": "Living Room Harmony Hub"
    },
    
    {
       "platform": "PhilipsHue",
       "name": "Philips Hue",
       "ip_address": "192.168.1.153",
               "username": "9aL6krZwqhSEvXupnz5pOkFDff-NiSJfQhqoRoxt"
    },
    {
        "platform": "FoscamCamera",
           "cameras": [
               {
                   "username": "admin",
                   "password": "passwd1",
                   "host": "192.168.1.84",
                   "port": 80,
                   "stay": 0,
                   "away": 14,
                   "night": 13,
                   "gain": 6,
                   "spkrEnable": true,
                   "spkrCompression": true,
                   "spkrGain": 1
               }
           ]
     },
     {
       "platform": "FHEM",
       "name": "FHEM",
       "server": "127.0.0.1",
       "port": "8083",
       "filter": "room=Homekit"
     }

    ]

}

Everything works on the HomeBridge excepting the Camera.

Thanks again for you help.

PS. It is running on a Raspberry Pi.

luisiam commented 7 years ago

This plugin won't support any other camera. It only supports Foscam camera

malignosama commented 7 years ago

This camera is Foscam compatible and implements the API

luisiam commented 7 years ago

I don't know if the API is the same across foscam and easyn. You can just use this plugin as is. I cannot provide any support since I don't own any easyn cameras.

malignosama commented 7 years ago

I will give a try changing the camera configuration.

Thanks anyway.