OpenWeatherMap-Alerts-Weather-Driver

That could be easily done. In the current code the current day 'precip' forecast measurement is on line 523. It adds together both the rain and the snow amounts. You could multiply just the snow amount by 10. So change:
BigDecimal t_p0 = (owmDaily==null || !owmDaily[0]?.rain ? 0.00 : owmDaily[0].rain.toBigDecimal()) + (owmDaily==null || !owmDaily[0]?.snow ? 0.00 : owmDaily[0].snow.toBigDecimal())

to:
BigDecimal t_p0 = (owmDaily==null || !owmDaily[0]?.rain ? 0.00 : owmDaily[0].rain.toBigDecimal()) + (owmDaily==null || !owmDaily[0]?.snow ? 0.00 : owmDaily[0].snow.toBigDecimal() * 10)

Tomorrow's 'precip' amount (t_p1) is on line 529 and day-after-tomorrow (t_p2) is on line 530. The same change should be made there too.

Hope that helps.

1 Like

I updated my post at the same time you posted. Appreciate the code locations and suggestions.

Went with your suggestion. Quick and easy. Thank you! Makes more sense to me.
image

1 Like

Email response from OWM regarding snow. Oh well not going to happen.

Thank you for your inquiry.

Correct, we provide the liquid-equivalent of snow precipitation. Currently, the only way to find the depth of snow value (accumulated) is to use such a layer in Maps 2.0 (paid version)

​​​​​​​

I may have missed it if possible, but is there a way to split out the different weather alerts. For example, we currently have 3 active alerts: special weather statement, hazardous weather outlook and a severe storm warning. When it comes through I only have "Special weather statement +1". I use Node-RED to prioritize my alerts via Pushover and Alexa, but haven't yet ran into a case like this were the Special Weather Statement is the visible alert, but we have a Winter Storm Warning that should be prioritized.

Know of a way to get all the different alerts and possible prioritize the most severe?

There is no prioritization of alerts. The driver just lists the first alert as presented by the alert provider. If there are additional alerts it will show the "+#' to give you that indication. There is a hyperlink on the Tiles (the logo) that will take you to the alert provders details web page where you can see the details of the additional alerts, if they are available. There are no plans to add capabilities to the driver to provide any additional alert listings or prioritization of additional alerts.

Perhap try one of these? I have not used them so I don't know if they provide what you are looking for?

[Release] NOAA Weather Alerts

I'll take a look; thanks for the response.

From the Wiki:

Lux

An estimated Lux is calculated by the driver using sunrise/sunset/twilight begins/twilight ends/cloud cover/ and/or current conditions. The calculation assumes a maximum Lux of 10,000 for a clear sky at noon. It adjusts proportionally for time from twilight ends to Noon in the morning, and Noon to twilight begins in the afternoon (the closer to noon, the higher the number). It also factors in cloud cover. If cloud cover is not available, it will estimate from the weather condition text. The update lux routine checks at least every five minutes to see if a daytime/nighttime schedule change was needed (without polling) even if long polling intervals were selected. It also provides an updated Lux calculation (again, without Polling) due to the time change. The maximum lux is set by time of day as listed below:

  • From Twilight begins until Sunrise: 50
  • From Sunrise until Sunset: 10,000
  • From Sunset to Twilight ends: 50
  • Between Twilight ends and Twilight begins: 5

There is an option for 'lux smoothing/jitter control.' This basically rounds the lux calculation to reduce the variability (code/recommendation from @nh.schottfam) . This is optional and must be selected to enable it. The lux smoothing/jitter control works as follows: If lux estimation is greater than 1,100 --> round to the nearest '800' else If lux estimation is greater than 400 --> round to the nearest '400' else set lux = 5

1 Like

Thanks - I've implemented OWM and it works great. Does anyone know the range of the Lux values? Is there a realtime graph of Lux on the web anywhere I can review that anyone knows of?
thanks for your time.
Shu

1 Like

thanks Matt - I'll code based on 0-10k. I noticed that OWM has a pay for service that allows you to see graphs -but I'm not big on pay-for services that aren't critical... For now, thats what I'm going with. thanks!

HI !
Just wondering - how to get this pretty tiles to Dashboard.
Can pick device, then template. How to get tiles ?

See this post.

Thank You very much, My first day with Hubitat.

BTW noticed two versions of same driver - one for Package Manager, another standalone. Different version numbers with same description. PM version still not generated 3day tile (and not showing version number). Standalone version (0.5.1 by 12/12/2020) looks working better.

The HPM install points to the same driver file/location as the standalone driver file location. You may install it 'standalone' as a user driver, or install with HPM. Either should get you V0.5.1 dated 12/12/2020.

there is a bug with alert code in latest driver..

ie

alert says null

switching to weather.gov no longer gets the alert

weird switch to weather.gov and back to owm for alerts fixed it..

ie

Might be a little hard to trace that down ..... but I'll take a look. Thanks.

[UPDATED]
v0.5.2
01/26/2021

Changes:

  • Corrected an issue with Alerts where it would initially display " +null" after the alert immediately upon a new weather alert. That should have clear upon the next update.

image

Thanks.

2 Likes

@mathew - is there any chance of adding a space between the number and "knots" at the end of the last sentence? Thank you!

wx summary