hannseman / homebridge-mi-hygrothermograph

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

No data from LYWSD03MMC #189

Open DanielHauer opened 1 year ago

DanielHauer commented 1 year ago

I tried to connect a LYWSD03MMC, but I don't get any data.

The device shows up (after adding it with its MAC), I see a field for temp, hum, battery, but there is no valid data (all "0") and Home says that there is no contact to the sensor. I can't see any error in the homebrige logs, at the start it simply says "[TestName] Initializing Hygrotermograph accessory..." and continues without error.

As I had the problem when using a bind-key, I installed the firmware from https://github.com/atc1441/ATC_MiThermometer ( Release 78) and removed the bind-key, but have still the same behavior.

Any ideas? I can connect to the sensor (e.g. with https://atc1441.github.io/TelinkFlasher.html) and see correct values.

Versions

Holborn13200 commented 1 year ago

I have the same problem but slightly different. I have several sensors (6 exactly). One of my sensors has reached the end of its battery life. It stayed off for some time and after battery replacement, the values did not come up in homebridge. I made a new flash but still no values received (the others are well supplied with values) .

ftorres83 commented 1 year ago

Hi, i´ve exactly the same problem and did the same steps and i can´t receive data from sensors.

Holborn13200 commented 1 year ago

Hello, I have solved my problem. For this sensor I don't use custom firmware but only the stock (restored) firmware. I synchronized the sensor with MiHome app and used this tool https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor to find the current bindKey. I replace it on JSON config and done! Data come again on homebridge :)

xb4rt commented 1 year ago

Hi, I've solved this problem for custom firmware i.e. https://github.com/pvvx/ATC_MiThermometer In config you can choose Advertising type: pvvx / ATC1441/ MIJIA (MiHome) /BTHome v1 In order Tt work with homebridge it should be set to MIJA.

malyszm commented 1 year ago

@xb4rt - thanks, you’ve helped me solve this issue for me!

IMO the instructions for adding this are not clear, especially that currently pvvx has the more advanced custom firmware and doesn’t seem to think about homebridge/homekit too much. So what did the trick for me was:

  1. Flash the firmware to custom as per pvvx’s git (4.2)
  2. Change the advertising type to mijia (separate change in the config that can be done through the flasher)
  3. Erase all the Mi Keys (separate change in the config) Then homebridge started seeing temperature and humidity.