Samstag, 20. April 2019

FIX: ESP8266 Internet Clock, Weather Station from YT-User "cbm80amiga"

First:  To compile it, you must install the old Arduino-JSON Library Version 5.13.5

To fix the "long epoch = round(curEpoch + 3600 * (utcOffset+summerTime) + 86400L) % 86400L;"- Error

change the Code in Function updateTime:

void updateTime() { long curEpoch = localEpoc + ((millis() - localMillisAtUpdate) / 1000); long temp_value_2 = round(curEpoch + 3600 * utcOffset + 86400L); long epoch = temp_value_2 % 86400L; h = ((epoch % 86400L) / 3600) % 24; m = (epoch % 3600) / 60; s = epoch % 60; }

This works fine for me.

I also had the problem, that no data from OpenWeathermap arrived. 
After a sleepless night i found a temporary Solution. 
Its a Bug in the actuell Version from the ESP-Library! 

To fix this, go to the Function "getWeatherData()"
and search the Line:

while (client.connected() && client.available()) {

change this line to:

while (client.available()) {

Now here all works fine.  :-)  Hope, i can help you.

When you have own Hints or Questions please use the Comment-Funktion from this Blog.
Today i added a Hardware-Switch to change betwen Summer- and Normal-Time. This works fine. When the Time is come, i give the Code here to the public.


Freitag, 5. April 2019


Diese webseite ist zur Zeit noch eine einzige Baustelle.
Also bitte nicht über unsinnige Blog-Einträge wundern - ich teste noch so einiges.