shauncampbell / homebridge-sky-plus-hd

Homebridge plugin for configuring sky plus hd box
Apache License 2.0
5 stars 3 forks source link

Homebridge returns an error despite config.json validating #2

Open APhelan opened 7 years ago

APhelan commented 7 years ago

Really love the sounds of this but can't seem to fathom what is going wrong. My homebridge setup is running fine with my LIFx bulbs but for some reason this will not work. Here is the error that homebridge returns:

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE :::51826
    at Object.exports._errnoException (util.js:1026:11)
    at exports._exceptionWithHostPort (util.js:1049:20)
    at Server._listen2 (net.js:1257:14)
    at listen (net.js:1293:10)
    at Server.listen (net.js:1389:5)
    at EventedHTTPServer.listen (/usr/local/lib/node_modules/hap-nodejs/lib/util/eventedhttp.js:60:19)
    at HAPServer.listen (/usr/local/lib/node_modules/hap-nodejs/lib/HAPServer.js:158:20)
    at Bridge.Accessory.publish (/usr/local/lib/node_modules/hap-nodejs/lib/Accessory.js:496:16)
    at Server._publish (/usr/local/lib/node_modules/homebridge/lib/server.js:111:16)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:88:10)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)

And here is my config.json file:

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154"
    },

    "description": "This is a configuration file with platforms and accessories for my home automation system.",

    "accessories": [
    {
      "accessory": "SkyPlusHDBox",
      "name": "BSkyB",
      "ipAddress": "192.168.0.28",
      "region": "granada"
    }
     ],

    "platforms": [
        {
            "platform" : "LifxLan",
            "name" : "LiFx"
        }
    ]
}
shauncampbell commented 7 years ago

Hey there,

From the error it looks as though homebridge is trying to run twice on the same port. If you remove the Sky plugin do you see the same error message?

If so, you'll need to kill whatever other homebridge process is running. You can do this by typing: pkill homebridge

On 14 November 2016 at 15:36:41, Aaron (notifications@github.com(mailto:notifications@github.com)) wrote:

Really love the sounds of this but can't seem to fathom what is going wrong. My homebridge setup is running fine with my LIFx bulbs but for some reason this will not work. Here is the error that homebridge returns:

events.js:160 throw er; // Unhandled 'error' event ^ Error: listen EADDRINUSE :::51826 at Object.exports._errnoException (util.js:1026:11) at exports._exceptionWithHostPort (util.js:1049:20) at Server._listen2 (net.js:1257:14) at listen (net.js:1293:10) at Server.listen (net.js:1389:5) at EventedHTTPServer.listen (/usr/local/lib/node_modules/hap-nodejs/lib/util/eventedhttp.js:60:19) at HAPServer.listen (/usr/local/lib/node_modules/hap-nodejs/lib/HAPServer.js:158:20) at Bridge.Accessory.publish (/usr/local/lib/node_modules/hap-nodejs/lib/Accessory.js:496:16) at Server._publish (/usr/local/lib/node_modules/homebridge/lib/server.js:111:16) at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:88:10) at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10) at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12)

And here is my config.json file:

{ "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "031-45-154" }, "description": "This is a configuration file with platforms and accessories for my home automation system.", "accessories": [ { "accessory": "SkyPlusHDBox", "name": "BSkyB", "ipAddress": "192.168.0.28", "region": "granada" } ], "platforms": [ { "platform" : "LifxLan", "name" : "LiFx" } ] }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub(https://github.com/shauncampbell/homebridge-sky-plus-hd/issues/2), or mute the thread(https://github.com/notifications/unsubscribe-auth/AAw1MxIs2UUqgGp7xqX0ivGU5B2ZIsqDks5q-IAJgaJpZM4KxdAw).

APhelan commented 7 years ago

@shauncampbell that makes sense, I have homebridge set to boot on startup. Any idea if killing the other homebridge process would have the desired effect?

shauncampbell commented 7 years ago

It should do.

On 14 November 2016 at 16:15:16, Aaron (notifications@github.com(mailto:notifications@github.com)) wrote:

@shauncampbell(https://github.com/shauncampbell) that makes sense, I have homebridge set to boot on startup. Any idea if killing the other homebridge process would have the desired effect?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub(https://github.com/shauncampbell/homebridge-sky-plus-hd/issues/2#issuecomment-260380562), or mute the thread(https://github.com/notifications/unsubscribe-auth/AAw1M_hlVEeKQ6dg5QOOtSk1_yAhFO63ks5q-IkUgaJpZM4KxdAw).

APhelan commented 7 years ago

@shauncampbell just tried: pkill: killing pid 534 failed: Operation not permitted

shauncampbell commented 7 years ago

If you've got it set to run on start up it's probably running as root. Try running:

sudo pkill homebridge

Instead

On 14 November 2016 at 16:19:22, Aaron (notifications@github.com(mailto:notifications@github.com)) wrote:

@shauncampbell(https://github.com/shauncampbell) just tried: pkill: killing pid 534 failed: Operation not permitted

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub(https://github.com/shauncampbell/homebridge-sky-plus-hd/issues/2#issuecomment-260381730), or mute the thread(https://github.com/notifications/unsubscribe-auth/AAw1M0Z1AUWy-CjylVJQz3-RkHs_9PMPks5q-IoKgaJpZM4KxdAw).

APhelan commented 7 years ago

@shauncampbell of course, yeah. Completely forgot haha. I've just run that, it seemingly killed the process but running homebridge returns the same error.