-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
LYWSD03MMC support (implemented since 0.6.0) #7
Comments
Have you checked: https://habr.com/ru/post/452558/ (if needed google translate do good work) I have LYWSD02 and here is what it sending: hcidump --raw | grep -v "3F 58 70"
|
Sorry, this capture have this "all ready" supported (round one) sensor on the range... But you can easily filter it away... https://www.dropbox.com/s/kbk98bzyue84fu5/dump.txt?dl=0 Values where 33% and 26,7C thru whole capture time. |
Russian is my native language ) Yes, I saw this article. The fact is that its author uses a connection to the sensor. This is not our method ) We parse broadcast data, which greatly saves battery power and gives other pluses as a result from processing a continuous data stream (look at the description of the use_median option in readme.md, for example). |
Yes, I know that you use a different method, but of course, received data should be at same format. So if you can "inject" those hcidump results to your code, you should see if your code works. Hopefully, my dumps help... |
I just found another model that seems to be fairly new: LYWSD03MMC |
I think, the component is pretty stable for public beta #7
I pushed pre-release with other sensors support. Installation in HACS is also available if you enable "Show betas" on the integration page. |
I can only confirm that the original sensor still works fine with the new code. I new attributes (rssi and sensor type are also available). I don't have any of the other sensors, so cannot test that. If you are finished, I can do a final review if you want. But you have to make a PR than. |
There is still work to do after we have MiFlora dump - at least new classes for its sensors will be needed. While I would not like to do PR in the master. Plus there are a few more details that I would like to correct before being released to the master. After that, of course, we will do everything right. |
Thank you! I can confirm that LYWSD02 works perfectly! |
I wonder if it's this model? If so, I have one on the way - happy to share a dump of its data once it arrives (unless someone else beats me to it). |
Looks like.. As it says there: Brand | XIAOMI Mijia |
I noticed that the LYWSD02 and 03 sensors do not show the battery status on the display... And the fact is that 02 does not broadcast it. Curious, will 03 do it? P.S. Tomorrow I expect to get a MiFlora sensor, and on the weekend I plan to finish with its full support. |
I just pushed v0.4.0-beta.2 pre-release with MiFlora full support. |
Can you mention in documentation (in README), how often devices are broadcasting the sensors value? Based on your investigation you probably know it. :-) It will be also great to mention, that the broadcasting interval is fixed (cannot be changed). I am asking for this info, because my LYWSDCGQ is reporting every minute - and I am confused if it is correct default behavior, or it will drain the baterry fast. |
Do you mean the interval the data is updated in Home Assistant? This is mentioned in the README and is a setting (period) Period So, yes, 1 minute is default, but you can change it if you want. Or do you mean the interval the actual sensor sends out it's data? I don't think you can change the interval LYWSDCGQ is actually sending data, am I right @Magalex2x14 ? |
But as I understand, this ... I am asking for documentation of BLE data broadcasting intervals. |
It may still be worthwhile to clarify the sensor broadcast interval and the component measurement period (period option)... For example, my three LYWSDCGQs send 20-25 unique messages at RSSI -75 ..- 70 dBm. With the option period = 60, the component accumulates 20-25 messages received per minute, and after the period expires, averages them and updates the sensor status in HA. The period does not affect the consumption of the sensor. It only affects the HA sensor update rate and the number of averaged values. P.S. Ernst is wright, we can't change sensor broadcasting interval. |
Why not... I'm sure of the broadcast interval LYWSDCGQ and MiFlora that I have. For the rest, statistics from users are needed (especially since the sensor attributes have the number of received packets for the measurement period - "last mean of" or "last median of"). |
@Magalex2x14 In the README (first section), you mentioned the following:
Not sure if this is correct |
Yes, that’s true, but not quite. In fact, it sends about every second, but not all packets contain measurements, and, as it turned out in the case of MiFlora, not all of them are unique... We need to change the wording, yes... |
I tried to check the "last mean of" value, but I now see I have the same issue as in #12. The sensor had stopped yesterday. Apparently not a dead battery, as I thought yesterday. |
Ok, did a check.
|
Yep, got this working too - on a set of 3 LYWSD03MMCs, with a Rasp Pi 3. Thanks @Magalex2x14 ! |
Hello, I use a RPI4 with hassio, already found the bindkey using the vevs mi home app, inserted data in my configuration.yaml, waited more than 1 hour but still no sign of the sensor in HA
I'm not able to run the sudo setcap command but i'm running hassio so I think it's normal.
any idea of what I miss ? Thanks ! |
@vevsvevs And please add to this note that you have to create these folders (vevs/logs) yourself, before pairing. I spent 2 hours smashing my head against a wall, but now I have my keys! |
Hi, |
There is not. It's an encryption key so the whole point is to keep it private. Just use the modified app and follow the instructions to create the folders. Once you're done then you can uninstall the app. |
You are awesome, thank you for saving my time :-) I spend only hour until i find yours comment. |
Also you need to fully restart (force stop) the modded app if you've created |
There is now a very easy way to get the bind key, see mKeRix/room-assistant#277 |
I have the same issue too. Firmware:1.0.0_0109. Hardware is: LYWSD03MMC |
Just use TelinkFlasher web interface from here https://github.com/atc1441/ATC_MiThermometer |
You need to find the bind_key not the token. |
@vevsvevs And please add to this note that in the MiHome mod you have to navigate to Profile -> Experimental features, then turn on |
Added your notes to the faq, thanks. |
What is the full path of vevs/logs? |
@vevsvevs Hello i have downloaded the new version of modded xiaomi home but now the vaccum log are not in /vevs/logs/mio but in /vevs/logs/rcptalk and i cant see anymore the action "aiid":3 for retrieve my room ids. ANy suggetions? |
After a deeper study of the information available on the Internet, it seems that there is hope for the implementation of support for other sensors (as far as I understand, support for sensors with a method similar to ours is implemented in ESPHome). In addition to the already implemented work with LYWSDCGQ, I talk about:
LYWSD02(rectangular body, E-Ink) - dump received, work is done, supported since v0.4.0...HHCCJCY01(MiFlora) - dump received, work is done, supported since v0.4.0...CGG1(round body, E-Ink) - dump received, work is done, supported since v0.4.0...LYWSD03MMC ( square body, segment LCD) -
dump received, need some help, start reading from this post.Collected tech.details summary.
The decryption issue has been resolved,
only the time for implementation is needed. TestingReleasedATTENTION! This topic discusses only questions regarding the operation of LYWSD03MMC sensors and methods for extracting encryption keys.
UPD. The dump didn’t help... Apparently, the advertisements are encrypted. But there is still hope!The text was updated successfully, but these errors were encountered: