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

Getting data from the memory #4

Open
OndrejBakan opened this issue Aug 4, 2021 · 1 comment
Open

Getting data from the memory #4

OndrejBakan opened this issue Aug 4, 2021 · 1 comment

Comments

@OndrejBakan
Copy link

Hello,

thank you for your development so far. This is a feature request, not an issue. So apparently, except of the periodic advertisements, LYWSD03MMC has its own memory that syncs with your Xiaomi Home app/Xiaomi gateway when connected.

Is there any known way how to read this memory? Because in the app you can only view last 24 hrs (1 measurement per hour), last 30 days (highest+lowest per day) or last 6 months (highest lowest per month).

@ahpohl
Copy link
Owner

ahpohl commented Aug 7, 2021

I guess the memory can only be accessed using an active bluetooth connection. The code snippets here and the final version in ESPHome only scans passively for BLE advertisements and does not require an active connection. The BLE advertisement broadcasts only the current value and not the entire history.

As far as I know the history you can only get with the Xiaomi home app or the gateway. To get the history from memory would require a completely different approach where you first establish an active connection and then you need to figure out how to pull the history. I am not an expert with bluetooth programming so unfortunately I cannot help any further with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants