-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Add sx127x component #7490
base: dev
Are you sure you want to change the base?
Add sx127x component #7490
Conversation
Hey there @swoboda1337, CODEOWNERS = ["@swoboda1337"] And run (message by NeedsCodeownersLabel) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #7490 +/- ##
==========================================
+ Coverage 53.70% 53.81% +0.10%
==========================================
Files 50 50
Lines 9408 9795 +387
Branches 1654 1351 -303
==========================================
+ Hits 5053 5271 +218
- Misses 4056 4198 +142
- Partials 299 326 +27 ☔ View full report in Codecov by Sentry. |
Build is OK for M5stack Cores3 and Module-LoRa868_V1.1.
|
Converted to draft temporarily to do more fsk testing, |
No review, just a thank you for writing this component. |
Packet mode is done, works great with fsk there is an on_packet trigger. M5stack can be used now as it only supports packet mode. Need to add a few automations and it's done. |
Everything is done, will be updating the docs this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disclaimer: I know very little about the SX127s, so consider this a mostly uninformed review.
Broadly speaking, there are a lot of magic numbers in the code (some I've left comments at, but there are plenty more) and I had to go back and forth to the datasheet to unpack the code. So for clueless folks like me 😁, perahps it would be useful to add names to many (most?) of them, especially when the datasheet already has names defined for them (e.g. FXOSC).
Hope this review helps!
Docs are done and I made some updates after review comments. Should be ready to go |
Moved to draft until new RMT drivers are integrated. |
What does this implement/fix?
The SX127X component allows you to configure/control the SX1276, SX1277, SX1278 and SX1279 transceivers in ESPHome. Supported frequencies range from 137 MHz to 1020 MHz. Supported modulations include OOK, FSK, GFSK, MSK and GMSK. Support for both receive and transmit. These chips contain two modems. The LoRa modem is not supported by this component, only the FSK/OOK modem.
Datasheet: https://www.semtech.com/products/wireless-rf/lora-connect/sx1278#documentation
There are many devices in the market with an ESP32 already packaged with these radios, examples: https://www.lilygo.cc/en-ca/products/lora3, https://heltec.org/project/wifi-lora-32v2/ and https://shop.m5stack.com/products/m5stack-lora-module-433mhz-v1-1
There are already about a dozen or so people using my component. I currently use it for my 433 MHz AcuRite weather sensors (https://github.com/swoboda1337/acurite-esphome). It would be nice to get these radios officially supported.
Docs can be found here: https://deploy-preview-4278--esphome.netlify.app/components/sx127x
Types of changes
Related issue or feature (if applicable): #7483
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#4278
Test Environment
Example entry for
config.yaml
:Docs can be found here: https://deploy-preview-4278--esphome.netlify.app/components/sx127x
Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: