-
-
Notifications
You must be signed in to change notification settings - Fork 250
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
Additional CGG1 devices not discovered (Existing ones work fine) #202
Comments
I don't see anything strange in your configuration. You could try to enable Second thing you need to check, are you sure you have bought CGG1 sensors and not CGG1H sensors. They look the same, but the last has homekit support and seems to use a different protocol. |
No, they are definitely CGG1, says so on the packaging and inside the door/stand/bracket on the back. The only difference to the previous batch is that the "Qingping"-brandname is now molded into that bracket and it has a "CE"-sticker. Also they now work with the european server in MiHome, whereas my first batch was only discovered a few weeks ago when switching to the chinese server. By activating |
@peletiah, I think you are right, we need to add a new device. We have seen this with the kettles as well, slightly different versions that look the same. @Magalex2x14 normally adds new devices, as he understands how to decode this. But I would like to take this opportunity to also learn how this works. @Magalex2x14 Can you show me how you 'decode' these messages. I assume we just need to add a new line in But I will make a start to understand, by sorting messages per device. 58:2D:34:11:C0:02
58:2D:34:11:C0:56
58:2D:34:11:BF:F0
I do recognize the mac address (reversed per two). Short messages
long messages
So, what I can make of it
Payload Short message Long message Tomorrow, I'll continue by looking into the code and further understand what is what. For now, it's bedtime. |
I think if you add this line in const.py in XIAOMI_DICT_TYPE, it should work
|
@Ernst79 I'm a little busy right now - there are a lot of cases at the end of the year. I think tomorrow evening or Sunday I will be able to devote time to this. In short, I’ll say a couple of things:
I think it's best to avoid duplicate names in this dictionary (this may become important later in data processing). @Ernst79 in my repository there is a parsing of LYWSD03MMC messages - the essence is the same for all encryptors (I think this is enough for a start, if there are questions, we will clarify them at any time). |
Thanks, take your time. No hurry. Your link was really helpful. I’ll make a PR for this after we get more info from @peletiah . I’ll make a different name for it, If it doesn’t come clear what the difference is, I will add v2 or something like that and include it in the other dictionary as well. |
Could you try it by replacing If that doesn't work, can you comment out both CGG1 and CGG1 in XIAOMI_DICT_TYPE in that file and enable report_unknown again and post the log. We can than check the differences. |
That change was not sufficient unfortunately, still no values after 10minutes. Here's the logfile with both CGG1 and CGG1-V2 commented out, hope there's enough data you can work with. |
Ah, sorry, missed that in @Magalex2x14 previous respons. Those Chinese makes thing complicated, same sensor name, some have encryption, some don’t. So, yes, you need to find the encryption key. For the differences between the sensors CGG1 and CGG1-V2, I see the last one is from Qingping. For the first one, we now have Xiaomi as the manufacturer. I will do some search on the internet to see what is the actual manufacturer of the CGG1. But perhaps you (@peletiah) still have the package or you can find something on the old sensors? Edit. I did found CGG1 sensors from Cleargrass, but the website cleargrass.com leads to qingping.co |
I think Cleargrass and Qinping are essentially the same company. Unfortunately, I've thrown the old packages away already.
Giving the app storage permission was necessary, as pointed out by @Krojack here. Will give additional feedback once I've made some progress. |
After adding the bind-keys gathered by the modded MiHome-app, all sensors are reporting! Thank you for your quick support! I'll leave this open, in case you need additional information on these devices! If not, I don't mind if you close it! |
Thanks, I'll create a PR with change and will add some explanation in the docs about the different versions. It will be included in the next release, till then, keep the code like you have it now. |
I renamed it to |
0.9.4-beta is released, which includes support for encrypted CGG1 |
I already have three CGG1 devices and one LYWSD02 working just fine with ble_monitor, receiving current statuses throughout.
I've recently bought three additional CGG1-sensors but can't figure out why they are not discovered by
ble_monitor
. I added them in the MiHome-App, they are discovered and report their status.I've tried to sync them by pressing the button on their backs, restarting integrations, HA and rebooting the hardware itself (Pi 3). The devices are immediately next the to Raspberry Pi, so reception should not be an issue.
I've also tried to add them manually through the gui based on the mac-adress, but they don't appear in the devices-list.
The devices also show up in btmon, I've attached logs from
btmon --write hcitrace.snoop | tee hcitrace.txt
. Debug-logging from HA however only shows the existing four devices.The existing device's MACs are:
58:2D:34:10:F7:29
58:2D:34:10:F8:88
58:2D:34:10:F8:7F
E7:2E:01:71:94:AD
According to the btmon-trace the new one's appear to be:
58:2D:34:11:C0:56
58:2D:34:11:C0:02
58:2D:34:11:BF:F0
Any idea what else I could try?
home-assistant.log
hcitrace.snoop.gz
hcitrace.txt
The text was updated successfully, but these errors were encountered: