asednev / homebridge-plugin-govee

Govee H-series Thermometer Hygrometer plugin for Homebrige.
Apache License 2.0
53 stars 9 forks source link

No sensor found #38

Closed jpfelgueiras closed 2 years ago

jpfelgueiras commented 3 years ago

Describe Your Problem: The plug-in was installed without any problems and the log on the plug-in and homebridge are enabled. Waited more then 15m and no sensor was found

Logs:


[18/07/2021, 11:34:01] [HB Supervisor] Starting Homebridge with extra flags: -I -D
[18/07/2021, 11:34:01] [HB Supervisor] Started Homebridge v1.3.4 with PID: 1971
Initializing HAP-NodeJS v0.9.4...
[18/07/2021, 11:34:16] Loaded config.json with 0 accessories and 2 platforms.
[18/07/2021, 11:34:17] Loaded 0 cached accessories from cachedAccessories.
[18/07/2021, 11:34:17] ---
[18/07/2021, 11:34:33] Loaded plugin: homebridge-config-ui-x@4.41.1
[18/07/2021, 11:34:33] Registering platform 'homebridge-config-ui-x.config'
[18/07/2021, 11:34:34] ---
[18/07/2021, 11:34:36] Loaded plugin: homebridge-plugin-govee@1.1.2
[18/07/2021, 11:34:36] Registering platform 'homebridge-plugin-govee.GoveeHomebridgePlugin'
[18/07/2021, 11:34:36] ---
[18/07/2021, 11:34:36] Loading 2 platforms...
[18/07/2021, 11:34:36] [Config] Initializing config platform...
[18/07/2021, 11:34:36] [Config] Running in Service Mode
[18/07/2021, 11:34:36] [Govee] Initializing GoveeHomebridgePlugin platform...
[18/07/2021, 11:34:36] [Govee] Initializing child bridge XX:XX:XX:XX:XX:XX
Preparing Advertiser for 'Homebridge 91CD 96F7' using bonjour-hap backend!
Setup Payload:
X-HM://0023UZ3SSG4VW
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ XXX-XX-XXX │     
    └────────────┘     

Starting to advertise 'Homebridge 91CD 96F7' using bonjour-hap backend!
[18/07/2021, 11:34:37] Homebridge v1.3.4 (Homebridge 91CD) is running on port 51272.
Initializing HAP-NodeJS v0.9.4...
[18/07/2021, 11:35:01] [Govee] Launched child bridge with PID 1998
[18/07/2021, 11:35:04] Registering platform 'homebridge-plugin-govee.GoveeHomebridgePlugin'
[18/07/2021, 11:35:05] [Govee] Loaded homebridge-plugin-govee v1.1.2 child bridge successfully
[18/07/2021, 11:35:05] Loaded 0 cached accessories from cachedAccessories.0E44CC7E8483.
[18/07/2021, 11:35:05] [Govee] Finished initializing platform: Govee
Preparing Advertiser for 'Govee A4CF' using bonjour-hap backend!
[18/07/2021, 11:35:06] [Govee] Executed didFinishLaunching callback
[18/07/2021, 11:35:06] [Govee] Start discovery
Starting to advertise 'Govee A4CF' using bonjour-hap backend!
[18/07/2021, 11:35:06] Homebridge v1.3.4 (Govee) is running on port 37348.

Plugin Config:


        {
            "name": "Govee",
            "batteryThreshold": 20,
            "debug": true,
            "humidityOffset": 0,
            "platform": "GoveeHomebridgePlugin",
            "_bridge": {
                "username": "0E:44:CC:7E:84:83",
                "port": 37348
            }
        }

Environment:

asednev commented 3 years ago

@jpfelgueiras what is the model of your Govee device?

jpfelgueiras commented 3 years ago

I have 2 H5102 and 2 H5075

asednev commented 3 years ago

A couple of things that could be wrong come to mind. Great way to troubleshoot is to go one layer deeper into the library used by this homebridge plugin.

Clone https://github.com/asednev/govee-bt-client/

Then, run the following commands and provide console output.

$ cd govee-bt-client
$ npm install
$ npm run dev
jpfelgueiras commented 3 years ago

Dose this output help?

`

pi@homebridge:~/govee-bt-client $ npm install

usb@1.6.3 install /home/pi/govee-bt-client/node_modules/usb prebuild-install --verbose || node-gyp rebuild

prebuild-install info begin Prebuild-install version 5.3.6 prebuild-install info looking for cached prebuild @ /home/pi/.npm/_prebuilds/cd9f6c-usb-v1.6.3-node-v83-linux-arm.tar.gz prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.6.3/usb-v1.6.3-node-v83-linux-arm.tar.gz prebuild-install http 404 https://github.com/tessel/node-usb/releases/download/v1.6.3/usb-v1.6.3-node-v83-linux-arm.tar.gz prebuild-install WARN install No prebuilt binaries found (target=14.17.6 runtime=node arch=arm libc= platform=linux) gyp WARN EACCES current user ("pi") does not have permission to access the dev dir "/home/pi/.cache/node-gyp/14.17.6" gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp" make: Entering directory '/home/pi/govee-bt-client/node_modules/usb/build' CC(target) Release/obj.target/libusb/libusb/libusb/core.o CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o CC(target) Release/obj.target/libusb/libusb/libusb/io.o CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o CC(target) Release/obj.target/libusb/libusb/libusb/sync.o CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o AR(target) Release/obj.target/usb.a COPY Release/usb.a CXX(target) Release/obj.target/usb_bindings/src/node_usb.o In file included from ../src/helpers.h:3, from ../src/node_usb.h:21, from ../src/node_usb.cc:1: ../node_modules/nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker)': ../node_modules/nan/nan.h:2232:62: warning: cast between incompatible function types from 'void ()(uv_work_t)' {aka 'void ()(uv_work_s)'} to 'uv_after_work_cb' {aka 'void ()(uv_work_s, int)'} [-Wcast-function-type] , reinterpret_cast(AsyncExecuteComplete) ^ In file included from ../src/node_usb.h:14, from ../src/node_usb.cc:1: ../src/node_usb.cc: At global scope: /tmp/.node-gyp/14.17.6/include/node/node.h:758:43: warning: cast between incompatible function types from 'void ()(v8::Local)' to 'node::addon_register_func' {aka 'void ()(v8::Local, v8::Local, void)'} [-Wcast-function-type] (node::addon_register_func) (regfunc), \ ^ /tmp/.node-gyp/14.17.6/include/node/node.h:792:3: note: in expansion of macro 'NODE_MODULE_X' NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage) ^~~~~ ../src/node_usb.cc:95:1: note: in expansion of macro 'NODE_MODULE' NODE_MODULE(usb_bindings, Initialize) ^~~ ../src/node_usb.cc: In function 'void handleHotplug(std::pair<libusb_device, libusb_hotplug_event>)': ../src/node_usb.cc:151:58: warning: 'v8::Local Nan::MakeCallback(v8::Local, const char, int, v8::Local)' is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(Nan::New(hotplugThis), "emit", 2, argv); ^ In file included from ../src/helpers.h:3, from ../src/node_usb.h:21, from ../src/node_usb.cc:1: ../node_modules/nan/nan.h:1001:46: note: declared here NAN_DEPRECATED inline v8::Local MakeCallback( ^~~~ ../src/node_usb.cc:151:58: warning: 'v8::Local Nan::MakeCallback(v8::Local, const char, int, v8::Local)' is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(Nan::New(hotplugThis), "emit", 2, argv); ^ In file included from ../src/helpers.h:3, from ../src/node_usb.h:21, from ../src/node_usb.cc:1: ../node_modules/nan/nan.h:1001:46: note: declared here NAN_DEPRECATED inline v8::Local MakeCallback( ^~~~ In file included from ../src/node_usb.h:12, from ../src/node_usb.cc:1: /tmp/.node-gyp/14.17.6/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]': /tmp/.node-gyp/14.17.6/include/node/node_object_wrap.h:85:78: required from here /tmp/.node-gyp/14.17.6/include/node/v8.h:10874:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo::Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} to 'Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} [-Wcast-function-type] reinterpret_cast(callback), type); ^~~~~~~~ /tmp/.node-gyp/14.17.6/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]': ../node_modules/nan/nan_object_wrap.h:65:61: required from here /tmp/.node-gyp/14.17.6/include/node/v8.h:10874:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo::Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} to 'Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} [-Wcast-function-type] CXX(target) Release/obj.target/usb_bindings/src/device.o In file included from ../src/helpers.h:3, from ../src/node_usb.h:21, from ../src/device.cc:1: ../node_modules/nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker)': ../node_modules/nan/nan.h:2232:62: warning: cast between incompatible function types from 'void ()(uv_work_t)' {aka 'void ()(uv_work_s)'} to 'uv_after_work_cb' {aka 'void ()(uv_work_s, int)'} [-Wcast-function-type] , reinterpret_cast(AsyncExecuteComplete) ^ ../src/device.cc: In member function 'void Req::submit(Device, v8::Local, uv_work_cb, uv_work_cb)': ../src/device.cc:220:70: warning: cast between incompatible function types from 'uv_work_cb' {aka 'void ()(uv_work_s)'} to 'uv_after_work_cb' {aka 'void ()(uv_work_s, int)'} [-Wcast-function-type] uv_queue_work(uv_default_loop(), &req, backend, (uv_after_work_cb) after); ^~~~~ ../src/device.cc: In static member function 'static void Req::default_after(uv_work_t)': ../src/device.cc:237:64: warning: 'v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)' is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(device, Nan::New(baton->callback), 1, argv); ^ In file included from ../src/helpers.h:3, from ../src/node_usb.h:21, from ../src/device.cc:1: ../node_modules/nan/nan.h:959:46: note: declared here NAN_DEPRECATED inline v8::Local MakeCallback( ^~~~ ../src/device.cc:237:64: warning: 'v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)' is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(device, Nan::New(baton->callback), 1, argv); ^ In file included from ../src/helpers.h:3, from ../src/node_usb.h:21, from ../src/device.cc:1: ../node_modules/nan/nan.h:959:46: note: declared here NAN_DEPRECATED inline v8::Local MakeCallback( ^~~~ In file included from ../src/node_usb.h:12, from ../src/device.cc:1: /tmp/.node-gyp/14.17.6/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]': /tmp/.node-gyp/14.17.6/include/node/node_object_wrap.h:85:78: required from here /tmp/.node-gyp/14.17.6/include/node/v8.h:10874:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo::Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} to 'Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} [-Wcast-function-type] reinterpret_cast(callback), type); ^~~~~~~~ /tmp/.node-gyp/14.17.6/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]': ../node_modules/nan/nan_object_wrap.h:65:61: required from here /tmp/.node-gyp/14.17.6/include/node/v8.h:10874:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo::Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} to 'Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} [-Wcast-function-type] CXX(target) Release/obj.target/usb_bindings/src/transfer.o In file included from ../src/helpers.h:3, from ../src/node_usb.h:21, from ../src/transfer.cc:1: ../node_modules/nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker)': ../node_modules/nan/nan.h:2232:62: warning: cast between incompatible function types from 'void ()(uv_work_t)' {aka 'void ()(uv_work_s)'} to 'uv_after_work_cb' {aka 'void ()(uv_work_s, int)'} [-Wcast-function-type] , reinterpret_cast(AsyncExecuteComplete) ^ ../src/transfer.cc: In function 'void handleCompletion(Transfer)': ../src/transfer.cc:126:72: warning: 'v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)' is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(self->handle(), Nan::New(self->v8callback), 3, argv); ^ In file included from ../src/helpers.h:3, from ../src/node_usb.h:21, from ../src/transfer.cc:1: ../node_modules/nan/nan.h:959:46: note: declared here NAN_DEPRECATED inline v8::Local MakeCallback( ^~~~ ../src/transfer.cc:126:72: warning: 'v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)' is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(self->handle(), Nan::New(self->v8callback), 3, argv); ^ In file included from ../src/helpers.h:3, from ../src/node_usb.h:21, from ../src/transfer.cc:1: ../node_modules/nan/nan.h:959:46: note: declared here NAN_DEPRECATED inline v8::Local MakeCallback( ^~~~ In file included from ../src/node_usb.h:12, from ../src/transfer.cc:1: /tmp/.node-gyp/14.17.6/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]': /tmp/.node-gyp/14.17.6/include/node/node_object_wrap.h:85:78: required from here /tmp/.node-gyp/14.17.6/include/node/v8.h:10874:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo::Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} to 'Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} [-Wcast-function-type] reinterpret_cast(callback), type); ^~~~~~~~ /tmp/.node-gyp/14.17.6/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]': ../node_modules/nan/nan_object_wrap.h:65:61: required from here /tmp/.node-gyp/14.17.6/include/node/v8.h:10874:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo::Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} to 'Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} [-Wcast-function-type] SOLINK_MODULE(target) Release/obj.target/usb_bindings.node COPY Release/usb_bindings.node make: Leaving directory '/home/pi/govee-bt-client/node_modules/usb/build'

@abandonware/bluetooth-hci-socket@0.5.3-7 install /home/pi/govee-bt-client/node_modules/@abandonware/noble/node_modules/@abandonware/bluetooth-hci-socket node-pre-gyp install --fallback-to-build

sh: 1: node-pre-gyp: not found npm WARN govee-bt-client@1.0.11 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.1 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/bluetooth-hci-socket@0.5.3-7 (node_modules/@abandonware/noble/node_modules/@abandonware/bluetooth-hci-socket): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/bluetooth-hci-socket@0.5.3-7 install: node-pre-gyp install --fallback-to-build npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn ENOENT

audited 592 packages in 1324.329s

28 packages are looking for funding run npm fund for details

found 3881 vulnerabilities (210 moderate, 3671 high) run npm audit fix to fix them, or npm audit for details pi@homebridge:~/govee-bt-client $ npm run dev

govee-bt-client@1.0.11 dev /home/pi/govee-bt-client rimraf ./dist && tsc && node dist/example.js

internal/modules/cjs/loader.js:892 throw err; ^

Error: Cannot find module '@abandonware/bluetooth-hci-socket' Require stack:

npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2021-09-03T14_45_50_007Z-debug.log

`