1.7.2 • Published 3 years ago

homebridge-mijia-thermometer v1.7.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

Homebridge Mijia Thermometer Plugin

npm github license donate donate-alipay

This is a Homebridge plugin to provide for Xiaomi Mijia Thermometer(specifically LYWSD03MMC).

If you like this plugin, don't hesitate to "Star".

Installation

sudo npm i -g homebridge-mijia-thermometer@latest

These libraries and their dependencies are required by the Noble library and provide access to the kernel Bluetooth subsystem:

Ubuntu/Debian/Raspbian

sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev

Fedora/CentOS/Other-RPM based

sudo yum install bluez bluez-libs bluez-libs-devel
sudo yum install systemd-devel
sudo yum provides */libudev.h

For more detailed information and descriptions for other platforms please see the Noble documentation.

Configuration

Configuration on Homebridge Config UI X is supported.

Alternatively, you could update your Homebridge config.json file according to these parameters.

KeyDefault
accessoryMijiaThermometerRequired. The name of this plugin.
nameThermometerRequired. The name of this accessory. This will appear in your Home app.
addressa0:c1:0c:d4:e1:6bRequired. The address of the device.
humidityName"Humidity"Optional. Name of the humidity sensor as it will appear in your Home app.
temperatureName"Temperature"Name of the temperature sensor as it will appear in your Home app.
lowBattery10At what battery percentage Homekit should start warning about low battery.
temperatureOffset0An offset to apply to temperature values for calibration if measured values are incorrect.
humidityOffset0An offset to apply to humidity values for calibration if measured values are incorrect.
bindKeyA key which is used to for firmware.

Automatically Retrieved Model, Serial Number and Firmware Revision

Version 1.6 supports to retrieve model, serial number and firmware revision via BLE advertisement.

Since information service is initialized before the Bluetooth scanner, so the information retrieved is cached into a file (stored at '~/.homebridge/.MijiaThermometer/') that will be loaded at the SECOND boot. So in order to make sure this function works well, it is highly suggested to reboot Homebridge after your device is connected and four of these following messages have been displayed in console.

Device Info cached!

Tested On

  • iOS 15
  • Apple Home
  • Homebridge 1.3.4 ( running on Centos 8 with Bluetooth Chip RTL8761B )

Other issues

Running without root/sudo (Linux-specific)

Run the following command:

sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)

This grants the node binary cap_net_raw privileges, so it can start/stop BLE advertising.

Using Bluetooth 5.0 USB Dongle with RTL8761B chipset on Linux kernel 5.10

Tutorial is listed in this git.

Troubleshooting

If you have any issue, contact me(f.tu@me.com) or just submit an issues.

1.7.2

3 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.3

3 years ago

1.4.1

3 years ago

1.2.0

3 years ago

1.0.5-beta.0

3 years ago

1.0.4-beta.0

3 years ago

1.0.3-beta.0

3 years ago

1.0.2-beta.0

3 years ago