-
Notifications
You must be signed in to change notification settings - Fork 1
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 Thermometer 2 #1
Comments
Do you have an example of the data you're getting back from the device? |
Thank you for the prompt reply! I had some success The currantlabs/ble has good examples but I'd prefer more comprehensive documentation. I'm working through subscribing to the notifications. I was able to produce a detailed GATT (!?) using Paypal's gatt tool and Nordic's excellent nRF Connect. Last night, I found JsBergbau MiTemperature2 which explains that the new device does not advertize the temperature|humidity and requires connection. I will try the Python code. This appears to be the service of interest:
But, IIUC, the default (!?) notification is for characteristic ( |
It does sound like you need to maintain the connection to get the readings + I wonder if that will affect battery life - the nice thing about the earlier revision is that there's no handshake required which I'm assuming makes for better battery life (I got over 6 months with the provided battery and listening mostly constantly for transmissions). |
IIUC I should be able to subscribe to updates from the device (using CCCD?) and that would keep the power consumption lower (avoiding polling). Everyone else that's succeeded in interrogating the device seems to miraculously know that handles Thanks for your responsiveness. |
I got it working! I'll share my code tomorrow. Thanks again! |
Code: https://github.com/DazWilkin/gomijia2 I've credited you and hope that's acceptable? |
Very cool, glad to hear you got it working. Only comment on the credit (which is much appreciated) is that my name only has a single h in it. ;) |
Thank you
My apologies!
I'll correct that today.
…On Sat, Apr 18, 2020, 02:18 Jonathan McDowell ***@***.***> wrote:
Very cool, glad to hear you got it working. Only comment on the credit
(which is much appreciated) is that my name only has a single h in it. ;)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHZTQBTCFC7JGXHA2DL4SDRNFV5DANCNFSM4MH6OYDQ>
.
|
Thanks for this code!
I've bought some of the new Xiaomi Thermometer 2 but I'm unable to read from them with your code.
I suspect (!) the Advertisment (!?) format has changed.
How did you determine the protocol for the original sensor?
Your code looks for
Data > 14
but I only receiveData == 14
I also only receive
id == 0x0128
(not0x1004
,0x1006
,0x100A
,0x100D
)I'm able to enumerate|scan for the devices that I have.
They report being
Connectable()
.But I don't understand how to decode the
Data
I receive from them.Any pointers would be appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: