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

Incorrect payload leading to error #772

Open
cjim8889 opened this issue Feb 19, 2025 · 0 comments
Open

Incorrect payload leading to error #772

cjim8889 opened this issue Feb 19, 2025 · 0 comments

Comments

@cjim8889
Copy link

cjim8889 commented Feb 19, 2025

The payload does not contain necessary keys including params and stuff which is causing the miot to error

msg: dict = json.loads(payload)

Logs which show the above issue are attached.

Feb 19 21:02:58 ha homeassistant[884]: 2025-02-19 21:02:58.609 ERROR (MainThread) [custom_components.xiaomi_home.miot.miot_client] ha.a694f5aae78b9d407a218fb2451498ad, on_event_msg, invalid msg, device/blt.3.1kfa1i1ugc400/up/event_occured/2/1018, b'{"attr":"event.2.1018","did":"blt.3.1kfa1i1ugc400","extra":{"model":"linp.magnet.m1","pd_id":6281,"specEvent":true,"uid":3034093918},"logid":"0a8edd056547937b7bd004","pub_source":"evttosds-to-pubsub","shard":349,"sid":0,"source":"FROM_BLE_TRANSLATE","status":[{"piid":1004,"value":2}],"tid":125,"time":1739970178,"time_ms":1739970178584}'
Feb 19 21:03:00 ha homeassistant[884]: 2025-02-19 21:03:00.595 ERROR (MainThread) [custom_components.xiaomi_home.miot.miot_client] ha.a694f5aae78b9d407a218fb2451498ad, on_prop_msg, invalid msg, device/blt.3.1kfa1i1ugc400/up/properties_changed/2/1004, b'{"attr":"prop.2.1004","did":"blt.3.1kfa1i1ugc400","extra":{"model":"linp.magnet.m1","pd_id":6281,"uid":3034093918},"last_status":["1"],"last_status_time":1739970177628,"logid":"0a8edd056547937d64d000","pub_source":"evttosds-to-pubsub","shard":349,"sid":0,"source":"FROM_BLE_TRANSLATE","status":[2],"time":1739970180,"time_ms":1739970180555,"last_timestamp":1739970177,"last_value":[1]}'

The device is linptech M1 door/windows sensor. linp.magnet.m1 by linptech

@cjim8889 cjim8889 changed the title Incorrect payload type leading to JSON decode failure Incorrect payload leading to error Feb 19, 2025
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

1 participant