×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Openweathermap driver error messages

  • Posts: 259
  • Thank you received: 34
Hi,
I have recently started using this driver in Ekos and I noticed that if the internet connectivity is down, it starts giving errors like :2021-11-02T09:21:55: [ERROR] unexpected character at 0 rather than a clearer description. Anyone else noticed this?
 
Clear Skies,
Pramod


My kit: SW 130PDS on a HEQ5 Pro mount, ZWO ASI533mc Pro, 30mm guidescope with ASI120mm mini, managed using Kstars/Ekos, RPi with Stellarmate OS, ASI224mc, bits and bobs for visual observations.
2 years 6 months ago #77185

Please Log in or Create an account to join the conversation.

  • Posts: 348
  • Thank you received: 69
Yes, I saw this today when my Internet flapped for a few minutes.
2 years 6 months ago #77211

Please Log in or Create an account to join the conversation.

  • Posts: 348
  • Thank you received: 69
I've also noticed that my API calls are not returning rain.3h parameter, just the rain.1h parameter. So unfortunately I'm not seeing any precipitation being logged in Ekos, as the driver only checks the non existent rain.3h paramter.

Example API response:
{"coord":{"lon":-3,"lat":50},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"base":"stations","main":{"temp":10.32,"feels_like":8.97,"temp_min":8.58,"temp_max":12.66,"pressure":1006,"humidity":60},"
visibility":10000,"wind":{"speed":0.45,"deg":31,"gust":2.24},"rain":{"1h":0.37},"clouds":{"all":34},"dt":1635950116,"sys":{"type":2,"id":2010217,"country":"GB","sunrise":1635923314,"sunset":1635958033},"timezone":0,"id":2640681,"name":"Devon","cod":200}

 
2 years 6 months ago #77215

Please Log in or Create an account to join the conversation.

I pushed a fix to GIT, please try to git pull and test.
2 years 6 months ago #77216

Please Log in or Create an account to join the conversation.

  • Posts: 348
  • Thank you received: 69
I did a quick test, but the rain has now gone here, I changed the Lat / Lon to a location where it was raining, and got some non-zero readings. Will continue to test along with my current location and see if it rains again.

For the OP, I guess we don't actually check whether the curl was successful in the driver either.
2 years 6 months ago #77217

Please Log in or Create an account to join the conversation.

  • Posts: 348
  • Thank you received: 69
 

Interesting, reading remains 0.00 , and we get a saw like graph - perhaps this is due to having both WEATHER_RAIN_HOUR and WEATHER_SNOW_HOUR, where perhaps we should add those figures together and have a single Precipitation parameter? Just a guess...

 

But it looks to work regarding the alerting.
Last edit: 2 years 6 months ago by Giles.
2 years 6 months ago #77218
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 348
  • Thank you received: 69
Hmm... I think there is still an issue, on the logic side of things, once the rain stops then OpenWeatherMap just stops reporting the rain parameter in the API response, so it never appears to clear and we still see the saw-tooth graph effect.

In any case the rain.1h / rain.3h / snow.1h / snow.3h are historical parameters for the last hour and three hours (if reported). I suppose that once the weather state code returns to 800 - 804 (clear or clouds only) then precipitation will need to be reset at some point, but at the moment it just remains as the last reported reading, until it starts to rain again.

The One Call API looks promising for forecasting rain in the next hour via the minutely report (but unfortunately is limited to 1000 calls per day on the free plan)  API Docs: openweathermap.org/api/one-call-api it would be nice to use this to check e.g. once every 15 minutes for forecast rain in the next 1 hour.
 
2 years 6 months ago #77220

Please Log in or Create an account to join the conversation.

  • Posts: 474
  • Thank you received: 168
I just pushed a pull request at github.com/indilib/indi/pull/1552 which should fix some of these problems (reporting errors from curl, clearing precipitation values, fixed labels) and generally clean up some old stuff.
The following user(s) said Thank You: Giles
2 years 6 months ago #77227

Please Log in or Create an account to join the conversation.

  • Posts: 348
  • Thank you received: 69
Thanks for that - it's been merged, and I'm testing it now, although no rain as yet, it looks very promising.
2 years 6 months ago #77233

Please Log in or Create an account to join the conversation.

  • Posts: 259
  • Thank you received: 34
Happy to help with testing if someone can tell/show me how to get the latest build.
Clear Skies,
Pramod


My kit: SW 130PDS on a HEQ5 Pro mount, ZWO ASI533mc Pro, 30mm guidescope with ASI120mm mini, managed using Kstars/Ekos, RPi with Stellarmate OS, ASI224mc, bits and bobs for visual observations.
2 years 6 months ago #77237

Please Log in or Create an account to join the conversation.

  • Posts: 348
  • Thank you received: 69
You can follow the build instructions here: github.com/indilib/indi/blob/master/README.md

When you come to the "make -j4" step you can actually just do "make -j4 indi_openweathermap_weather" to just compile that driver.
Similarly, when you come to the "sudo make install", I would just make a backup of the existing indi_openweathermap_weather that is installed in /usr/bin and copy the indi_openweathermap_weather in the build directory to /usr/bin.

Then you can test the new driver (it should show as version 1.1 in the INDI control panel).
The following user(s) said Thank You: AstroMuni
2 years 6 months ago #77264

Please Log in or Create an account to join the conversation.

  • Posts: 259
  • Thank you received: 34
I upgraded Kstars to 3.5.6 and indilib to latest and its working well on Linux. Waiting for update to Astroberry so I can test on RPi as well. Thanks all
Clear Skies,
Pramod


My kit: SW 130PDS on a HEQ5 Pro mount, ZWO ASI533mc Pro, 30mm guidescope with ASI120mm mini, managed using Kstars/Ekos, RPi with Stellarmate OS, ASI224mc, bits and bobs for visual observations.
Last edit: 2 years 5 months ago by AstroMuni.
2 years 5 months ago #77846

Please Log in or Create an account to join the conversation.

Time to create page: 0.724 seconds