ThingPulse / espaper-weatherstation

WeatherStation for the 2.9" ESPaper modules

Home Page:https://thingpulse.com/product-category/espaper-epaper-kits/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sunrise/Sunset displayed incorrectly

wabmester opened this issue · comments

Expected behavior

correct sunrise/sunset data

Actual behavior

17:00-17:00

Test code

Here's a call to OWM api and the data returned (which looks OK to me):
http://api.openweathermap.org/data/2.5/weather?id=5809844&appid=a635da4f8eb097418cecae91074f75ae&units=imperial&lang=en

{"coord":{"lon":-122.33,"lat":47.61},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"base":"stations","main":{"temp":63.39,"pressure":1019,"humidity":68,"temp_min":62.6,"temp_max":66.2},"visibility":16093,"wind":{"speed":5.82},"clouds":{"all":75},"dt":1534047300,"sys":{"type":1,"id":2949,"message":0.0055,"country":"US","sunrise":1534078895,"sunset":1534130763},"id":5809844,"name":"Seattle","cod":200}

ESPaper Weather Station version

Downloaded the "master" zip from the ThingPulse guide

Hardware

ThingPulse ESPaper Weather Station kit

Not sure I fully understand. Sunrise/sunset returned from OWM are 08/12/2018 1:01pm UTC and 08/13/2018 3:26am UTC respectively. With Seattle being in UTC-7 this would mean 6am and 8:26pm local time respectively, right?
Are you saying your ESPaper displayed "17:00" for both sunrise and sunset?

Side note: did you not switch to 12h-style on purpose?

I'm uploading an image which should clarify the issue for you. BTW, it also shows the moon phase icon bug reported elsewhere. And it shows an intermittent issue with the display of the current temperature.

Edit: I just noticed it also shows yet another bug -- the timestamps on the daily temperature graph are wrong.

bool IS_STYLE_12HR = false;

weatherbug

I can only confirm all the bugs mentioned above:
a/ sunrise/sunset data,
b/ timestamps on the daily temperature,
... see attached picture,
c/ + unstable "ESPaper Configuration" ... only some lines of the web-page are displayed.

It would be nice to know how to correct it.

ws_thingpulse_lr

Thanks for your feedback. We'll be looking into this.

an intermittent issue with the display of the current temperature.

This might be related to or caused by ThingPulse/esp8266-weather-station#131

the timestamps on the daily temperature graph are wrong.

I don't understand, can you please explain? Maybe just a misunderstanding what the graph displays (temperature profile over 2+ days -> 3x 20:00)?

  • unstable "ESPaper Configuration" ... only some lines of the web-page are displayed.

This seems unrelated to anything discussed above. Please report and properly document that in a separate issue, thanks.

the timestamps on the daily temperature graph are wrong.

I don't understand, can you please explain? Maybe just a misunderstanding what the graph displays (temperature profile over 2+ days -> 3x 20:00)?

Gotcha. In that case, displaying the same time of day at each point on the X-axis isn't very useful. Perhaps the date would be better?

Sounds reasonable, yes. When several users ask the same questions (you weren't the first to get confused) we take it as a sign that the UI isn't self-explanatory.

Of course, we do accept pull requests for https://github.com/ThingPulse/espaper-weatherstation/blob/master/espaper-weatherstation.ino#L383 😜

Please report and properly document that in a separate issue, thanks.

@profra never mind, we found the culprit.

Our code sets the server HTTP content-length header to -1 which the Arduino implementation interprets as a signal to do chunked encoding. A zero length chunk is required to terminate the chuck session to tell the browser we're done sending. With the content-length unset it would otherwise have zero clue when to stop reading.

So, at https://github.com/ThingPulse/espaper-weatherstation/blob/master/configportal.h#L197 we'll need another server.sendContent("").

We'll fix that in the next few hours.

The intermittent issues with sunrise/sunset and current temperature is fixed with ESP8266 Weather Station lib 1.6.2: https://github.com/ThingPulse/esp8266-weather-station/releases/tag/v1.6.2

It should become available in the Arduino library manager in the next few hours.

The config portal was fixed with 3529d3a yesterday.

As for the time/date on the temperature graph, we'll have to discuss this. Simply replacing time with date wouldn't make the display more legible. As we use a rolling window of some 50+ hours you need some form of a time indicator. The ticks on the x-axis are not always at midnight.