-
Notifications
You must be signed in to change notification settings - Fork 819
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
[RF] Proposal fix for issue #2139 + Extra documentation #2157
base: development
Are you sure you want to change the base?
Conversation
There appears to be some confusion regarding how the RF module is announced on Home Assistant. I have created this pull request as a preview of the work I am doing to address issue #2139. I am currently reviewing the RF module to clean up the code and improve the documentation. My suggestion is to test these changes for a couple of days to see if we can further enhance the documentation and user interaction. |
0801991
to
e52a81b
Compare
… and documentation for optional device information Fix null pointer references in RFtoMQTTdiscovery and update logging levels for RF signal handling Refactor RF to MQTT discovery functions for improved clarity and parameter handling
1e6d90b
to
b18c4db
Compare
…ecting terminology and enhancing clarity
@1technophile and all other contributors, I have completed a review of the code and documentation for the RF module. Please feel free to provide any comments and let me know if you would like to merge it into the master branch. Thank you! |
Thanks for the PR, give me a few days to review it |
float rfFrequency = RFConfig.frequency; | ||
int rfReceiverGPIO = RF_RECEIVER_GPIO; | ||
int rfEmitterGPIO = RF_EMITTER_GPIO; |
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.
Is there a particular reason for not using directly the macros inside the logs and avoid adding new variables ?
disableCurrentReceiver(); | ||
# ifdef ZradioCC1101 | ||
initCC1101(); | ||
int txPower = RFdata["txpower"] | RF_CC1101_TXPOWER; | ||
ELECHOUSE_cc1101.setPA((int)txPower); | ||
Log.notice(F("CC1101 TX Power: %d" CR), txPower); | ||
Log.notice(F("[RF] CC1101 TX Power: %d" CR), txPower); |
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.
Nice idea to prefix with the module, but for consistency we should add it to the other modules
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.
Maybe in another PR
Description:
This pull request proposes a fix for issue #2139 and includes several improvements and enhancements to the RF module.
Changes:
#define
directives to allow users to choose which MQTT message to send for each RF signal received. Users can uncomment the desired line to enable the corresponding functionality.Impact:
These changes improve the flexibility and usability of the RF module, allowing users to customize their Home Assistant integration more easily. With this implementaion can be a broken retroconpatibilty
The enhanced logging and documentation will aid in troubleshooting and understanding the RF module's behavior.
Base for Future Work
The idea is to move the configuration to Home Assistant using MQTT Selectors. This will allow users to enable or disable modules, set the current frequency, and choose the type of message to send, all through MQTT Selectors.
Please review the proposed changes and provide feedback. Thank you!
Checklist: