Martvvliet / homebridge-mi-flora-filtered

MIT License
8 stars 4 forks source link

Plugin does not run anymore from one day to the next... #15

Open 2lazy2chill opened 3 years ago

2lazy2chill commented 3 years ago

Hello lucavb. I use Homebridge 1.2.3 (on a Synology NAS within a Docker) and since last updates (maybe...) of Homebridge UI (now v4.33.0) and/or Homebridge Dummy (now v0.4.1) your Plug-In doesn't work anymore...:

[11/15/2020, 12:17:54 PM] ==================== [11/15/2020, 12:17:54 PM] ERROR LOADING PLUGIN homebridge-mi-flora-filtered: [11/15/2020, 12:17:54 PM] Error: Error relocating /homebridge/node_modules/homebridge-mi-flora-filtered/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/binding.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-flora-filtered/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/15/2020, 12:17:54 PM] ==================== [11/15/2020, 12:17:54 PM] Error loading accessory requested in your config.json at position 1 [11/15/2020, 12:17:55 PM] Error: The requested accessory 'mi-flower-care' 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) [11/15/2020, 12:17:59 PM] [Homebridge UI] Homebridge Config UI X v4.33.0 is listening on :: port 8581 [11/15/2020, 12:18:01 PM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [11/15/2020, 12:18:06 PM] [HB Supervisor] Restarting Homebridge... [11/15/2020, 12:18:06 PM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /homebridge/node_modules [11/15/2020, 12:18:06 PM] [HB Supervisor] Started Homebridge v1.2.3 with PID: 1510 [11/15/2020, 12:18:08 PM] Loaded config.json with 1 accessories and 2 platforms. [11/15/2020, 12:18:08 PM] --- [11/15/2020, 12:18:09 PM] Loaded plugin: homebridge-dummy@0.4.1 [11/15/2020, 12:18:09 PM] Registering accessory 'homebridge-dummy.DummySwitch' [11/15/2020, 12:18:09 PM] --- [11/15/2020, 12:18:10 PM] Loaded plugin: homebridge-harmony@1.4.1 [11/15/2020, 12:18:10 PM] Registering platform 'homebridge-harmony.HarmonyHubWebSocket' [11/15/2020, 12:18:10 PM] --- [11/15/2020, 12:18:10 PM] ====================

Sungamm commented 3 years ago

My Homebridge respective xiaomi plug-in did not work anymore,too.

But I updated the node to the latest (LTS) and assume it have something to do with that. Which node version do you use currently?

I updated to 14.15.1 today but the plugin still not work :-(

[21/11/2020, 14:10:48] ERROR LOADING PLUGIN homebridge-mi-flora-filtered: [21/11/2020, 14:10:48] Error: The module '/usr/local/lib/node_modules/homebridge-mi-flora-filtered/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/binding.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, usingnpm rebuildornpm 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/local/lib/node_modules/homebridge-mi-flora-filtered/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) [21/11/2020, 14:10:48] ==================== [21/11/2020, 14:10:50] Loaded plugin: homebridge-ring@9.12.5 [21/11/2020, 14:10:50] Registering platform 'homebridge-ring.Ring' [21/11/2020, 14:10:50] --- [21/11/2020, 14:10:50] Loading 2 platforms... [21/11/2020, 14:10:50] [Config] Initializing config platform... [21/11/2020, 14:10:50] [Config] Spawning homebridge-config-ui-x with PID 5579 [21/11/2020, 14:10:50] [Ring] Initializing Ring platform... [21/11/2020, 14:10:50] Loading 1 accessories... [21/11/2020, 14:10:50] Error loading accessory requested in your config.json at position 1 [21/11/2020, 14:10:50] Error: The requested accessory 'mi-flower-care' 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:347:37 at Array.forEach (<anonymous>) at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:330:29) at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:156:12) at cli (/usr/local/lib/node_modules/homebridge/src/cli.ts:80:10) at Object.<anonymous> (/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) [21/11/2020, 14:10:50] Got SIGTERM, shutting down Homebridge...

2lazy2chill commented 3 years ago

With my Homebridge (v1.2.3) I mean/think it works since last homebridge-config-ui-x update (now v4.33.0) ...

Today I updated to homebridge-config-ui-x 4.34.0. After the next restart I did get this (without the "mi-flower-care"-part within my configuration...):

[11/21/2020, 5:25:03 PM] ==================== [11/21/2020, 5:25:03 PM] ERROR LOADING PLUGIN homebridge-mi-flora-filtered: [11/21/2020, 5:25:03 PM] Error: Error relocating /homebridge/node_modules/homebridge-mi-flora-filtered/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/binding.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-flora-filtered/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/21/2020, 5:25:03 PM] ====================

Sungamm commented 3 years ago

Hi,

I solved my problem.

removed the entry from the config, removed the plugin, sudo apt-get update, sudo apt-get upgrade. Reboot Plugin reinstalled, config entered, reboot.

Works fine.

Give them a try

2lazy2chill commented 3 years ago

I solved my problem. removed the entry from the config, removed the plugin, sudo apt-get update, sudo apt-get upgrade. Reboot Plugin reinstalled, config entered, reboot.

If I enter "sudo apt-get update" within the Terminal of Homebridge, I only get:

/homebridge # sudo apt-get update
sudo: apt-get: command not found

How did you do this?

Martvvliet commented 3 years ago

I have since a few months the plugin in use again for myself and I haven't had any issue so far. @2lazy2chill did the fix from @Sungamm work?

I think you need to access the normal terminal and try the commands @Sungamm explained

2lazy2chill commented 3 years ago

@Martvvliet Yes, I tried it without the commands and it helped. Its running again, so thanks a lot for the help:-).

Mid99 commented 3 years ago

Hi, I am new to this and I am using HOOBS. Do you guys run the homebridge as root (sudo)? I read it in the manual that this is required but so far was not able to get it done in HOOBS. Thanks

Sungamm commented 3 years ago

Hi, I am new to this and I am using HOOBS. Do you guys run the homebridge as root (sudo)? I read it in the manual that this is required but so far was not able to get it done in HOOBS. Thanks

Hi,

yes I used the regular Homebridge (no Hoobs) as root.

Mid99 commented 3 years ago

Thanks, what have included in config.json to start it as root? Or is there an app that enables it?

Sungamm commented 3 years ago

I am running the homebridge itself as root. In one of the first steps I changed it from „pi“ to „root“. This avoid some problems with some plugins. That was a Tipp for beginner (as myself).

But I have no clue about the hoobs installation. Is there an option to run the homebridge itself as root?

Sungamm commented 3 years ago

Not 100% sure but I assume it was here

sudo nano /etc/default/homebridge

i used this setup description (but it’s German). Homebridge