Skip to content

feat: Add web server example for ESP devices, update version #269

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

Merged

Conversation

milesburton
Copy link
Owner

feat(ui): add TailwindCSS & chart-based dashboard

Integrate Tailwind CSS for styling
Display DS18B20 temperature readings in a Chart.js line graph
Implement tab-based navigation (Dashboard, API Docs, Setup)

docs(setup): add instructions for WiFi, interval, and history

Create a Setup tab explaining how to:
    Change ssid and password
    Adjust polling interval (READ_INTERVAL)
    Update the number of stored readings (HISTORY_LENGTH)

fix(tooltip): show human-readable time in chart hover

In the tooltip callback, convert epoch values to Date objects
Use .toLocaleTimeString() for improved readability

refactor(memory): reduce history length & poll interval

Default: store 360 readings (1 hour of data at 10s intervals)
Lower risk of out-of-memory errors on ESP8266 boards
Potential to adjust these defaults if more sensors or longer history is required

chore(footer): pin footer & add MIT license link

Use flexbox (min-h-screen, mt-auto) to keep footer at the bottom
Link to MIT License in the footer
Update title & references to “Arduino Temperature Control Library”

image

image

@milesburton
Copy link
Owner Author

@RobTillaart What are your thoughts, should we add this?

@RobTillaart
Copy link
Contributor

If it works I think it is a very nice starting point for people wanting to build such a thing.
At the same time it is a good subject for a blog. (these are not mutual exclusive imho)

It might need a note (disclaimer) that support for the example is limited to the library part.
Otherwise you might get "web" questions which are better handled on Arduino or ESP forums.

@milesburton
Copy link
Owner Author

If it works I think it is a very nice starting point for people wanting to build such a thing. At the same time it is a good subject for a blog. (these are not mutual exclusive imho)

That's a good point. At least it'll be easily searchable if it's also in a blog format.

It might need a note (disclaimer) that support for the example is limited to the library part. Otherwise you might get "web" questions which are better handled on Arduino or ESP forums.

You're right. I've now added a README.md file which explicitly states this is a demonstration of how the library can be used. If support is required for the sketch, then head over to the Arduino forum (mind you I could be a bit more explicit as I doubt the Arduino developers really want to be offering advice for webapps)

@milesburton milesburton marked this pull request as ready for review January 22, 2025 10:19
@milesburton
Copy link
Owner Author

I'll go ahead and merge this for now. If anyone has any further comments feel free to raise an issue or PR

@milesburton milesburton reopened this Jan 22, 2025
@milesburton milesburton merged commit e9d555f into master Jan 22, 2025
8 checks passed
@milesburton milesburton deleted the feature/introduce-esp-webserver-example-and-update-version branch January 22, 2025 10:26
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