seikan / homebridge-mi-air-purifier

A Xiaomi Mi air purifier plugin for Homebridge.
Other
172 stars 65 forks source link

Unable to get the Homebridge to run after updating the config.json #29

Closed sajatjain closed 6 years ago

sajatjain commented 6 years ago

Hi,

I have the following lines in my config.json and am getting an error (mentioned below) whenever I am trying to get the HomeBridge app run.

config.json

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 58750,
        "pin": "015-23-741"
    },

    "description": "Sajat's Homebridge",

    "accessories": [
        {
            "accessory": "MiAirPurifier",
            "name": "Air Purifier",
            "ip": "192.168.1.68",
            "token": "ca616a1b9287046350edebbbab6c62b2",
            "showTemperature": true,
            "showHumidity": true,
            "showAirQuality": true
        }
    ]
}

Error

events.js:137
      throw er; // Unhandled 'error' event
      ^
Error: listen EADDRINUSE :::58750
    at Object._errnoException (util.js:1003:13)
    at _exceptionWithHostPort (util.js:1024:20)
    at Server.setupListenHandle [as _listen2] (net.js:1366:14)
    at listenInCluster (net.js:1407:12)
    at Server.listen (net.js:1495:7)
    at EventedHTTPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:60:19)
    at HAPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:158:20)
    at Bridge.Accessory.publish (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:607:16)
    at Server._publish (/usr/local/lib/node_modules/homebridge/lib/server.js:126:16)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:96:10)

My Homebridge installation is brand new and this is the only accessory I have been trying to install.

Thank you.

Regards, Sajat

sajatjain commented 6 years ago

It turns out I had to change the port before restarting Homebridge