I did look at the logs. I do not see any errors or other indications that there is a problem. I checked Wunderground API Analytics and I have plenty of polls remaining. Everything else does appear to be updating. I am stumped???
I will load your next update and see if that makes a difference. If not, I will remove it completely and then re-add it. I am not currently using Weather_Summary ā¦ but I was thinking about it. Everything else in the driver is working well.
I have a question ā¦instead of making two separate calls to WU, one for Conditions and Forecast and one for Alerts, is there a reason you cannot just make one call for all three? I changed line #131 to:
I also commented out the params2 sections and changed the Alert call to Resp1 and it seems to work. This cuts the number of API calls made in half, so you can shorten your intervals without going over the 500 calls per day limit of the free plan.
Any reason this would not work ā¦ or something I am missing? Thanks.
My version is here (just for testing. Will need cleaned up if this is a valid approach.)
If that works we could also add to the call for WUās ā/astronomyā which has the data elements of sunrise.hour, sunrise.minute, sunset.hour and sunset.minute. With that we could build Sunrise and Sunset times for the station. I saw someone requested that and I also saw some code from ST to build this fairly easily.
@Matthew
Good call!
I have implimented this and cleaned up the code a bit
Iāve also added a resetable āPoll counterā to keep an eye on things while testing
Added 3 attributes - Rain tomorrow & the day after and Station_State (& lowercase āstateā)
@Matthew@bangali
Guys, Iām having trouble finding the time to maintain two versions of this driver now as I am working on other stuff.
Iām happy for you to take the lowercase driver from me if you wish (as this seems to be the one you are using) as Iām concentrating on some apps and the uppercase driver is developed enough for my use with Weather Switch and my expected use for my irrigation app Iām looking at.
GutHub has been updated with the latest version: 2.1.1
One thing to note:
If you still want this to work with Weather Switch then please let me know if you change the version number state variable
This needs to match what is in WS as it check for driver version
Thank you! Itās a beautiful thing. (Iāve just played with the driver so far.) Iāve been trying to get a rain forecast into ST for a couple of years and this finally does it. I still have my irrigation device on ST, so Iām in the position of using your code to throw a shared switch in Hubitat that will be used by ST for irrigation go/nogo. Until I can be more elegant.
I added localSunrise and localSunset to this driver. I use this for some dashboards like SmartTiles. Now the weather tile in SmartTiles shows the Sunrise/Sunset time. It use to be 'null' for both. Still one call to WU API so no additional hits.
For another application (not irrigation), I'm using your driver with a webCoRE piston. It doesn't seem to get current data. I've added a Poll and ForcePoll before I grab the temperature, but that doesn't guarantee the latest. For instance, this morning, it gave me last night's temp.
What is the best method to make sure any app gets current info? Would a Refresh command do what I want?
BTW, what's the difference between Poll and ForcePoll?
@CAL.hub
First off you will need to enable the capabilities and lowercase data if using anything but Weather Switch.
Poll and forcepoll are the same except that a normal poll wonāt run all the time.. only if the āpoll interval limitā has been exceeded.
Forcepoll will poll everytime itās called (ignoring the limit restriction)
Donāt forget the free wu account has a max poll of 500 per day
(If you check the log it will normally show an error message if limit has been exceeded)
āRefreshā is not a command that will work (the command doesnāt exist in this driver)
For future reference, all ācommandsā will appear on the driverās page
E.g. this driver has 3 commands: poll, forcepoll and resetpollcount
How often are you trying to poll/forcepoll and how often does the station update WU?
If the station is updating often enough then a poll/forcepoll should get the latest data.
@Matthew is the driver updating for you?
It seems to be working perfectly for me, updating every 10 mins as configured (Iām not using capabilities though)
Seems to be working great. Since it is using a single call to WU now I decreased my interval to 5 minutes and I am still well under the 500 calls per day limit on the free plan. Updates are happening as scheduled. I don't think I have any of these attributes used in my webCoRE pistons, but I do use the 'illuminance' as a restriction to control turning on some lights with movement in the Hubitat Simple Lighting app.
Hi @Cobra Just wanted to let you know that I upgraded to the new 2.4 version of the driver today! Thanks for all your hard work on this! It looks like it has improved in many ways, but I think I found a small bug. The driver no longer shows as an "Illuminance" device in Rule Machine. Here are some screenshots.