Weather block (from openweathermap)

367 views
Skip to first unread message

Adriano Marzano de Carvalho

unread,
Jun 1, 2016, 1:53:15 PM6/1/16
to Automate
Hi,

I'm trying to use it, but "rain" information always comes null.
Is that a problem? I mean, I just checked directly in the website, and it has rain information for the next hour. Using the block, it's null.
Thanks.

Henrik "The Developer" Lindqvist

unread,
Jun 1, 2016, 2:18:48 PM6/1/16
to Automate
Seems to work as expected for me, with both hourly and daily forecasts.
Try logging the temp also, it should always be available.

Adriano Marzano de Carvalho

unread,
Jun 1, 2016, 2:57:52 PM6/1/16
to Automate
I am logging temp, cloudiness, humidity..they all work. Only one empty/null is rain for me.
I'll keep checking it.

If no rain is expected, does it come null or 0?

Henrik "The Developer" Lindqvist

unread,
Jun 1, 2016, 3:06:32 PM6/1/16
to Automate
Likely null, i.e no value.

Adriano Marzano de Carvalho

unread,
Jun 1, 2016, 3:19:40 PM6/1/16
to Automate
Just confirmed it. Also confirmed that it's working, it's jut not accurate.
I mean, it's raining right now, other websites say it'll rain on the next 4 hours.
By using "hourly", I managed to get rain only after 4 hours in the forecast.

Anyway, I'll see whether I'll keep using it, or try another with http block.
Question: forecast timestamp shouldn't reflect the current time + hours in forecast?
When testing it, it's always set to current time.

Henrik "The Developer" Lindqvist

unread,
Jun 1, 2016, 6:16:32 PM6/1/16
to Automate
"Time of data forecasted, unix, UTC"
http://openweathermap.org/forecast5

Adriano Marzano de Carvalho

unread,
Jun 2, 2016, 12:44:07 AM6/2/16
to Automate
I performed some tests, starting to understand few things. My log (please, ignore rain as 0. It actually comes null, this is number formatting):

2016-06-02 01:37:38.422 USER 1395@49: Forecast Time 02/06/2016 01:30 : Forecast 0 Temp 23 and rain 0
2016-06-02 01:37:39.244 USER 1395@49: Forecast Time 02/06/2016 01:30 : Forecast 3600 Temp 23 and rain 0
2016-06-02 01:37:39.935 USER 1395@49: Forecast Time 02/06/2016 01:30 : Forecast 7200 Temp 23 and rain 0
2016-06-02 01:37:40.632 USER 1395@49: Forecast Time 02/06/2016 01:30 : Forecast 10800 Temp 23 and rain 0
2016-06-02 01:37:41.274 USER 1395@49: Forecast Time 02/06/2016 03:00 : Forecast 14400 Temp 23 and rain 3.91
2016-06-02 01:37:42.222 USER 1395@49: Forecast Time 02/06/2016 06:00 : Forecast 18000 Temp 22 and rain 1.38
2016-06-02 01:37:43.023 USER 1395@49: Forecast Time 02/06/2016 06:00 : Forecast 21600 Temp 22 and rain 1.38
2016-06-02 01:37:43.751 USER 1395@49: Forecast Time 02/06/2016 06:00 : Forecast 25200 Temp 22 and rain 1.38
2016-06-02 01:37:44.480 USER 1395@49: Forecast Time 02/06/2016 09:00 : Forecast 28800 Temp 24 and rain 0
2016-06-02 01:37:45.297 USER 1395@49: Forecast Time 02/06/2016 09:00 : Forecast 32400 Temp 24 and rain 0
2016-06-02 01:37:46.014 USER 1395@49: Forecast Time 02/06/2016 09:00 : Forecast 36000 Temp 24 and rain 0
2016-06-02 01:37:46.738 USER 1395@49: Forecast Time 02/06/2016 12:00 : Forecast 39600 Temp 26 and rain 0
2016-06-02 01:37:47.564 USER 1395@49: Forecast Time 02/06/2016 12:00 : Forecast 43200 Temp 26 and rain 0

So, forecast time is always changed by 3 hours, even when I set 2 hours only.

Another thing is that reading the documentation you sent, I found this:

list.rain.3h Rain volume for last 3 hours, mm

Attention to the "LAST 3 HOURS".

