rodtoll / homebridge-isy-js

Homebridge platform plugin for the ISY series of home controllers from Universal Devices.
MIT License
22 stars 27 forks source link

Error: This callback function has already been called by someone else #43

Closed crumbolt closed 7 years ago

crumbolt commented 7 years ago

Hello, I recently tried to add the ISY-JS plugin to Homebridge and encountered the "This callback function has already been called by someone else" error. I then uninstalled Homebridge and all plugins and reinstalled just Homebridge and ISY-JS but still get the same error. Below are the config.json and terminal output.

Has anyone encountered this error before or have an idea for a fix?

Config.json:

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

    "description": "Homebridge Test",

    "platforms": [
        {
            "platform": "isy-js",
            "name": "isy-js",
            "host": "10.0.1.10",
            "username": "********",
            "password": "********",
            "elkEnabled": false,
            "useHttps": false,
            "debugLoggingEnabled": true,
            "includeAllScenes": true
        }
    ]
}

Terminal Output: WARNING The program 'nodejs' uses the Apple Bonjour compatibility layer of Avahi. WARNING Please fix your application to use the native API of Avahi! WARNING For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs WARNING The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi. WARNING Please fix your application to use the native API of Avahi! WARNING For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister [1/21/2017, 1:30:55 PM] Loaded plugin: homebridge-isy-js [1/21/2017, 1:30:55 PM] Registering platform 'homebridge-isy-js.isy-js' [1/21/2017, 1:30:55 PM] --- [1/21/2017, 1:30:55 PM] Loaded config.json with 0 accessories and 1 platforms. [1/21/2017, 1:30:55 PM] --- [1/21/2017, 1:30:55 PM] Loading 1 platforms... [1/21/2017, 1:30:55 PM] [isy-js] Initializing isy-js platform... 2017-0-6#13:30:56- Ignoring disabled device: Master Bathroom 2017-0-6#13:30:56- ISY-JS: Error loading variables from isy. Device likely doesn't have any variables defined. Safe to ignore. 2017-0-6#13:30:56- ISY-JS: Error loading variables from isy. Device likely doesn't have any variables defined. Safe to ignore. 2017-0-6#13:30:56- ISY-JS: Error loading variables from isy. Device likely doesn't have any variables defined. Safe to ignore. [1/21/2017, 1:30:56 PM] [isy-js] 117-0-6#13:30:56- ISYPLATFORM: Filtered device has: 9 devices [1/21/2017, 1:30:56 PM] [isy-js] Initializing platform accessory 'Theatre Front'... [1/21/2017, 1:30:56 PM] [isy-js] Initializing platform accessory 'Theatre Back'... [1/21/2017, 1:30:56 PM] [isy-js] Initializing platform accessory 'Theatre Pot'... [1/21/2017, 1:30:56 PM] [isy-js] Initializing platform accessory 'Living Room Pot'... [1/21/2017, 1:30:56 PM] [isy-js] Initializing platform accessory 'Kitchen Table'... [1/21/2017, 1:30:56 PM] [isy-js] Initializing platform accessory 'Kitchen Island'... [1/21/2017, 1:30:56 PM] [isy-js] Initializing platform accessory 'ISY'... [1/21/2017, 1:30:56 PM] [isy-js] Initializing platform accessory 'Theatre All On'... [1/21/2017, 1:30:56 PM] [isy-js] Initializing platform accessory 'Auto DR'...

2017-0-6#13:30:56- ISY-JS: Error loading variables from isy. Device likely doesn't have any variables defined. Safe to ignore. [1/21/2017, 1:30:56 PM] [isy-js] 117-0-6#13:30:56- ISYPLATFORM: Filtered device has: 9 devices /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:11 throw new Error("This callback function has already been called by someone else; it can only be called one time."); ^ Error: This callback function has already been called by someone else; it can only be called one time. at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:11:13 at /usr/lib/node_modules/homebridge-isy-js/index.js:207:3 at ISY.finishInitialize (/usr/lib/node_modules/homebridge-isy-js/node_modules/isy-js/isy.js:368:5) at /usr/lib/node_modules/homebridge-isy-js/node_modules/isy-js/isy.js:539:30 at Request. (/usr/lib/node_modules/homebridge-isy-js/node_modules/isy-js/isy.js:410:13) at emitTwo (events.js:87:13) at Request.emit (events.js:172:7) at Request.mixin._fireSuccess (/usr/lib/node_modules/homebridge-isy-js/node_modules/restler/lib/restler.js:229:10) at /usr/lib/node_modules/homebridge-isy-js/node_modules/restler/lib/restler.js:161:20 at IncomingMessage.parsers.auto (/usr/lib/node_modules/homebridge-isy-js/node_modules/restler/lib/restler.js:402:7)

VeniceNerd commented 7 years ago

@crumbolt I JUST posted the same exact problem. Glad to see I'm not alone. I have no idea how to tackle this issue either:

https://github.com/rodtoll/homebridge-isy-js/issues/44

VeniceNerd commented 7 years ago

@crumbolt were you ever able to fix this issue? What are your versions of Node and NPM? My install looks like this:

Mac OS 10.11.6 Node 6.9.4 NPM 3.10.10 Homebridge 0.4.16 Home bridge ISY JS 0.1.8

Having the exact same issue as you.

rodtoll commented 7 years ago

I've been unable to reproduce it locally.

Are you running any other plugins or just this one?

On Tue, Jan 24, 2017 at 9:23 AM VeniceNerd notifications@github.com wrote:

@crumbolt https://github.com/crumbolt were you ever able to fix this issue? What are your versions of Node and NPM? My install looks like this:

Mac OS 10.11.6 Node 6.9.4 NPM 3.10.10 Homebridge 0.4.16 Home bridge ISY JS 0.1.8

Having the exact same issue as you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rodtoll/homebridge-isy-js/issues/43#issuecomment-274873473, or mute the thread https://github.com/notifications/unsubscribe-auth/ADyYQ5VBi5qVh0nU6r8ONh8E95SLWHx_ks5rVjNRgaJpZM4LqIDI .

rodtoll commented 7 years ago

In the meantime I'm going to do a full fresh install on a clean raspberry pi image tonight and see if I can get it to repro. Should have an update tonight.

On Tue, Jan 24, 2017 at 9:27 AM Rod Toll rod.toll@gmail.com wrote:

I've been unable to reproduce it locally.

Are you running any other plugins or just this one?

On Tue, Jan 24, 2017 at 9:23 AM VeniceNerd notifications@github.com wrote:

@crumbolt https://github.com/crumbolt were you ever able to fix this issue? What are your versions of Node and NPM? My install looks like this:

Mac OS 10.11.6 Node 6.9.4 NPM 3.10.10 Homebridge 0.4.16 Home bridge ISY JS 0.1.8

Having the exact same issue as you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rodtoll/homebridge-isy-js/issues/43#issuecomment-274873473, or mute the thread https://github.com/notifications/unsubscribe-auth/ADyYQ5VBi5qVh0nU6r8ONh8E95SLWHx_ks5rVjNRgaJpZM4LqIDI .

crumbolt commented 7 years ago

@VeniceNerd I was not able to get past the error. My install is: Ubuntu 14.04.5 LTS Node 4.x.x (I updated before I could get the exact version) Homebridge 0.4.16 Homebridge-isy-js 0.1.8

I just upgraded node to the latest (v7.4) and now homebridge will not start. I am just going to upgrade my server to Ubuntu 16 and re-install everything to see if that helps.

@rodtoll To simplify debugging the error, I only installed Homebridge + isy-js What dist do you use for your RPi?

crumbolt commented 7 years ago

Issue fixed:

ISY-JS plugin requires that at least one variable of each type (int and state) are created on the ISY itself.