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

Potential parsing issue of data received from motion sensor #12

Open
elyorkhakimov opened this issue Jun 19, 2020 · 2 comments
Open

Potential parsing issue of data received from motion sensor #12

elyorkhakimov opened this issue Jun 19, 2020 · 2 comments

Comments

@elyorkhakimov
Copy link

First of all, huge thanks for the work you've done, reverse engineering the WyzeSense protocol !

I'm actually using gosense library, but also used this package, and appear to be running into this issue.
When Motion sensor detect motion, bridge sees 62 byte frame, and parsing it shows "State: 1".
40 seconds later it receives another frame with 62 bytes, and parsing it shows "state: 0". All good.

However totally unsolicited, at some point after that second message, Wyze bridge receives one more message which is only 39 bytes long.

2020-06-19T19:33:30.561536251Z DEBU[0578] readRawHid: 62 bytes: [ 55aa53193500000172ce123b360ea2373741313742414202010053064655aa531d1900000172ce123b39a2373741313742414202176400010100531606b5 ]
,2020-06-19T19:34:10.558263651Z DEBU[0618] readRawHid: 62 bytes: [ 55aa53193500000172ce12d0230ea237374131374241420200005406c855aa531d1900000172ce12d026a237374131374241420217640001000054170738 ]
,2020-06-19T19:35:30.557162901Z DEBU[0698] readRawHid: 39 bytes: [ 55aa53231900000172ce13f9f7ab37374131374241420200000100000100000100000117000776 ]

I see other threads that might be indicating similar issue?

@raetha
Copy link
Contributor

raetha commented Jul 26, 2020

@elyorkhakimov PR #14 will work around this issue. It's now been included in the forks that both Kevin Vincent and I use for our projects.

Unfortunately we don't know for sure what the 39 byte packet is, though I have anecdotal suspicions it represents a low battery. It would be great if someone knew how to parse the packet to at least get the MAC for the sensor from it. We could then do some testing to see if it being triggered correlates with a low battery. I'm hoping someone in the community that understands this side of things better will help with parsing the packet.

@elyorkhakimov
Copy link
Author

thank you @raetha for the follow up. I have been working around this issue in ha-gosenseapp by filtering out messages that do not parse.
I don't believe this is a low battery message, as all of the sensors in my setup are more or less new, and in fact report 92% of battery state or more.

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