So, if I'm checking with forecast 6:00am, does it mean that rain output will be valid for period 03:00-06:00am? Am I right on this?

Sorry if it sounds stupid, but documentation on the block or openweb's site isn't very clear to me.

Adriano Marzano de Carvalho

unread,
Jun 2, 2016, 1:02:16 AM6/2/16
to Automate
One last thing: from the block we have rain (mm) available, but no precipitation probability.
Would it be possible to add it?
As far as I understood from websites I read, it's possible to have high mm, but low probability or vice-versa.

Am I crazy on that?

Grigory Kruglov

unread,
Jun 2, 2016, 1:51:17 PM6/2/16
to Automate
I have the same problem with missing rain value.

It seems that the docs (http://openweathermap.org/forecast5 ?) list rain and rain.3h as json outputs, but when displaying rain in a notification it's always an empty string. Other values work fine.

Thanks,
Grisha.

Henrik "The Developer" Lindqvist

unread,
Jun 2, 2016, 2:40:39 PM6/2/16
to Automate
The openweathermap API only providers the current forecast, 3 hourly for 15 days and daily forecast for 16 days.
The Weather block tries to pick the most appropriate forecast requested.

Henrik "The Developer" Lindqvist

unread,
Jun 2, 2016, 2:58:47 PM6/2/16
to Automate
It looks like some calls are missing rain (current weather forecast):
{"coord":{"lon":-0.13,"lat":51.51},"weather":[{"id":300,"main":"Drizzle","description":"light intensity drizzle","icon":"09d"}],"base":"cmc stations","main":{"temp":284.52,"pressure":1019,"humidity":76,"temp_min":283.15,"temp_max":285.45},"wind":{"speed":4.6,"deg":10},"clouds":{"all":90},"dt":1464891857,"sys":{"type":1,"id":5091,"message":0.0043,"country":"GB","sunrise":1464839247,"sunset":1464898234},"id":2643743,"name":"London","cod":200}

For
list/rain/3h property is used for current/hourly forecasts, for daily it's list/rain
Message has been deleted
Message has been deleted

Adriano Marzano de Carvalho

unread,
Jun 2, 2016, 10:44:36 PM6/2/16
to Automate
What about precipitation?
And will u change the block?
I understood that null rain = no rain at all.
I just found openweather not as accurate as other providers :(

Thanks.

Henrik "The Developer" Lindqvist

unread,
Jun 3, 2016, 2:33:46 PM6/3/16
to Automate
The <precipitation/> tag is only used in the XML format, in JSON the "rain" property is used.

What i can see there's no need for change, Automate is reading the response as expected.

Sadly openweathermap is the only free service i could find.

Adriano Marzano de Carvalho

unread,
Jun 3, 2016, 3:16:53 PM6/3/16
to Automate
OK, thanks for the quick reply. I'll continue evaluating it.

Alan Summerfield

unread,
Aug 9, 2023, 10:46:00 AM8/9/23
to Automate
Hi, 
I'm rekindling this old thread as I'm having the same trouble with the rainfall amount where the weather block returns a valid result  only if I set the forecast to more than 3 hours, even when it's raining at my location.
<Sadly openweathermap is the only free service i could find>
Have you seen https://open-meteo.com/ ?
Kind regards,
Alan
Have you tried

andreas.s...@web.de

unread,
Aug 10, 2023, 2:29:59 PM8/10/23
to Automate
I am using open-meteo.com for general weather data and weatherbit.io
 just for minutely rain forecasts (very precise!). Both are free for non-commercial use.

Henrik "The Developer" Lindqvist

unread,
Aug 11, 2023, 4:31:19 AM8/11/23
to Automate

andreas.s...@web.de

unread,
Aug 11, 2023, 10:00:38 AM8/11/23
to Automate
scroll a bit down and there is the section "Free for non-commercial". I am using this API (for myself, of course) for quite some time now. Data can be retrieved as csv, so it is easy to parse through.

Henrik "The Developer" Lindqvist

unread,
Aug 11, 2023, 1:26:06 PM8/11/23
to Automate
Using it in Automate would considered "commercial use".

andreas.s...@web.de

unread,
Aug 11, 2023, 3:03:17 PM8/11/23
to Automate
that's correct. But the APIs can easily be used inside of automate flows - not so convenient like the weather block but way more feature rich :)
Reply all
Reply to author
Forward
0 new messages