Nodemcu rtc i wanna show time date and temperature on webserver !!!! By webaddic

Hi all, hope u all are fine.

Ill get straight to the question. I have a webserver for a alarm clock to set the alarm remotely. I also have a 16x2 lcd installed with the nodemcu and ds3231 rtc. The program is working fine.
1)The thing is that i want to add time , date and temperature an top of my web server so that i don’t have to go near the clock to know the time (by looking at the lcd)
But do it from anywhere in the house. Time should be precise by seconds that is why i want to have it in the web server. I lack knowledge in html. Please help me out

nodeMCU has many products. Which one? Can't any computer get the time from an external web site like timeanddate.com?

Nodemcu v1.0
Wifi will be in ap mode so no internet. Thats where rtc comes in

The ESP8266 core has web server examples. Have a look.

Yes i did did that but i cant get any examples for time, date and temperature on the webserver.

Hello

webaddic:
Yes i did did that but i cant get any examples for time, date and temperature on the webserver.

https://www.google.com/search?q=arduino+web+server+temperature

Lol… lemme try!!! Thanks…

webaddic:
Hello

{waves}

Actually i think i did not ask the question as i should have. I tried googling it but its confusing . Acutually the temperature is not so important to show as much as date and time. For nodemcu i have to convert html to c++ to compile in arduino. I can show the time on the lcd but i cannot show the live time on webserver. Date and temperatures are just for showing off lol..... (if i am able to add them to the web server). Actually i made a scheduled timer for 8 relays with lcd and ds3231. I have to use it outdoors . So i think that lcd will not be a good idea. That is why i want to show the time in the webserver and secondly dont want to go to the lcd every time to change the time.

For nodemcu i have to convert html to c++ to compile in arduino.

This makes no sense. Please explain.

Also, you imply that maybe you wrote some code? If so, please post it here so we can see it. Please use code tags when you do that.

First you have to have to create a webpage in HTML then convert it in c++so arduino software can recognise it.
Secondly i did not say that i wrote the code. I modified it for my use.
The code was for only a single alarm to be on for a minute or so. Bet i modified it for 8 channel relay According to my needs. I managed to try out the program and it worked perfectly. Now i want to get rid of lcd and get the required Live time and date on web server. Searched google and youtube. All the examples are for network provided times or ntp And not for rtcs.
Please bro dont get offended. I know that i am a new to this electronics and programming world. I am here to get help and not to justify myself. Please help if u can.

Thank you for the slightly deeper technical explanation. I think there is a misunderstanding here. I am not offended and I am not asking you to justify yourself. What I am asking, is that you follow the standard methods of presenting information here, so that it won't frustrate or mystify the many people who can help you. This requirement is not new, a set of guidelines has been developed and posted in the sticky posts at the top of the forum. They suggest forum habits that will make it significantly easier for readers to help solve your problem. They represent years and years of experiences helping people solve programming problems here, so you should read and follow the rules that are explained there. My requests simply echo the standard requirements, so don't take it personally. Those rules take more than adequately into account, the lack of experience that many experimenters have.

Please post your entire sketch as I have requested, inside code tags, after you're perused the forum guidelines. It doesn't matter who wrote it, as long as it is the same sketch that you are working on.

I am asking you for this because it is usually impossible to solve programming problems based only on generalized statements like you have made so far.

Thank you.

webaddic:
Hello

sp. “update-less bump”

webaddic:
1)When i disconnect the power and re-power it, the program does not remember the last time i set.
2)i am unable to set the clock to precise seconds as i intended too. (if i enter, only hh:mm, the program runs fine.)

I used "find" to comb your sketch for Rtc references. I was unable to find any code at all, that sets the RTC. I don't see any time setting either, other than setting alarms.

I do not dive in deep of your project, but you can save/retrieve values in flash, so you don't loose its values while power off.

Look at PROGMEM command to learn how to do.

Carlo

webaddic:

3)I want to have live time,date and temp on the webserver to eleminate the need of lcd. :frowning:

You should try two different way: a pull request or a push values.

A pull request can be made from your web page. It should ask to ESP the current value and show in the page. It require to configure ESP as webserver and make it visible from Internet (if needed to access data from public network)

A push value can be made from your ESP, which post values (every second? It is possible if you need) to a specific page, that store them in a place on the web server (DB Access, text file, etc). Your public page will read and show this information.

Pull request is better for the “workflow” but require more Javascript knowledge, expecially for the HTTP_Request method (this is the base of AJAX framework), that allow a page to ask and get information from a server without reload himself.

Carlo

p.s. this is to read data from an external web server. Just now I’ve seen you refer to ESP web server, so my suggestion can’t apply to you.
Sorry for misunderstanding, I let my post on forum for someone needs to do what I understood before.

carloroma63:
I do not dive in deep of your project, but you can save/retrieve values in flash, so you don't loose its values while power off.

Look at PROGMEM command to learn how to do.

Carlo

Sorry, @Carlo, that is simply not true. You can not write to flash using PROGMEM. It is read only capable.