hannseman / homebridge-mi-hygrothermograph

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

if there is no internet from the provider the plugin overloads the homebridge #167

Closed xrust83 closed 2 years ago

xrust83 commented 2 years ago

why does the plugin access the internet to work? When the Internet disappears, the plugin begins to cyclically overload my home bridge, because of this, other devices in the house stop working

Expected Behavior

Еhe bridge must continue to operate

Current Behavior

If the Internet goes missing, the plugin cyclically overloads the homebridge

Steps to Reproduce (for bugs)

turn off WAN

Versions

homebridge 1.3.8 homebridge-mi-hygrothermograph@3.1.0 node 16.13.0 RPI 3B+

Configuration

        {
            "comment": "-------------------------  BEDROOM : SENSOR  -------------------------",
            "name": "Temperature & Humidity",
            "address": "58:xx:xx:xx:56:c9",
            "temperatureName": "Temperature Sensor-56c9",
            "humidityName": "Humidity Sensor-56c9",
            "fakeGatoEnabled": false,
            "timeout": 15,
            "forceDiscovering": true,
            "forceDiscoveringDelay": 2500,
            "disableBatteryLevel": false,
            "lowBattery": 10,
            "temperatureOffset": 0,
            "humidityOffset": 0,
            "accessory": "Hygrotermograph"
        },

Homebridge Log / Command Output


[02/12/2021, 10:46:11] ---
[02/12/2021, 10:46:11] Loaded plugin: homebridge-mi-hygrothermograph@3.1.0
[02/12/2021, 10:46:11] ====================
[02/12/2021, 10:46:11] ERROR INITIALIZING PLUGIN homebridge-mi-hygrothermograph:
[02/12/2021, 10:46:11] Error: The module '/usr/local/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 83. This version of Node.js requires
NODE_MODULE_VERSION 93. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1183:18)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/bluetooth-hci-socket/lib/native.js:6:15)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
[02/12/2021, 10:46:11] ====================
[02/12/2021, 10:46:11] ---
[02/12/2021, 10:46:20] Loaded plugin: homebridge-mqttthing@1.1.34
[02/12/2021, 10:46:20] Registering accessory 'homebridge-mqttthing.mqttthing'
[02/12/2021, 10:46:20] ---
hannseman commented 2 years ago

This plugins does not connect to internet, you're free to read the source code. The error you're pasting is totally unrelated to anything about network connections. It clearly states that you installed this plugin against an older Node.js version and you need to reinstall it against the new Node.js that you've installed. See https://github.com/hannseman/homebridge-mi-hygrothermograph/issues/124 for details.