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

Add Support for Tempo Disc Waterproof #3

Open
jakub300 opened this issue Dec 19, 2022 · 1 comment
Open

Add Support for Tempo Disc Waterproof #3

jakub300 opened this issue Dec 19, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@jakub300
Copy link

Is your feature request related to a problem? Please describe.
Hi, I purchased Tempo Disc THPD (that is supported) and Tempo Disc™ Waterproof that contains only temperature sensor. After HA setup I realized that it's not supported.

Describe the solution you'd like
Support the device :)

Additional context
Based on posts related to HA Bluetooth integration I found online I enabled logging and was able to find log lines for the device.
Example log lines:

2022-12-18 03:17:55.314 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0 (5C:F3:70:A8:7C:A2) [connectable]: FA:BF:5A:2E:56:F3 AdvertisementData(local_name='FABF5A2E', manufacturer_data={307: b'\rd\x02X\n\xd1\x00\xfc\x01\x00'}, rssi=-65) match: set()
2022-12-18 03:36:37.013 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0 (5C:F3:70:A8:7C:A2) [connectable]: FA:BF:5A:2E:56:F3 AdvertisementData(local_name='FABF5A2E', manufacturer_data={307: b'\rd\x02X\n\xd3\x00\xfd\x05\x00'}, rssi=-65) match: set()
2022-12-19 01:10:10.486 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0 (5C:F3:70:A8:7C:A2) [connectable]: FA:BF:5A:2E:56:F3 AdvertisementData(local_name='FABF5A2E', manufacturer_data={307: b'\rd\x02X\x0bT\x00\xfc\x01\x00'}, rssi=-65) match: set()

Based on my limited knowledge of python:

>>> from struct import *
>>> unpack("!BhhhH", b'\rd\x02X\n\xd1\x00\xfc\x01\x00'[1:10])
(100, 600, 2769, 252, 256)
>>> unpack("!BhhhH", b'\rd\x02X\n\xd3\x00\xfd\x05\x00'[1:10])
(100, 600, 2771, 253, 1280)
>>> unpack("!BhhhH", b'\rd\x02X\x0bT\x00\xfc\x01\x00'[1:10])
(100, 600, 2900, 252, 256)

First 4 fields appear to match those currently defined in the code, and the last appears to be "mode" like in current code.
For the first line 100% battery, 600s log interval, 2769 items logged, 25.2 deg C current temperature.
For the second line I turned air plane mode on and the last field changed value, I don't know what are expected "mode" values but I validated this with THPD and it also changes from 256 to 1280 when in air plane mode.
Third line is just one more example, almost day later.

@jakub300 jakub300 added the enhancement New feature or request label Dec 19, 2022
@bdraco
Copy link
Member

bdraco commented Dec 19, 2022

Happy to accept a PR if you want to signup to be codeowner for the HA integration as well:

https://github.com/home-assistant/architecture/blob/master/adr/0008-code-owners.md#rules

Ernst79 referenced this issue in custom-components/ble_monitor Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants