-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support for the device BTH01 #14
Comments
Hello David, I suppose the data for this sensor is placed and/or encoded differently in the BLE advertising message as compared to the Xiaomi Mijia (LYWSD03MMC). Cheers, |
Ah, it seems you don't have check the source code!
|
Maybe this could be helpful, too: https://github.com/Bluetooth-Devices/bthome-ble/blob/main/src/bthome_ble/parser.py |
Thank you! I am not much of a programmer but my friend ChatGPT and the documentation helped me. This code works for me now :)
|
Nice! |
I seriously doubt that your code works (it doesn't here 😉) , it's just another chatgpt hallucination: according to the specification, the payload isn't necessarily 14 bytes and the values aren't in a fixed location, but each byte, after the initial 0x40, specifies what comes after it, e.g. I'm getting Raw Service Data: 40 00 60 01 5F 02 EC 07 03 C3 1B (11 bytes) and it means: 00 -> packet id (60) Then for the same thermometer I get Raw Service Data: 40 00 61 0C 2A 0B 10 01 (8 bytes) 00 -> packet id (61) |
Hello!
I successfully flashed pvvx firmware on my bluetooth device.
Model: BTH01
Firmware: github.com /pvvx
Hardware: 0014
Software: V1.9
My goal is to use your software on an esp32 to change color on an LED depending on the temperature. Your code is picking up my device but it returns 0 degrees. I'm using your basic example code (The non blocking version is crashing my device)
17:16:48.005 -> Sensor 0: 34:EC:B6:65:18:3E
17:16:48.005 -> Name: BTH01-David
17:16:48.005 -> 0.00°C
17:16:48.005 -> 0.00%
17:16:48.005 -> 0.000V
17:16:48.005 -> 0%
17:16:48.005 -> -75dBm
17:16:48.005 -> Measurement Count: 0
17:16:48.062 -> Reed Switch State: Closed
17:16:48.062 -> GPIO TRG Output: Low
17:16:48.062 -> Control Parameters: Not Set
17:16:48.062 -> Temperature Trigger Event: Not Triggered
17:16:48.062 -> Humidity Trigger Event: Not Triggered
17:16:48.062 ->
17:16:48.062 -> BLE Devices found (total): 5
17:16:48.062 -> Iteration 2 - Free heap is 228720
17:16:48.062 -> ---
I get my temperature when using the web site on my computer:
https://pvvx.github.io/THB2/web/PHY62x2BTHome.html
Any ideas how I can solve this?
/David
The text was updated successfully, but these errors were encountered: