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

Error on start up #31

Open nicktmro opened 7 years ago

nicktmro commented 7 years ago

Hi,

I have the following issue: when starting Homebridge (latest) (running on macOS Sierra) with Foscam in the config I get this error:

(node:56500) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): RequestError: Error: getaddrinfo ENOTFOUND http http:80

The rest of the accessories and the WeMo platform continue to function, though.

Here's the config (edited):

{  
    "bridge":{  
        "name":"Homebridge",
        "username":"AA:AA:AA:AA:AA:AA",
        "port":12345,
        "pin":"000-00-000"
    },
    "description":"This is my home.",
    "accessories": [
        {
            "accessory": "TV",
            "name": "TV",
            "description": "Livingroom TV",
            "ip": "192.168.178.71",
            "maxVolume": 15
        }
    ],
    "platforms":[  
        {  
            "platform":"BelkinWeMo",
            "name":"WeMo Platform",
            "noMotionTimer":180,
            "ignoredDevices":[  

            ]
        },
        {
            "platform": "FoscamCamera",
        "name": "Foscam",
        "cameras": [{
                "username": "homebridge",
                "password": "notTheRealPWD",
                "host": "http://192.168.178.28",
                "port": 9339,
                "stay": 0,
                "away": 0,
                "night": 0
            }]
        }
    ]
}

If I remove the Foscam platform, my homebridge starts up correctly and all the pre-existing platforms and accessories continue to function correctly.

I tried blowing up the persist folder and setting up everything again, but I get the same error.

Is there something else I can try?

Thanks, Nick

toshibochan commented 7 years ago

Oh host take off http:\

nicktmro commented 7 years ago

Thanks for the quick reply. I removed the protocol (http) and after leaving just 192.168.178.28 I get this error:

(node:62317) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): StatusCodeError: 404 - <HTML><HEAD><TITLE>404 Not Found</TITLE></HEAD>
<BODY BGCOLOR="#cc9999"><H4>404 Not Found</H4>
File not found.
</BODY></HTML>

I checked in the browser by going to http://192.168.178.28:9339 (and using the supplied username and password) from the same machine the homebrdige runs on and I can successfully see the camera.

I'd appreciate any other suggestions. Cheers...

nicktmro commented 7 years ago

@toshibochan I wonder if it's because of the camera model I have: FI8910W?

toshibochan commented 7 years ago

Unfortunately FI8910w no working for me to!

luisiam commented 7 years ago

Is FI8910W an H.264 model? This plugin only works on H.264 cameras.

rdustinb commented 7 years ago

I am having the same issue with my Foscam 8910, and no I do not believe they are H.264....Bummer!

Is there a way to support non H.264 cameras from Foscam?

luisiam commented 7 years ago

The non-H.264 camera uses a totally different protocol. Hence, it's not supported.