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

Fix ble006 for the new converter format #1352

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

relliky
Copy link

@relliky relliky commented May 8, 2024

@AlexxIT think you had a different interpertation of data of the knob event this device reports when you converts to the new format. I have rewrote it. Please see comments in the code for details.

Feel free to streamline the code or the event name if we can make it shorter without being hard to undersrtand.

This is my first time to update the converter so it took me a while to read the wiki and the MIOT spec to interpret the relationship. I think I got most of them, e.g. how to map mi id to the spec json structure, how to find the value for certain event after I pressed the button.

The only thing I could not understand is that when I turn on the debug message, I could not map "pdid" and "eid" below to the the spec mi id in the code where service iid = 5, event iid =1036, property iid =2. Do you mind explaining a bit on that?

2024-05-08 21:15:53.601 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.192.168.1.40] {'topic': 'miio/report', 'data': b'{"id":580456024,"method":"_async.ble_event","params":{"dev":{"did":"blt.3.1hk9un6hkcg00","mac":"CA:6E:1B:6A:8F:89","pdid":17825},"evt":[{"eid":22052,"edata":"16"}],"frmCnt":1,"gwts":1715199353}}'}

e.g. the battery sensor in this device does not show up, so I'd like to troubleshoot it. But I am not sure which "eid" and "pid" I need to search in the log for such battery event.

@AlexxIT AlexxIT self-assigned this May 12, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants