Weather/Temp from online source

I’m not sure. I set it to 5 mins, but the device did not update automatically. Thus the reason I added a RM Periodic Trigger.

Perhaps @chuck.schwer can explain what the cache timeout is used for?

the device does not auto refresh as you noted… that cache timeout is for how long the device will return the previous values from weather underground until it again calls out to weather underground to return a new value. So if you call poll every 1 minute, and cache is 5 minutes you will only get a new result every 5th time. This is to save your weather underground key, if you signed up for the free service, you get 500 calls per day, this equals a call every 3 minutes before you run out of calls. If you have 2 different weather devices, you’d probably want to set them to 10 minute cache period in order to avoid running out of calls.

Also keep in mind that every time poll or refresh is called (and cache time is expired so the device actually reaches out to weather underground) it makes 3 calls to get “conditions”, “forecast” and “alerts”

1 Like

Thank you for the detailed explanation.

I set up my Wunderground virtual device and I can poll my weather station and see the results in the device event list. I cannot figure out how you set to RM to poll the device every 15 minutes? I see how to trigger a periodic event every 15 minutes, but I cannot figure out to “Poll” the Wunderground virtual device? Can you provide a little more guidance?

Thanks for your help.

You have to add a custom command to RM.

WU does not return Lux. If you look at the ST Smartweather Device Handler, you’ll see that ST made up the Lux values based on time of day and weather conditions.

I know. That was why I was hoping to have something similar to ST weather tiles. I guess I can put a lux sensor outside but I use lux from the ST tiles extensively for my window shades and some lights inside the house.

Thanks for pointing me in the right direction. I did figure it out.

How about solorradiation which could be used as a simulated LUX sensor.

Can you point me to the right direction on how you can tie solorradiation from WeatherUnderground to a simulated Lux sensor?

Thanks for pointing out the solarradiation value! I didn't know that was available on Weather Underground. So with the built in driver the weatherCache state variable isn't accessible outside the driver making it not a possibility to parse out solarradiation. I made a quick driver to access the API and pull this data until it's available in the built in driver. I plan on using this to help turn on lights before sunset and set dimmer levels possibly. I'll post a link to github with the driver once I get it cleaned up and add in some additional state data if anyone is interested.

2 Likes

I do this in WebCoRE now for ST. If you live in a populated area then you can use solar radiation as the lux value. Very reliable.

1 Like

I can help you test. Really want to get this working for my replacement of ST. I am SO close. Just need BigTalker2 and I can be off of ST.

Here’s the current version. There’s a few settings for polling:
Automatically Poll: Enable this to automatically poll every x minutes.
Poll Interval: Prevents polling run more than once during this interval. Clicking Force Poll will force an update. Automatically poll by this interval, if enabled.

Right now illuminance is directly mapped to solarradiation. I’m not sure how it worked on webCoRE. Is there a formula to convert W/M2 to lux?

1 Like

I hope to have this ported soon. I was able to move the code over, but there seems to be a variable passing/communication issue between child/parent apps which may require Hubitat support team/firmware involvement.

I updated the WeatherUndergroundCustom driver to include some additional current observation attributes and basic forecast information (high, low, conditions). This is done in the same API call so it won’t affect API call limits. Also fixed the auto poll interval to use the built in intervals. Poll interval limit is to protect API call limits in case anything else is calling poll().

Here are the updated attributes:
  • UV : 1.0
  • dewpoint_f : 21
  • feelsLike : 48
  • forecastConditions : Partly Cloudy
  • forecastHigh : 48
  • forecastLow : 20
  • humidity : 38%
  • illuminance : 409
  • observation_time : Last Updated on March 22, 4:12 PM CDT
  • precip_1hr_in : 0.00
  • precip_today_in : 0.00
  • pressure_in : 30
  • solarradiation : 209
  • temperature : 48.2
  • visibility_mi : 10.0
  • weather : Clear
  • wind_mph : 0.0
  • wind_string : Calm

Updated Github with the changes

2 Likes

So referring back to an earlier post, does an app have to be created to access his info? For example, what if I would like to flip a switch if the high for the day was above 85 degrees?

You could use the built in stuff like rule machine or simple lighting to do that

Can you give me a quick example. Since there isn’t a “capability” for weather forecast, I’m lost as to how to create a rule to pull the forecast info in.

Sorry misread your post. I thought you were asking to do something of the temp hit 85 not the forecast high. In that case you’d need a custom app,

The other option might be to create another device with capability temperature that only tracks the forecast high and sends it as temperature