[PROJECT] Weather Service Monitor 4 Hubitat Driver

I'm a happy user of your Ambient Weather Driver so I'll be following your work here as well. I am very interested in the driver for Weather.gov.

BTW, thanks for all your hard work!

I have also posted recently.as I am looking for a rain % to use for a umbrella reminders it wouldbe nice to see this from weather driver that is not darksky

No worries. I started this yesterday "just because" with the US one. Then I remembered someone commenting before that it is great for the US but what about others and I think they were in the UK. So I checked for that... I figured I would just make it more convenient.

% of rain would be problematic from the US one as it does not provide it (not in the sample I have, see below). The UK has it in theirs as does OpenWeather, so overall it will be in the driver. Maybe tonight... maybe over the weekend.

{
            "number": 3,
            "name": "Thursday",
            "startTime": "2020-04-16T06:00:00-04:00",
            "endTime": "2020-04-16T18:00:00-04:00",
            "isDaytime": true,
            "temperature": 40,
            "temperatureUnit": "F",
            "temperatureTrend": null,
            "windSpeed": "13 to 17 mph",
            "windDirection": "W",
            "icon": "https://api.weather.gov/icons/land/day/snow,20/snow,30?size=medium",
            "shortForecast": "Slight Chance Snow Showers",
            "detailedForecast": "A slight chance of snow showers between 8am and 1pm, then a chance of rain and snow showers. Mostly sunny, with a high near 40. West wind 13 to 17 mph. Chance of precipitation is 30%. New rainfall amounts less than a tenth of an inch possible."
        },

It is in open weather map. You can see the discussion here Chance of rain %?

That is what I said, it is in OpenWeather. Just people only relying on the US NWS would be out of luck. But if you are looking at the OpenWeather one, you will be able to have it and I will be putting it in soon I think.

UPDATED:
Version 0.03 is now posted. I have added in ChanceRain & Sunrise/Sunset information (both Epoch & Date formats) for OpenWeather & UK, among other things.

Version 0.04 is now posted. This had a pretty substantial rewrite of how data is handled... But the main things useful to users are:

  1. Many more attributes are now covered per service.
  2. Icon URLs are now included for those that want them (US & OpenWeather).
  3. DetailedForecast from the US service is now parsed for information like chance of rain, snow, or wind gusts. So even though the API results did not directly include those, they will be provided to users if they are in the forecast.

UPDATED (2 days later):
Version 0.05 is now posted. Main changes are:

  1. Weather API is now added.
  2. World Weather Online is now added.
  3. Confirmed Australian weather is accessible via the UK API.

I have been trying to find if particular countries have national weather service APIs that can be checked (without an upfront cost just to develop it). I am open to additional services to add in, just let me know.

1 Like

Version 0.06 is now posted. Mostly just a rework of how data is posted and handled, it made the driver substantially smaller and easier to work with.

If this provides tomorrows High and Low temperature, this would solve a problem for me. I would like to have a Rule that makes a decision on whether to cool or heat the house at night depending on tomorrows temperature. Thanks for the update!

It will depend a bit on which API you are using... but it looks like most of them have the data included in what is returned so I should be able to add something in the next couple days. I have not worked on this driver in some time and it obviously needs some major overhaul as well to match up with how I handle some things now.

In any case, it looks like the following APIs will be able to provide max/min (high/low) temp for the next day:
OpenWeather
UK Met Office (United Kingdom & Australia)
WeatherAPI

The US National Weather Service data I rely on DOES NOT provide max/min in the forecasted data. Maybe they have a different API call... but I will focus on the other those first.
WorldWeatherOnline also provides max/min but my development API Key has expired and I will not pay. However, the sample data I captured originally shows it so I will try to build it in.

Awesome. Ya, I found it odd that the built-in OWM doesn't include forecast data. I would think people would want to know if tomorrow will be hot and tonight will be cold. You could write a notification to open your windows, or turn your furnace ventilator on full blast. Cool the house down then in the morning you won't have to use the AC as early in the day. That is essentially the function I am trying to build.

HSM4Hubitat version 0.7.0 is now posted.

Besides general changes and improvements there were two main changes:

  1. The logging method was updated, so you will likely have to Save Preferences with your new selection there.
  2. Addition of Today_MinTemp, Today_MaxTemp, Tomorrow_MinTemp, and Tomorrow_MaxTemp that are populated by all the APIs EXCEPT the United States National Weather Service. They do not seem to provide it.

Awesome! Totally does what I was looking for! Thanks

1 Like

Version 0.8.0 is now posted. I have added support for Weather Underground's API now.

I haven't looked at the code yet but does your app/driver use TTS to announce NWS alerts? That's what I want the most seeing that Halo+ had this and I miss having those alerts broadcast.

No, it does not. I do not have any special Alert mechanism built into the driver at all, and I do not know that any of these services provide an Alert in any of the methods I am querying (they might overall, but I focused on general conditions and forecast). I think someone else had a driver that did that specifically for a bunch of services, but I forget whose it was.

I have a couple Halo+ myself. It is so disappointing to me that the company died off and in another few years I will have to replace all my Halo detectors with other stuff that I know will not be half as feature rich.

I installed the driver to see data from my PWS using WU. I encounter 2 problems: It only get data if I force refresh. It does not refresh by itself. (It is set on hourly refresh). There is no event showing nor anything written in the logs.

The second problem is that it does not populate anything in the weather tile of the dashboard.

The data is correctly fetch when I do it manually and is showing in the device page but it does not go in the tile.

I'm new to hubitat (comming from smartthings). What am I doing wrong?

I will check tonight. It could be a bug on my end for the refresh. I will also have to check what attributes the weather tile uses, I do not use it myself with this driver (since most of the attributes are custom), but I will see about getting it populated if it does not now.

@ymerj:
You were not doing anything wrong. I checked and I had broken the refresh for 1 hour accidentally. I will note that the weather tile did not work because it was not intended to. This driver is not really meant for "monitoring" your current weather much (thus the lowest refresh of 1 hour). It is more geared towards providing a forecast on your day, night, next day... That said, read below...

All:
Version 0.8.1 is now posted. This fixes the 1 hour refresh that ymerj found. I also added events for some of the most basic items so the weather tile should work (per @ymerj's use) as well as added more attributes for WU.

I will note that I am making an entirely NEW driver that will be a substantial improvement on this one if you are just trying to use it for current weather status (ie: getting your own PWS data from an API). In fact, it will replace a couple of my existing drivers that perform that and consolidate code for me. Hopefully I should have it out in the next week or so. My goal is to have it handle all 8 of the current weather APIs I currently deal with across 3 drivers.