-
Notifications
You must be signed in to change notification settings - Fork 4.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
Allow changing WiFi Hostname at compile time from user_config_override.h #21236
Conversation
LGTM |
You can have hostname included in the build without a new |
There's a lot of consts for which I would have loved to do that in the past but I was so afraid of changing that order... 🥶 |
@sfromis Hi, you are right with that. In fact, I was using that in my devices at home, but there is the issue with the user backlog approach (for this case in particular) that takes time and require a restart making other issues like the WiFi AP name (which uses the Hostname) not taking the change right away showing the previous naming. With this simple change, which adds no extra code to the Firmware, we can allow the user to set the HOSTNAME (or a custom template of the hostname like "%s-%06d") at compile time simplifing the process. |
Let us merge and see what happens ;-) |
Implemented differently but same result.
|
Awesome. Thanks! |
Description:
This small PR adds the option to allow changing the WiFi Hostname at compile time from user_config_override.h.
Usage:
Notes:
"%s-%04d"
which expands to<MQTT_TOPIC>-<last 4 decimal chars of MAC address>
Related issue (if applicable): NA
Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass