hannseman / homebridge-mi-hygrothermograph

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

Guide: Install LYWSD03MMC in macOS #127

Closed MontroseSt closed 3 years ago

MontroseSt commented 3 years ago

I had problems receiving bluetooth data from the LYWSD03MMC on a MacBook with macOS Big Sur and Homebridge being installed. So I wanted to share my experience here

  1. Install Xcode
  2. install the homebridge-mi-hygrothermograph plugin. When using the Homekit UI plugin noble will automatically be installed
  3. Here comes the important part: In macOS got to Preferences -> Security & Privacy -> Bluetooth and allow "node" bluetooth access. In my case node was located in usr/local/include/ Screen Shot 2020-12-27 at 2 48 19 PM
  4. Reboot Homebridge and you should receive data from the hygrothermograph from now on (check Homebridge logs with debug mode enabled)

The above steps were required to get the plugin up and running in Big Sur.

Catalina does not have any Bluetooth settings in "Security & Privacy". However, to make the plugin receive data in Catalina I needed to reset my bluetooth settings (Press Option+Shift and clíck on Bluettoth Icon in the menu bar -> Select "Debug" in drop-down menu -> "Reset Bluetooth"

hannseman commented 3 years ago

Many thanks for this guide! I'm going to close this issue as it'll be easier for me to have as few issue open as possible. I've added a link to this issue in the README: https://github.com/hannseman/homebridge-mi-hygrothermograph#macos

kahuitel commented 2 years ago

Hello,

It seems that Apple broken something since Monterey, Homebridge wont scan for devices.

Here is my conf :

{ "bridge": { "name": "Homebridge 9657", "username": "xx:xx:xx:xx:xx:xx", "port": 51220, "pin": "xxx-xx-xxx" }, "accessories": [ { "name": "Temperature & Humidity", "temperatureName": "Temperature", "humidityName": "Humidity", "fakeGatoEnabled": false, "timeout": 15, "forceDiscovering": false, "forceDiscoveringDelay": 2500, "disableBatteryLevel": false, "lowBattery": 10, "temperatureOffset": 0, "humidityOffset": 0, "accessory": "Hygrotermograph", "_bridge": { "username": "xx:xx:xx:xx:xx:xx", "port": 54243 } } }

Here is my log :

[1/6/2022, 11:45:34 AM] Homebridge v1.3.9 (HAP v0.9.8) (Homebridge 9657) is running on port 51220. [1/6/2022, 11:45:34 AM] [Temperature & Humidity] Launched child bridge with PID 3385 [1/6/2022, 11:45:36 AM] Registering accessory 'homebridge-mi-hygrothermograph.Hygrotermograph' [1/6/2022, 11:45:36 AM] [Temperature & Humidity] Loaded homebridge-mi-hygrothermograph v3.1.0 child bridge successfully [1/6/2022, 11:45:36 AM] [Temperature & Humidity] address option is not set. When running multiple sensors this will cause interference. See README for instructions. [1/6/2022, 11:45:36 AM] [Temperature & Humidity] Initialized accessory [1/6/2022, 11:45:36 AM] Publishing bridge accessory (name: Temperature & Humidity, publishInfo: { username: 'xx:xx:xx:xx:xx:xx', port: 54243, pincode: '***-**-***', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'bonjour-hap' }). [1/6/2022, 11:45:36 AM] Homebridge v1.3.9 (HAP v0.9.8) (Temperature & Humidity) is running on port 54243. [1/6/2022, 11:45:36 AM] [Temperature & Humidity] Start scanning. [1/6/2022, 11:45:36 AM] [Temperature & Humidity] Started scanning.

Then nothing happens.

See related article here : [https://giters.com/abandonware/noble/issues/225]

hannseman commented 2 years ago

@kahuitel yes this is a known issue. Follow https://github.com/hannseman/homebridge-mi-hygrothermograph/issues/163 for any updates.