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

Document Meter device commands for downloading stored data #37

Closed
dyseg opened this issue Feb 10, 2024 · 3 comments
Closed

Document Meter device commands for downloading stored data #37

dyseg opened this issue Feb 10, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request stale

Comments

@dyseg
Copy link

dyseg commented Feb 10, 2024

Current Situation

The commands for fetching the 36 days of stored data from the Meter device is not documented, meanwhile the official android app is capable to download it.

Proposed Change

Document all available commands via the BLE API of the Meter device. Currently only 0x02, 0x14, 0x30, 0x31is documented.

From an android bluetooth log, it is visible the the official SwitchBot app uses some not documented commands. For example: 0x3A (extended), 0x3B, 0x3C and I assume many others which I missed.

Additional Context

Request from SwitchBot app 1:

Handle: 0x000e (Unknown: Unknown)
    [Service UUID: cba20d00224d11e69fb80002a5d5c51b]
    [UUID: cba20002224d11e69fb80002a5d5c51b]
Value: 570f3a

Reply from Meter 1:

Opcode: Handle Value Notification (0x1b)
Handle: 0x000b (Unknown: Unknown)
    [Service UUID: cba20d00224d11e69fb80002a5d5c51b]
    [UUID: cba20003224d11e69fb80002a5d5c51b]
Value: 01520100040302

Request from SwitchBot app 2:

Opcode: Write Request (0x12)
Handle: 0x000e (Unknown: Unknown)
    [Service UUID: cba20d00224d11e69fb80002a5d5c51b]
    [UUID: cba20002224d11e69fb80002a5d5c51b]
Value: 570f3b01

Reply from Meter 2:

Handle: 0x000b (Unknown: Unknown)
    [Service UUID: cba20d00224d11e69fb80002a5d5c51b]
    [UUID: cba20003224d11e69fb80002a5d5c51b]
Value: 0165be3e1465be424c000a0078

Request from SwitchBot app 3:

Opcode: Write Request (0x12)
Handle: 0x000e (Unknown: Unknown)
    [Service UUID: cba20d00224d11e69fb80002a5d5c51b]
    [UUID: cba20002224d11e69fb80002a5d5c51b]
Value: 570f3c01000006

Reply from Meter 3:

Handle: 0x000b (Unknown: Unknown)
    [Service UUID: cba20d00224d11e69fb80002a5d5c51b]
    [UUID: cba20003224d11e69fb80002a5d5c51b]
Value: 01973888973897368897389735779737
@dyseg
Copy link
Author

dyseg commented Feb 18, 2024

TL;DR these commands won't be documented.

Feedback from the official SwitchBot support:

Hi there,
Thanks for your kind waiting.
Sorry that as confirmed by the developers, our BLE API is not open to the customers. :-(
The open API is already shared in GitHub with our customers.
We also feedback if possible, please add more available API sharing in GitHub to the developer team so our customers can make good use of them.
Sorry again for any inconvenience so far and if there is any other thing we can cooperate with, feel free to let us know.

I would suggest some clarification in the main readme: highlight that only SOME commands are part of the open BLE API. Currently it is very misleading. It seems like the documentation is just not yet finished, meanwhile it is indeed finished, and the other commands are not open for the public.
And looking at some other issues in this repository(#32, #22), it seems like they are stuck in the same situation, without a single comment from the developers.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 28, 2024
Copy link

This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

6 participants