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

Xiaomi Sensors not working correctly #11

Open
DennisOtt-git-hub opened this issue Aug 16, 2021 · 2 comments
Open

Xiaomi Sensors not working correctly #11

DennisOtt-git-hub opened this issue Aug 16, 2021 · 2 comments

Comments

@DennisOtt-git-hub
Copy link

I installed your program to a RasPi 0W because I wanted to test some new Govee H5074s. I already had 8 Xiaomi LYWD03MMCs and 8 LYWDCGQs, so when I saw the program also supported the ATC version I went out to ATC1441 GitHub and reflashed the LYWD03MMCs with the latest firmware. When I started test ing though I was disappointed to see that while the Govees reported correctly none of my Xiaomis did. I looked through the code to see if I could easily determine why the mapping was incorrect but I couldn't successfully build a test bed to replicate the bitwise operations on the broadcast packets and it's been too long since my Assembler days to resurrect that skill. So I was not able to figure out how to correctly map the transmissions. I know it's set up correctly because the Govees report and I have interfaced them with my HA instance through MQTT.

I was able to add username and password for MQTT authentication (because I don't use any annonomous access).

I assume that this worked for you on some version of this firmware. I guess there is a possibility that the ATC1441 firmware has changed the broadcast formats. Any way to verify that? I am not likely to go refresh with a back-version of the firmware.

@deepcoder
Copy link
Owner

Glad you are finding some use for this code. Apologies, I have not looked at it in a long time, one of those things, I got it working and just froze it. Yes, there has been quite a lot of activity around the LYWSD03MMC since I flashed my units. Not surprising that one of this changes broke my code, as my code is not very robust. Attached below is the firmware version that I am using from:
https://github.com/atc1441/ATC_MiThermometer

I know you said that you did not want to go back to older firmware, but perhaps if you can flash one unit with this older firmware and then dump the advertising packets from this unit and a unit with newer firmware, you might be able to see where differences in advertising packets are causing issues. The code I wrote has a 'dump' function or you can use other BLE dump tools:
https://github.com/deepcoder/bluetooth-temperature-sensors#dumping-raw-advertising-packets-to-console

Also below are some of my notes on the options I set on the LYWSD03MMC units

202011260942
yesterday 2020-nov-25
received 8 more LYWSD03MMC units


202011251458
this is the .bin file I have used for all the units to day:
Nov 10, 2020

202011251457
setting:

14:34:26: Settings A0 was send successful Smily off
14:34:37: Settings AE was send successful Custom Advertising
14:34:45: Settings FF was send successful Display F
14:34:54: Settings B1 was send successful Show battery level
14:35:04: Settings FE06 was send successful Advertising Interval 1 minute

ATC_Thermometer.bin.zip

@johnnyfleet
Copy link

I don't know if this helps, but I've been able to successfully use the Xaiomi LYWSD03MMC units with
https://pvvx.github.io/ATC_MiThermometer/TelinkMiFlasher.html firmware and the transmission set to ATC1441

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

3 participants