OpenWeatherMap-Alerts-Weather-Driver

Just loaded this up and it's already pulling in almost everything perfectly.

"Weathericons" seems the only thing returning weird data and I'm unlikely to need it, so it's sweet !

Thanks. I'll look at that. Some of the other dashboards look for 'weatherIcons' and they need to be specific values. I'll probably have to map those to the condition codes.

1 Like

@Matthew
How often does the illuminate value update? Will it update with the interval setup on the "External Source Poll Interval" setting or will it update even more regularly?

This is working well for me. I have to admit, I was confused seeing forecastHigh and forecastLow values following temperature as it dropped tonight. I wrongly assumed they were the forecasted min/max temps for the day. :crazy_face:

Thank you for this driver!

[UPDATED] (and so it begins .....)
V0.0.2
04/17/2020

Changes:

  • I finally got an alert so I updated the code to properly show that in the MyTile, AlertTile and weatherSummary.
  • Capitalized the condition_code displayed.
2 Likes

The NWS alerts and all OpenWeatherMap data will be polled at the same frequency you set for "External Source Poll Interval".

The only nuance on illumination/Lux is it updates the calculation and checks every five minutes to see if it is time to change the polling update frequency between 'Daytime' and 'Nighttime'. No polling in done during this update and check so weather variables used like cloud cover and condition code are not updated in this process. It does the calculation because Lux is dependent on the time of day (% of day from twilight ends to Noon and Noon to twilight begins; the closer to Noon, the higher the Lux returned).

1 Like

That seems odd to me too. The data available is:

  • daily.temp
    • daily.temp.morn Morning temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
    • daily.temp.day Day temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
    • daily.temp.eve Evening temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
    • daily.temp.night Night temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
    • daily.temp.min Min daily temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
    • daily.temp.max Max daily temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.

The only thing that may make sense is to do a calculation of the min(morn, day, eve, night) for the forecast minimum and a max(morn, day, eve, night) for the forecast maximum. I'll look at those results tomorrow and see if that may be worth pursing.

1 Like

I am attempting to get weather data into Hubitat for the first time - as opposed to converting to your driver from something else. A couple questions:

  1. what do I type in the preference box "Type OpenWeatherMap.org API Key Here *"?
  2. how do I get a display like njanda showed above?

Once you sign up for a free account at Members, you will be issued an API Key that you will paste in that box. Then you can go through the preferences and select which attributes you would like the device to display. Press save preferences, and those attributes will populate once data is returned.

1 Like

So, this is different. Around midnight, the forecastHigh and forecastLow updated to realistic values and now update every three to four hours, as one would expect for a daily forecast.

At this point, I wouldn't waste any time on this as it may have sorted itself out. I'll keep watching it.

Thank you

1 Like

Could you create a version to work with met office?
https://metoffice.apiconnect.ibmcloud.com/metoffice/production/node/175

Happy to be a tester

@Matthew

Thanks this is working well so far, thanks for the time you putting in.

I probably could, but I will not. Please feel free to adapt the driver to that API on your own.

[UPDATED]
V0.0.3
04/18/2020

Changes:

  • More fixes on Alerts (hard to test this one so perfecting this may take a while).
  • Mapped traditional 'condition_code's to condition_code, weatherIcon(s) and forecastIcon for dashboards that use those.
  • Various bug fixes and formatting corrections.

Please let me know if see anything that is not working properly and I will attend to it as soon as I am able. Thanks.

1 Like

[UPDATED]
V0.0.4
04/18/2020

Changes:

  • Adjusted some icons selected by certain weather conditions.
  • Made all forecast icons appear as 'daytime', regardless of current time of day.
  • Code corrections, optimization and bug fixes by @nh.schottfam (Thank you!).
1 Like

[UPDATED]
V0.0.5
04/19/2020

Changes:

  • More code clean up and optimizations from @nh.schottfam (Thanks!)
  • Improved some logging messages when 'Extended Logging' is turned on.
1 Like

Thanks. It is working great now. I set up a separate dashboard to display all of the weather data that is provided through this one device.

1 Like

Matt. Getting an error tonight.

[UPDATED]
V0.0.6
04/20/2020

Changes:

  • Refactored much of the code.
  • Made the driver compatitible with the Hubitat Package Manager in the 'Integrations' category.

Try the updated version and report back if you are still see those error.