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

feat: support xiaomi motion sensor 2s - global version (XMPIR02SGXS) #95

Merged

Conversation

ldfandian
Copy link
Contributor

@ldfandian ldfandian commented Sep 7, 2024

It's actually the same as the China mainland version (XMPIR02SXS vs XMPIR02SGXS).
The only change is the device id as the code change indicates.
The change is manually verified by Home Assistant (no change except using the new xiaomi-ble package)

Hardware Info:

WX20240907-184558@2x
WX20240907-183342@2x
WX20240907-183155@2x

It's actually the same as the China mainland version (XMPIR02SXS vs XMPIR02SGXS).
The only change is the device id as the code change indicates.
The change is manually verified by Home Assistant (no change except use the new xiaomi-ble package)

Hardware Info:
- https://www.mi.com/global/product/xiaomi-motion-sensor-2s/
Copy link

codecov bot commented Sep 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.98%. Comparing base (4682109) to head (66846f3).
Report is 24 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
+ Coverage   56.55%   56.98%   +0.43%     
==========================================
  Files           6        6              
  Lines         992     1009      +17     
  Branches      210      210              
==========================================
+ Hits          561      575      +14     
- Misses        334      337       +3     
  Partials       97       97              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Ernst79 Ernst79 merged commit 7e30569 into Bluetooth-Devices:main Sep 7, 2024
9 checks passed
@Ernst79
Copy link
Collaborator

Ernst79 commented Sep 7, 2024

Thanks!

@ldfandian
Copy link
Contributor Author

Thanks!

Thanks for the lightning approval~ @Ernst79

I am thinking of investing new BLE device's support on BLE monitoring integration (rather than Xiaomi-BLE integration) in the future, because putting features into HA core release takes much longer time (which I understand...). The only thing that stops me is that it is harder to make BLE gateway from a scratch, compared to Bluetooth proxy.

  • To make a bluetooth proxy, I simply flash the device using Ready-Made project , neither code nor configuration is needed. Even though no coding skill at all, anyone can make it.
  • But to make a BLE gateway, I have to setup a ESPhome environment, takes an example proxy_all.yaml and flash it. Some coding skill is required.

Do you think it is a good idea to make BLE gateway as an option in the Ready-Made project?

@Ernst79
Copy link
Collaborator

Ernst79 commented Sep 7, 2024

I do understand, but I think we should focus on the official integration.

I assume you use this BLE gateway?
https://github.com/myhomeiot/esphome-components#ble-gateway

Sound fine to make it easier to create such a device. Might give some confusion though, with the Bluetooth proxy. You will have to make it clear that the BLE gateway is used in combination with BLE monitor only. Not sure if the devs will agree on adding it, you should check first.

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.

2 participants