Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have one Thermometer in a weird state #67

Closed
JustDevZero opened this issue Mar 8, 2021 · 15 comments
Closed

I have one Thermometer in a weird state #67

JustDevZero opened this issue Mar 8, 2021 · 15 comments

Comments

@JustDevZero
Copy link

I tried last firmware and somehow the termometter is in weird state.

Telink flasher tells me the following:

1:26:14: Searching for devices
1:26:20: Connecting to: LYWSD03MMC
1:26:28: Detected custom Firmware
1:26:28: Detected alternative Firmware? Use: https://pvvx.github.io/ATC_MiThermometer/TelinkOTA.html

But If i try to see through Mi Home is still with 81.4 official.

I tried removing from Mi Home an adding again, but still the same.

Any ideas?

Thanks

@pvvx
Copy link
Owner

pvvx commented Mar 8, 2021

The official firmware uses the BLE name "LYWSD03MMC".
After flashing the custom firmware, you should have a device named "ATC_xxxx".
If the firmware is not complete, then the new device will not appear.


BLE device name can be changed at https://pvvx.github.io/ATC_MiThermometer/TelinkMiFlasher.html
If it was changed to "LYWSD03MMC", "bindkey" was restored, and "Encrypted Mi beacon" advertising mode was enabled, then the Xiaomi gateway can receive data from the thermometer...

@pvvx
Copy link
Owner

pvvx commented Mar 8, 2021

But If i try to see through Mi Home is still with 81.4 official.

"B1.4" - is the hardware version number.

@JustDevZero
Copy link
Author

JustDevZero commented Mar 9, 2021

Yeah, wrote 81.4 but it's B1.4.

If i try to connect though TellinkMiFlasher now shows the following:

2:08:03: Searching for devices
2:08:07: Connecting to: LYWSD03MMC
2:08:14: NotFoundError: No Services matching UUID 00010203-0405-0607-0809-0a0b0c0d1912 found in Device.
2:08:14: Reconnect 1 from 5
2:08:14: NotFoundError: No Services matching UUID 00010203-0405-0607-0809-0a0b0c0d1912 found in Device.
2:08:14: Reconnect 2 from 5
2:08:14: NotFoundError: No Services matching UUID 00010203-0405-0607-0809-0a0b0c0d1912 found in Device.
2:08:14: Reconnect 3 from 5
2:08:14: NotFoundError: No Services matching UUID 00010203-0405-0607-0809-0a0b0c0d1912 found in Device.
2:08:14: Reconnect 4 from 5
2:08:14: NotFoundError: No Services matching UUID 00010203-0405-0607-0809-0a0b0c0d1912 found in Device.
2:08:14: Reconnect 5 from 5
2:08:14: NotFoundError: No Services matching UUID 00010203-0405-0607-0809-0a0b0c0d1912 found in Device.
2:08:14: Something went wrong, to many reconnect's

Version hardware: B1.4
Firmware: 1.0.0_0109

I think something it's... fucked up :(

Weird thing its that Mi Home can identify it, and if I try through MiTemperature2 script i can get the data:

./LYWSD03MMC.py -d A4:C1:38:XX:XX:XX -r -b
Temperature: 19.4
Humidity: 76
Battery voltage: 2.97 V
Battery level: 87

Also, to adding weirdness it's like the battery it's dropping hella fast.

@rjblake
Copy link

rjblake commented Apr 6, 2021

@JustDevZero - not sure on the flashing, but I noticed on battery that my thermometers went from 100% down to 88% in the course of 7 days, but have only dropped another 1% over the next 1.5 months. Could be the nature of the CR2032 batteries.

@MacSass
Copy link

MacSass commented Apr 6, 2021

@JustDevZero - not sure on the flashing, but I noticed on battery that my thermometers went from 100% down to 88% in the course of 7 days, but have only dropped another 1% over the next 1.5 months. Could be the nature of the CR2032 batteries.

Uh, this is interesting - because I have seen the same with my LYWSD03MMC (Custom FW 1.7 still):

It was running at 84% battery for about 2 weeks - then suddenly it fell down to 70% from one day to the next (it stayed in the same location in my office - no change in environment). No connected device - only using advertising frams with 1.7 FW default settings.
From 70% it started crawling up again - about 1% every day up to 82%. Now it has been at 81% for about a week with no change. Somehow the battery measurement seems to have some funny flaws ...

@atc1441
Copy link

atc1441 commented Apr 6, 2021

The battery meassurement uses 3.1V as 100% but the battery is in reality 3V 100% this is done to have a better overview of how full the battery really is with just the % value

@MacSass
Copy link

MacSass commented Apr 6, 2021

Thanks, that should explain why we would never see 100% - but I was more interested to understand why it fell by 14% in on day and then started to creep up again ... nearly to the previous level.

@atc1441
Copy link

atc1441 commented Apr 6, 2021

If an ota update is made the voltage drops as the device is on the whole ota period, that will drain the voltage.

The battery recovers from this after a while

The % report is very direct from the battery without history calculations

@MacSass
Copy link

MacSass commented Apr 6, 2021

In my case it only dropped by 14% about 2 weeks after the OTA update - which I found strange.
But anyhow - I would not consider it so important at all ...

@atc1441
Copy link

atc1441 commented Apr 6, 2021

Yes, if the battery is empty the screen will be off, very simple^^

And if no direct connection is possible anymore the battery is low

@pvvx
Copy link
Owner

pvvx commented Apr 7, 2021

It may not be a battery drain, but a poor battery contact. This is observed on several thermometers.
Battery current and voltage are not sufficient to break through the oxide layer (potential barrier).
There is a voltage difference across the contacts, which collapses over time.

@pvvx
Copy link
Owner

pvvx commented Apr 7, 2021

The battery meassurement uses 3.1V as 100% but the battery is in reality 3V 100% this is done to have a better overview of how full the battery really is with just the % value

Some CR2032 batteries have an initial voltage of 3.3..3.4 V.
Because Li battery, it is possible to charge it. And the charge even of the old one is kept above 3.3V.

When an external capacitor is connected to a CR2032 battery on Xiaomi LYWSD03MMC, the readings usually increase from 2.7..2.8 V to 3+ V.

The recommended capacitors are only installed in the CGG1-M.
LYWSD03MMC and MHO-C401 have no capacitors installed, but there are places to solder them. Such savings lead to the use of only half the battery charge and there is no way to raise the RF output power more 0 dB ...

#69 (comment)

@daniel88ferreira
Copy link

Does someone has an idea on what can be done to fix this?

I can confirm that now, through TellinkMiFlasher, I'm getting "No Services matching UUID 00010203-0405-0607-0809-0a0b0c0d1912 found in Device."

But, I can still pair the with Mi Home and I can also get the temp and humidity values using, for example, this. So the device is advertising unencrypted values. Also the device name is still LYWSD03MMC not ATC_xxxx.

Thanks in advance!

@daniel88ferreira
Copy link

daniel88ferreira commented Oct 8, 2021

never mind, suddenly, after a day or so, the thermometer started working properly with the stock firmware, then I was able to fetch the beacon encryption key and again, it's working fine ... weird.

@AgenttiX
Copy link

I was having a similar issue, and the reason turned out to be that the Telink Flasher or the LYWDS03MMC device was somehow not compatible with my laptop. Then I tried reflashing with my phone, and the custom firmware works as expected.

Right after unboxing my LYWSD03MMC, I tried to use Telink Flasher on my desktop that has an Asus motherboard with integrated Bluetooth. However, the flasher only found other unrelated devices in my home and not the LYWDS03MMC, so I moved to my laptop, where I ran Telink Flasher to update the device to the custom firmware. The device was found, activated and flashed to the custom firmware 3.2 successfully, which took about a minute. However, once the device was flashed, after a reconnect no configuration options appeared, but instead I was only getting the status as "Detected alternative Firmware? TelinkOTA" and the following messages:

- Connecting to: LYWSD03MMC
- Detected custom Firmware
- Detected alternative Firmware? Use: https://pvvx.github.io/ATC_MiThermometer/TelinkOTA.html

The device did change its Bluetooth name to start with "ATC_", though. Interestingly the TelinkOTA flasher still works, and once I flashed the LYWSD03MMC Original Firmware v1.0.0_0109, the device was again visible as a LYWDS03MMC. The Telink Flasher still gave the same error, but I was able to connect the device to the Mi Home Android app and update the firmware to 1.30. However, now that the device had the latest official firmware, I could no longer use TelinkOTA to install the custom firmware. The installation proceeded normally, but the Bluetooth name of the device did not change.

I also tested the same procedure with another LYWSD03MMC, as I bought a pack of four, and I was able to successfully flash back and forth between the custom firmware 3.1 and the official firmware 1.09 using the TelinkOTA on my laptop. However, both of these gave the same errors above when trying to configure them with the Telink Flasher.

Then I tried using my OnePlus 6 for the flashing, and with it everything works as expected for all the four devices. If I try to connect to the newly flashed devices with my laptop, I again get the same error.

Here's some info for debugging:

  • SKU: NUN4106CN
  • Manufacturing date: 2021.04
  • Laptop: Lenovo ThinkPad T480 (integrated Intel Bluetooth)
  • Operating system: Kubuntu 21.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants