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

Add endpoint to read firmware capabilities #1218

Closed
proddy opened this issue Jul 10, 2023 · 2 comments
Closed

Add endpoint to read firmware capabilities #1218

proddy opened this issue Jul 10, 2023 · 2 comments
Labels
technical Technical enhancement, or tech-debt issue
Milestone

Comments

@proddy
Copy link
Contributor

proddy commented Jul 10, 2023

Bring back the Features context in the Web and use this HTTP Get endpoint to bring back capabilities which we can use to determine behavior in the web pages. For example showing the TLS option in the MQTT settings only for ESP32's with larger flash sizes (>4MB) or WPA3 support on firmware compiled with IDF4.4.4 or extra options if the firmware is compiled with DEBUG, etc...

@proddy proddy added the technical Technical enhancement, or tech-debt issue label Jul 10, 2023
proddy added a commit to proddy/EMS-ESP32 that referenced this issue Jul 11, 2023
@proddy
Copy link
Contributor Author

proddy commented Jul 11, 2023

added to dev2. The features context only has two values in the json object (version & platform) which can be called from anywhere in the web code. We can extend later for other things we need to pull back from the firmware. This way we can set values in platformio.ini as -D defines and these will be identified in the web frontend.

@proddy proddy added this to the v3.6.0 milestone Jul 11, 2023
@proddy
Copy link
Contributor Author

proddy commented Jul 11, 2023

To use, add:

import { FeaturesContext } from '../../contexts/features';
const { features } = useContext(FeaturesContext);

and then features holds the values.

@proddy proddy closed this as completed Jul 11, 2023
proddy added a commit that referenced this issue Jul 11, 2023
Add endpoint to read firmware capabilities #1218
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical Technical enhancement, or tech-debt issue
Projects
None yet
Development

No branches or pull requests

1 participant