Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sunrise/Sunset displayed incorrectly #15

Closed
wabmester opened this issue Aug 12, 2018 · 8 comments
Closed

Sunrise/Sunset displayed incorrectly #15

wabmester opened this issue Aug 12, 2018 · 8 comments
Labels
bug

Comments

@wabmester
Copy link

@wabmester wabmester commented Aug 12, 2018

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

@marcelstoer

This comment has been minimized.

Copy link
Member

@marcelstoer marcelstoer commented Aug 12, 2018

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?

@wabmester

This comment has been minimized.

Copy link
Author

@wabmester wabmester commented Aug 12, 2018

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

@profra

This comment has been minimized.

Copy link

@profra profra commented Aug 14, 2018

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

@marcelstoer

This comment has been minimized.

Copy link
Member

@marcelstoer marcelstoer commented Aug 16, 2018

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.

@marcelstoer marcelstoer added the bug label Aug 16, 2018
@wabmester

This comment has been minimized.

Copy link
Author

@wabmester wabmester commented Aug 17, 2018

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?

@marcelstoer

This comment has been minimized.

Copy link
Member

@marcelstoer marcelstoer commented Aug 17, 2018

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 😜

@marcelstoer

This comment has been minimized.

Copy link
Member

@marcelstoer marcelstoer commented Aug 17, 2018

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.

@marcelstoer

This comment has been minimized.

Copy link
Member

@marcelstoer marcelstoer commented Aug 18, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.