Giter Club home page Giter Club logo

wifimanagertz's Introduction

WiFiManagerTz for ESP32

Adds NTP/TimeZone and Clock tools to @tzapu's WiFiManager

Integration

#include <WiFiManager.h>
#include <WiFiManagerTz.h>

void setup()
{
  WiFiManager wifiManager;

  WiFiManagerNS::init( &wifiManager );
  // WiFiManagerNS::init( &wifiManager, webserverPreCallback ); // using a custom callback add/override server routes

  // /!\ make sure "custom" is listed there as it's required to pull the "Setup Clock" button
  std::vector<const char *> menu = {"wifi", "info", "custom", "param", "sep", "restart", "exit"};
  wifiManager.setMenu(menu);

  // ....

}

Motivation

I made this library in order to learn how to properly use the WiFiManager, and I'm still learning, so feel free to report any WTF :-)

Roadmap

  • Add more examples
  • Implement minimal logic for external RTC modules coupling
  • Make the Time Setup page skinnable - ESP8266 support

Dependencies

Credits / External Sources

wifimanagertz's People

Contributors

tobozo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

wifimanagertz's Issues

sntp_set_sync_interval

I cannot find the declaration for sntp_set_sync_interval function so I get error at compiling : "sntp_set_sync_interval' was not declared in this scope"

Does not Automatically Apply Time Configuration on Start

Hello tobozo,

cool WiFiManager addition, thanks for that! :-)

Quick question how this is expected to work:
Currently, after restarting it seems to load the preferences correctly, it correctly finds out that NTP is enabled here
https://github.com/tobozo/WiFiManagerTz/blob/master/src/WiFiManagerTz.h#L36
and loads the NTP preferences accordingly.

However, it seems not to automatically apply the time configuration from the preferences at start.
This leads to the preferences correctly filled on the WiFiManager custom web page, but the time not used. I need to go to the time settings webpage after each start and click on "Submit" (without any changes in the form as all correctly prefilled). Only then the time gets actually updated.

Would it not make sense to add a configTime(); after NTP::loadPrefs(); here?
https://github.com/tobozo/WiFiManagerTz/blob/master/src/WiFiManagerTz.h#L36

This would immediately apply the saved settings and retrieve an initial time from the NTP server.

Thanks
Andreas

Suggest to Remove Favicon

Hello tobozo,

personally, I don't think it's a good idea that you add a favicon in your project.
I mean, the favicon is defined for the whole web server, not only the NTP part your plug-in is responsible for.

As I want to provide an own favicon, I need to see if I can "override" your /favicon.ico route again.
But I do think providing a global server favicon should not be the business of a NTP server add-on in the first place.

Thanks for considering
Andreas

Exception / Reboot when trying to access TZ Update page on Wemos D1 mini clone

Hi there! I'm running the example on a Wemos D1 mini clone board. It compiles, uploads and runs ok. But when I try to access the "Setup Clock" button, it throws an exception and resets the Wemos. The versions are the latest available:
WifiManager 2.0.17
WifiManagerTz 1.3.3
Other pages works as expected. Info page even states "Last reset reason" as "Exception"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.