hannseman / homebridge-mi-hygrothermograph

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

No discovery on macOS Monterey #163

Closed onderweg closed 7 months ago

onderweg commented 2 years ago

Noble does not discover any devices on macOS Monterey.

Expected Behavior

Bluetooth (Hygrothermograph) device is discovered by Noble.

Current Behavior

In the debug log, no more [Temperature & Humidity] messages after:

[11/9/2021, 7:16:32 PM] [Temperature & Humidity] Start scanning.
[11/9/2021, 7:16:32 PM] [Temperature & Humidity] Started scanning.

I added some logging to scanner.js and found that onDiscover is never called.

Steps to Reproduce (for bugs)

Versions

Probable cause

Issue #225 in github.com/abandonware/noble

hannseman commented 2 years ago

Thanks for looking into this. I'll keep an eye on the noble issue.

hannseman commented 2 years ago

Have you tried this https://github.com/abandonware/noble/issues/216#issuecomment-943290826?

onderweg commented 2 years ago

Yes

pavelkrcil commented 2 years ago

Hello, do you have any resolution on discover on Monterey? Thank you.

hannseman commented 2 years ago

@pavelkrcil unfortunately no. All we can do is is hope it get fixed ASAP. You can follow this issue: https://github.com/abandonware/noble/issues/225

onderweg commented 2 years ago

@pavelkrcil a workaround that might be possible to implement: https://github.com/abandonware/noble/issues/225#issuecomment-996619544

hannseman commented 2 years ago

Looks like this should be fixed now with MacOS 12.3: https://github.com/abandonware/noble/issues/225#issuecomment-1029335168

Can anyone confirm?

nzbrian commented 2 years ago

Still no discovery on Macos 12.3.1 for me. Adding bluetooth access for node as described also doesn't fix it https://github.com/abandonware/noble/issues/216

There's nothing in the debug logs beyond [Temperature & Humidity] Started scanning, as described in the initial issue log from 10 November 2021.

onderweg commented 2 years ago

For me discovery works now 👍

nzbrian commented 2 years ago

For me discovery works now 👍

Hi thanks @onderweg what kind of Mac are you using? Did you use System Preferences > Security & Privacy > Privacy > Bluetooth to allow /usr/local/bin/node ?

Are you using stock firmware on the LYWSD03MMC or a custom firmware, and if so with encryption or what settings please?

Keen to get this working

onderweg commented 2 years ago

Hi, I'm using a Mac. Mini M1, with Monetery 12.3. I did allow node in "System Preferences > Security & Privacy > Privacy > Bluetooth", although it's not clear to me if that's really necessary.

Are you using stock firmware on the LYWSD03MMC or a custom firmware

I'm using stock firmware

sptofu123 commented 2 years ago

I'm having trouble not getting discovery too. M1 mini on OS Monterey 12.4.

Logs just say: [6/19/2022, 1:16:31 AM] [Temperature & Humidity] Initializing Hygrotermograph accessory... [6/19/2022, 1:16:31 AM] [Temperature & Humidity] address option is not set. When running multiple sensors this will cause interference. See README for instructions.

Installed Xcode I did the Bluetooth access permission setting for Node,Npm, even terminal.

Tried both the original and custom firmware for LYWSD03MMC. Still no go.

UPDATE:

Got it working. Set Homebridge mDNS Advertiser to bonjour HAP. ( were using Ciao )