OpenWeatherMap-Alerts-Weather-Driver

Also, looking at your device setup, you originally had it set for the 2.5 API key. If you just created a new API, it needs to be the 3.0 version.

1 Like

Hey all,

Fairly new to Hubitat - had one for a while but just shifting over some from Smartthings.

I've looked into this - but what makes me really nervous is that when I go to Weather API - OpenWeatherMap

to look into an API key - when you hit 'Subscribe' on the left (under One Call API 3.0 new) it takes you to a page that that says "\ "One Call by Call" subscription, Base plan, 0.15 USD per 100 calls (VAT is not included)".

When I select "Subscribe to One Call by Call" under 1,000 API calls per day for free
0.0015 USD per API call over the daily limit"
It takes me to the same page - " Base plan, 0.15 USD per 100 calls (VAT is not included)

  • so - no mention of the 1,000 API calls per day for free. Or a minimum.

Feels a little bait-and-switchy. I guess, supposing I did under 100 a day it wouldn't be that expensive -but I don't need yet another subscription in order to manage my outdoor weather-related routines... unless I do?

Is the 1,000 API free API calls a day a thing? And if not... why are they advertising it? (so, maybe I'm naive!).

Best,
Alec in RI

That line does not make it too clear but
Base plan= 1000 calls a day
Exceed 1000 calls and you'll pay $0.15 for every 100 calls after that.

My billing page is a little clearer.

BTW, I've never made more than 80 calls a day. The data doesn't update but every 10 or 15 minutes anyway.

1 Like

Thanks! You can see where it made me a bit nervous! I'll give it a try. Honestly, I just want to have outdoor weather temp for minor things like my bird bath heater and my snow-melting heating mats.

Best,
Alec

1 Like

Has anyone encountered partial data not being changed recently? I setup an automation to monitor the alert driver because my municipality introduced a new regulation saying we can't run any outdoor irrigation within 2 days of rain. Since my Rachio system can't handle this kind of restriction, I built one with RuleMachine polling the OpenWeatherMaps-Alert and it had been working up until a week or so ago.

The field I have been monitoring "RainToday" used to change, but it's stuck on "0".

Current States

  • PoP1 : 100

  • PoP2 : 100

  • alert : Hydrologic Outlook +2

  • alertDescr : ...MODERATE TO HEAVY RAINFALL WILL INCREASE FLOODING POTENTIAL ACROSS THE REGION... * WHAT...A significant and strong winter storm will impact the region Thursday into Friday with showers lingering into Saturday. This system is tapping into very moist subtropical moisture which will allow for moderate to periods of heavy precipitation. Latest model guidance suggests the coastal slopes of the Santa Cruz Mountains and Santa Lucia Mountains will receive the greatest accumulation of precipitation. Rainfall totals will range from 1.5 to 4 inches. Locally up to 6-8 inches over favored peaks and higher terrain of the Santa Lucia Mountains where prolonged moderate to heavy precipitation and higher rain rates are currently forecast. Moderate to heavy rain will lead to rapid rises of area rivers, streams, and creeks. This system will result in an increased risk of shallow mudslides and debris flow over wildfire burn areas as soil moisture nears saturation. Localized ponding of water in low- lying or poorly drained area

  • alertSender : NWS Monterey (The San Francisco area)

  • alertTile : Weather Alert for Santa Clara issued by NWS Monterey (The San Francisco area)
    Hydrologic Outlook +2
    @ 10:34 AM

  • city : Santa Clara

  • condition_code : cloudy

  • condition_icon :

  • condition_iconWithText :
    Light rain

  • condition_text : Light rain

  • feelsLike : 47

  • forecast_text : Light rain

  • forecast_text1 : Moderate rain

  • forecast_text2 : Heavy intensity rain

  • humidity : 83

  • illuminance : 4660

  • percentPrecip : 97

  • pressure : 30

  • rainDayAfterTomorrow : 1

  • rainToday : 0

  • rainTomorrow : 1

  • temperature : 49

  • threedayfcstTile :
    |Santa Clara|Today|Thursday|Friday|
    | --- | --- | --- | --- |
    |Now 49°F
    Feels 47°F||||
    ||Light rain|Moderate rain|Heavy intensity rain|
    |Low High|40°F 55°F|42°F 53°F|49°F 57°F|
    |PoP Precip|97% None|100% 1in|100% 1in|
    |6:30 AM 6:09 PM @ 10:34 AM|

  • ultravioletIndex : 2.97

  • weatherIcons : 04d

  • weatherSummary : Light rain with a high of 55°F and a low of 40°F. Humidity: 83%. Temperature: 49°F. Light breeze from the East-Southeast at 6 MPH, gusts: up to 6 MPH.

  • wind : 6

  • windDirection : 120

  • windSpeed : 6

Verify if OWM is returning a number for daily[0].weather.rain. (turn on extended logging, find your url in the logs and goto http://jsonviewer.stack.hu/ to view the results in a easier format to read.) If there is no 'rain' in the first block of daily (daily[0].weather.rain) then OWM is not reporting any rain.

I looked at my data poll return and I do not have a return for daily[0].weather.rain (because it has not rained today or OWM does not report it) so RainToday shows '0'. I do show 'rain' in subsequent daily data blocks (daily[3].weather.rain) .... but that is not used for RainToday. An extract of my data return is below.

Summary

"daily": [
{
"dt": 1678302000,
"sunrise": 1678281801,
"sunset": 1678323520,
"moonrise": 1678328460,
"moonset": 1678284540,
"moon_phase": 0.54,
"temp": {
"day": 36.59,
"min": 27.48,
"max": 37.76,
"night": 28.92,
"eve": 34.48,
"morn": 27.48
},
"feels_like": {
"day": 28.92,
"night": 23.41,
"eve": 28.18,
"morn": 27.48
},
"pressure": 1021,
"humidity": 61,
"dew_point": 25.3,
"wind_speed": 11.12,
"wind_deg": 126,
"wind_gust": 13.2,
"weather": [
{
"id": 804,
"main": "Clouds",
"description": "overcast clouds",
"icon": "04d"
}
],
"clouds": 100,
"pop": 0.08,
"uvi": 3.68
},
{
"dt": 1678388400,
"sunrise": 1678368105,
"sunset": 1678409985,
"moonrise": 1678418640,
"moonset": 1678372140,
"moon_phase": 0.57,
"temp": {
"day": 47.43,
"min": 28.27,
"max": 50.27,
"night": 31.96,
"eve": 42.31,
"morn": 31.37
},
"feels_like": {
"day": 41.09,
"night": 26.98,
"eve": 38.16,
"morn": 26.1
},
"pressure": 1015,
"humidity": 19,
"dew_point": 6.6,
"wind_speed": 21.88,
"wind_deg": 290,
"wind_gust": 30.69,
"weather": [
{
"id": 800,
"main": "Clear",
"description": "clear sky",
"icon": "01d"
}
],
"clouds": 0,
"pop": 0.2,
"uvi": 5.09
},
{
"dt": 1678474800,
"sunrise": 1678454409,
"sunset": 1678496450,
"moonrise": 1678509000,
"moonset": 1678459860,
"moon_phase": 0.6,
"temp": {
"day": 49.32,
"min": 29.1,
"max": 54.34,
"night": 41.27,
"eve": 44.73,
"morn": 29.1
},
"feels_like": {
"day": 47.07,
"night": 41.27,
"eve": 41.92,
"morn": 24.6
},
"pressure": 1006,
"humidity": 35,
"dew_point": 22.6,
"wind_speed": 8.84,
"wind_deg": 100,
"wind_gust": 9.8,
"weather": [
{
"id": 804,
"main": "Clouds",
"description": "overcast clouds",
"icon": "04d"
}
],
"clouds": 100,
"pop": 0.09,
"uvi": 5.54
},
{
"dt": 1678561200,
"sunrise": 1678540712,
"sunset": 1678582914,
"moonrise": 1678599420,
"moonset": 1678547700,
"moon_phase": 0.64,
"temp": {
"day": 57.6,
"min": 38.8,
"max": 60.94,
"night": 38.8,
"eve": 45.72,
"morn": 39.72
},
"feels_like": {
"day": 54.61,
"night": 32.52,
"eve": 38.89,
"morn": 36.21
},
"pressure": 1001,
"humidity": 33,
"dew_point": 28.35,
"wind_speed": 16.02,
"wind_deg": 120,
"wind_gust": 22.88,
"weather": [
{
"id": 500,
"main": "Rain",
"description": "light rain",
"icon": "10d"
}
],
"clouds": 99,
"pop": 0.42,
"rain": 0.7,
"uvi": 5.64
},
{
"dt": 1678647600,
"sunrise": 1678627015,
"sunset": 1678669378,
"moonrise": 0,
"moonset": 1678635780,
"moon_phase": 0.67,
"temp": {
"day": 43.38,
"min": 31.51,
"max": 46.47,
"night": 35.38,
"eve": 44.6,
"morn": 31.51
},
"feels_like": {
"day": 39.65,
"night": 27.48,
"eve": 38.89,
"morn": 28.15
},
"pressure": 1015,
"humidity": 43,
"dew_point": 22.05,
"wind_speed": 11.21,
"wind_deg": 99,
"wind_gust": 15.46,
"weather": [
{
"id": 500,
"main": "Rain",
"description": "light rain",
"icon": "10d"
}
],
"clouds": 19,
"pop": 0.32,
"rain": 0.17,
"uvi": 5.47
},
{
"dt": 1678734000,
"sunrise": 1678713317,
"sunset": 1678755842,
"moonrise": 1678690020,
"moonset": 1678724220,
"moon_phase": 0.7,
"temp": {
"day": 38.59,
"min": 26.47,
"max": 46.78,
"night": 39.9,
"eve": 46.78,
"morn": 26.47
},
"feels_like": {
"day": 34.75,
"night": 39.9,
"eve": 44.85,
"morn": 20.66
},
"pressure": 1023,
"humidity": 49,
"dew_point": 20.98,
"wind_speed": 5.88,
"wind_deg": 65,
"wind_gust": 8.37,
"weather": [
{
"id": 600,
"main": "Snow",
"description": "light snow",
"icon": "13d"
}
],
"clouds": 17,
"pop": 0.43,
"snow": 0.1,
"uvi": 6
},
{
"dt": 1678820400,
"sunrise": 1678799619,
"sunset": 1678842305,
"moonrise": 1678780740,
"moonset": 1678813260,
"moon_phase": 0.75,
"temp": {
"day": 54.19,
"min": 35.56,
"max": 60.31,
"night": 49.42,
"eve": 60.24,
"morn": 35.56
},
"feels_like": {
"day": 50.72,
"night": 48.54,
"eve": 57.18,
"morn": 35.56
},
"pressure": 1014,
"humidity": 30,
"dew_point": 23.27,
"wind_speed": 4.72,
"wind_deg": 117,
"wind_gust": 5.86,
"weather": [
{
"id": 800,
"main": "Clear",
"description": "clear sky",
"icon": "01d"
}
],
"clouds": 3,
"pop": 0.01,
"uvi": 6
},
{
"dt": 1678906800,
"sunrise": 1678885921,
"sunset": 1678928768,
"moonrise": 1678871280,
"moonset": 1678902900,
"moon_phase": 0.77,
"temp": {
"day": 58.86,
"min": 42.98,
"max": 65.14,
"night": 52.68,
"eve": 61.2,
"morn": 42.98
},
"feels_like": {
"day": 55.62,
"night": 49.71,
"eve": 58.48,
"morn": 42.98
},
"pressure": 1001,
"humidity": 25,
"dew_point": 23.31,
"wind_speed": 7.16,
"wind_deg": 103,
"wind_gust": 9.82,
"weather": [
{
"id": 803,
"main": "Clouds",
"description": "broken clouds",
"icon": "04d"
}
],
"clouds": 73,
"pop": 0,
"uvi": 6
}
]
}

Hope that helps.

Yes.

The threedayfcstTile hasn't changed since last week.

Edit: forced a refresh and it's now current

Appologies for not getting though all 900 posts :slight_smile:
I have this installed and working for the last few years but now I want to automate my blinds in WC with some data from OWM.

  1. Is there a definitive list of the results returned from the attributes?
  2. I can see attributes for Rain and Cloud today but why no Sun? I just want to open the blinds at a different angle if it's going to be nice that day.
    Cheers

5 days in to Hubitat I gotta say that setting this up was a mission, took me some time to figure out I required the OpenWeatherMap subscription. All's well that ends well...thanks for the driver.

  1. No. API documentation is here.

  2. The API does not offer a 'Sun' attribute. I think of that as the reciprocal of 'Cloud' ( e.g. if 'Cloud'=10% then Sun should be '90%). Alternatively, the driver does provide an estimate of illuminance (Lux).

1 Like

Thanks. That was my fall back If NOT cloudy etc.
I already have a Lux sensor but that varies too much as the sun moves/clouds fly overhead.
I'll give the prior a shot, it's just to get a bit of a good angle on the drapes to capture sun otherwise they are flat for an unobstructed view.

The lux readings in open weather should be a bit smoother in changing....you might want to enable them and have a look.

Update.
I noticed the "weathericons" attribute changes the icon that reflects the current weather :slight_smile:
I now test for 01d (sunny) and 02d (Few Clouds) and can open my drapes appropriately for the current days weather!

1 Like

But does that really indicate if the sun is out in your area? Where I live the weather channel may indicate it's sunny, but in reality it might actually be cloudy at my house for most of the day. This is why I think you'd need a liminosity sensor no matter what.

1 Like

New to this driver. Would like to integrate the wind data for awning opening and closure.

I'm on a basic free plan and would like to know how I can tell how many api calls I did for the day?

If, after you sign on to your account, you go to: https://home.openweathermap.org/statistics/onecall_30
This will show you a log of your call statistics. I'm averaging around 90 daily calls. The maximum number of calls you can make without being charged is 1,000.

You can also set an upper limit of calls by going here: https://home.openweathermap.org/subscriptions

I have mine set to 999 to automatically prevent me from ever getting charged.

2 Likes

Thank you for these links.

Can you elaborate on this? Where would I set this?

As I mentioned in my original response to you:
You can also set an upper limit of calls by going here: https://home.openweathermap.org/subscriptions

You have to have an account and One Call subscription already set up and then go to the link above to set the upper call limit per day.

It will look something like this (note the '999' entry:)

1 Like

Dohh, :sweat_smile: didn't realize that was editable field. I thought it was just displaying how many calls a day. Thank you again.

1 Like

No it's not as accurate as the local government forecast but if my blinds are even 80% correct that's fine.
I just want to capture some sun at the proper angle and the rest of the time, crappy out, see straight out. Most of the error will be on the crappy side so I will just get more view :wink:

1 Like