NTP + WEBINTERFACE - Shedule Relay

Hello everyone

I have already set up a web interface on my WEMOS D1, so I can switch 3 relays on and off via "browser" (this has been working for years). But now I would like to do it a little more autonomously, my thoughts with NTP get the current time, and then to implement a kind of time control,
I have now integrated NTP, but I have the problem that the relays do not interact with the web interface..

Can someone help me there?

here is my code:

Please post your code here using code tags (the </> button).

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project :wink: See About the Installation & Troubleshooting category.

Making a pen and paper schematics showing the powering of the setup could be usefull/needed.

for NTP you don't need an external library, it is included in the ESP core.

https://werner.rothschopf.net/202011_arduino_esp8266_ntp_en.htm

if you just need to switch some pins, check my generic webserver:

https://werner.rothschopf.net/microcontroller/202108_esp_generic_webserver_en.htm

I should be able to switch the relays simply and easily via the web interface (which I can do so far), and a kind of timer should be able to be switched individually for each relay. only there it currently stops, because I don't know what to do next.. that's why I'm looking for help here

I only need the timer, which, for example, relay 1 is switched every day from 07:00 to 09:00. The web interface is already working. so i'm looking for help here

Hello everyone, I've made some progress, currently the only thing missing is that a GET request is sent within the time, can someone help me, so close to the goal I don't know anymore.. (line 87 - 92) nothing happens .. Thanks

Why do you insist on taking us to Pastebin? Post you code here (as already suggested / requested in post #2).

Use websockets and every time there is changing some things send a message.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.