it does … not knowing exactly when apixu updates their data for your location … it keeps the wait down to a max of 29 minutes instead of a max 59 minutes.
with that in mind … polling every 5 mins is fine so long as you are using that api key for only one location.
Thank you for putting this together. Just want to share my current weather dashboard and the code I used to create it. I just put this together. Need to create some html to go full screen when clicking the on the radar map.
Thanks for all ot the work on this--just tried it and it seems to work well. One huge plus for me over OpenWeatherMap is that it actually reports weather for my town whereas OWM was giving me weather conditions for a city located over 15 miles away.
One question though; is there a way get notifications based on a certain temp threshold such as "Notify me if temp drops below 32 degrees"?
Updated mytile, resized the image to get back some space, added current forecast text. You will have to adjust the dashboard's font size, or set the tile size, to fit the text into the tile.
Update: there appears to be an issue with the tile's font-size not following the page setting. When the page is set to fontsize 12 generates the following html. At fontsize 8 it is 24px.
<span class="attribute resize mytile mid" style="font-size: 36px;">
Warren, New Jersey<br>37°F 64%<br>06:55 <img style="height:1em" src="https://cdn.apixu.com/weather/64x64/day/122.png"> 16:34<br>NE 7mph<br>Moderate or heavy snow showers
</span>v
This is a really nice driver and looks nice. One thing that I was wondering is if it would be possible to get wind speed in meters per second (m/s) instead of kph ? It seems ApiXU does not provide this by default, so it would have to be calculated.
I believe that what is needed is to divide kph by 3.6.
Not really. Meters per second is the norm here in my country and it is difficult to do the math every time as the factor is /3.6 from kph and god knows what from mph
This is how it would look like for 5.6 m/s. I have also run into this from other weatherstation sites. I think that most of Europe uses m/s for wind speed.
I want make all the data in the original https get available to another app, so I placed the entire obs data into attribute "rawdata". That works, but I get errors attempting to use the rawdata obs in the other app. Any ideas?
In Apixu
sendEvent(name: "rawdata", value: obs, isStateChange: true, displayed: true)
In the other app
def obs = [:]
then this fails
obs << apixuDTH.currentValue('rawdata')
Yes ! I can now see a reasonable Metres per second number and the tile from @arnb is now visible.
Superb assistance and much appreciated. I am just learning the ropes around here and hope to be up and running soon. Trying to make all the pieces fit in the puzzle.
EDIT: I do see the mytile, but it is no longer in the code (obviously, since I copied 4.0.3 from Github), so how can this be ? Is this residual and left over from the previous code ? There is no attribute: mytile in the current 4.0.3 that I copied. Strange ?
Probably not, but also not knowing how to do that, other than CTRL+F5 or something like that ? At least that is what I did, along with CTRL+R in chrome and I still have the mytile. Actually, I would like to have something like the mytile, but I will just have to put the code back in. It is just strange that the data seems to be stuck from the previous driver code.
To test this, I just removed the tile and tried to add it back and there it was again
I feel there is a lot to learn in with regards to Hubitat. At least for me, coming from Vera. There may be a slightly lower learning curve for ST people ?