-
Notifications
You must be signed in to change notification settings - Fork 15
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
Example: xiaomi mi flora passive listener #57
base: main
Are you sure you want to change the base?
Conversation
This looks really cool! gonna sit on it for a sec because i believe you're correct about the examples, but love it! |
Just letting you know i haven't forgotten about this. Just been very busy. |
no worries, I would suggest we hold out examples for a blue_heron capable nerves_livebook nerves-livebook/nerves_livebook#50 - and I'll create a livebook example once that happens.. |
Hi @petermm , I tried your example and it detected my device successfully. I do not get any data packets tough... I logged all incoming packets and only get these:
It's a brand new sensor. Do I have to enable / configure it somehow? Update: I also get some with event_type 0, but they do not match the requested pattern
|
hi @philipgiuliani - sounds like you have things "wired" up correctly - I assume you have received the "FOUND SUPPORTED DEVICE" message etc. seems a bit weird - your msg only thing I can think of is if you have used the device with the mobile app? - maybe one needs to use the app once to make it start sensoring - also while you're there check for the firmware version, and maybe report that one - also if any firmware updates are available.. |
Thanks for the hint. So the trick was really to register the Sensor via the Mi Home App. This will start the broadcasting of the data. |
great to hear! - will update the PR/example in a few days with:
bonus: I'll add support for the $5 "LYWSD03MMC" (https://www.aliexpress.com/wholesale?SearchText=LYWSD03MMC) when using this firmware: https://github.com/pvvx/ATC_MiThermometer |
(Know this is inside the govee app, but seems a bit much creating seperate apps for examples - and quite a maintainability issue down the line perhaps)
{status, pid} = XiaomiPassiveScan.start_link(:uart)
to setup hold sensor close to your elixir device and this will popup:
add the suggested config to @listen_to_device_addresses and then your measurements will come in: