hannseman / homebridge-mi-hygrothermograph

Homebridge plugin for the Xiaomi Mi Bluetooth Temperature and Humidity Sensor
MIT License
266 stars 52 forks source link

3.0.3 kills homebridge? Seems like a node issue #124

Closed Trippersgarage closed 3 years ago

Trippersgarage commented 3 years ago

Expected Behavior

Homebrige should run

Current Behavior

Homebrige stops running

Steps to Reproduce (for bugs)

Updated to latest version of plugin 3.0.3 and error occurs

Versions

Configuration

{
            "accessory": "Hygrotermograph",
            "name": "HallTemp&Humidity",
            "address": "4C:65:A8:DC:D0:41",
            "temperatureName": "HallTemp",
            "humidityName": "HallHumidity",
            "fakeGatoEnabled": false,
            "timeout": 15,
            "forceDiscovering": false,
            "forceDiscoveringDelay": 2500,
            "disableBatteryLevel": false,
            "lowBattery": 10,
            "temperatureOffset": 0,
            "humidityOffset": 0
        },
        {
            "accessory": "Hygrotermograph",
            "name": "RoomTemp&Humidity",
            "address": "58:2D:34:33:D3:00",
            "temperatureName": "RoomTemp",
            "humidityName": "RoomHumidity",
            "fakeGatoEnabled": false,
            "timeout": 15,
            "forceDiscovering": true,
            "forceDiscoveringDelay": 2500,
            "disableBatteryLevel": false,
            "lowBattery": 10,
            "temperatureOffset": 0,
            "humidityOffset": 0

Homebridge Log / Command Output


[11/30/2020, 11:36:02 AM] Loaded plugin: homebridge-mi-hygrothermograph@3.0.3
[11/30/2020, 11:36:03 AM] ====================
[11/30/2020, 11:36:03 AM] ERROR INITIALIZING PLUGIN homebridge-mi-hygrothermograph:
[11/30/2020, 11:36:03 AM] Error: The module '/usr/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 83. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket/lib/native.js:6:15)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
[11/30/2020, 11:36:03 AM] ====================
[11/30/2020, 11:31:01 AM] Error: The requested accessory 'Hygrotermograph' was not registered by any plugin.
    at PluginManager.getPluginForAccessory (/usr/lib/node_modules/homebridge/src/pluginManager.ts:198:15)
    at /usr/lib/node_modules/homebridge/src/server.ts:345:37
    at Array.forEach (<anonymous>)
    at Server._loadAccessories (/usr/lib/node_modules/homebridge/src/server.ts:328:29)
    at Server.start (/usr/lib/node_modules/homebridge/src/server.ts:154:12)
    at cli (/usr/lib/node_modules/homebridge/src/cli.ts:80:10)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
[11/30/2020, 11:31:01 AM] Got SIGTERM, shutting down Homebridge...
[11/30/2020, 11:31:06 AM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
njuart commented 3 years ago

I have the same problem when update Node.js to 14.15.1

hannseman commented 3 years ago

The error message clearly states that the plugin was compiled against an older node version. Please reinstall.

njuart commented 3 years ago

The error message clearly states that the plugin was compiled against an older node version. Please reinstall.

Just tried, nothing changed. I should uninstall and install again? Or re-install on top is enough? Still getting these

[12/5/2020, 10:56:29 PM] ==================== [12/5/2020, 10:56:29 PM] ERROR INITIALIZING PLUGIN homebridge-mi-hygrothermograph: [12/5/2020, 10:56:29 PM] Error: Error relocating /homebridge/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node: _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeE: symbol not found at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (/homebridge/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket/lib/native.js:6:15) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) [12/5/2020, 10:56:29 PM] ====================

[12/5/2020, 10:58:03 PM] Error loading accessory requested in your config.json at position 3 [12/5/2020, 10:58:03 PM] Error: The requested accessory 'Hygrotermograph' was not registered by any plugin. at PluginManager.getPluginForAccessory (/usr/local/lib/node_modules/homebridge/src/pluginManager.ts:198:15) at /usr/local/lib/node_modules/homebridge/src/server.ts:345:37 at Array.forEach () at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:328:29) at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:154:12) at cli (/usr/local/lib/node_modules/homebridge/src/cli.ts:80:10) at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32)

hannseman commented 3 years ago

Try removing the entire directory /homebridge/node_modules/homebridge-mi-hygrothermograph and then install.

njuart commented 3 years ago

Try removing the entire directory /homebridge/node_modules/homebridge-mi-hygrothermograph and then install.

It worked! Thx for assistance

hannseman commented 3 years ago

No problem! Good luck.