Apixu.com worldwide weather data with outside lux. No PWS or server setup

i hear you. fortunately not too many tornadoes here in california. :slight_smile:

1 Like

Station Data File Location: *

Required, but I have no idea what to put here.

the apixu driver does not have that setting. :slight_smile:

It looks like you may be using the Weather-Display With External Forecast Driver. That driver requires a Personal Weather Station (PWS) using Weather-Display PWS software and that parameter is the file location of the PWS datafile (the location where the PWS stores it's data). If you do not have a PWS using Weather-Display software then that driver is not for you. You could use the driver discussed tin this tread instead.

Oh I see.

I have an AmbientWeather station that I've been using with WU and SmartThings. I'm trying to replace it but am a bit confused by all the options. I don't have Weather-Display, and I don't see anywhere in apixu where I can setup my PWS.

I suppose it would be fine to use generic localized data with apixu but I'd rather use my own PWS if possible. Does anybody know of a driver that supports Ambient Weather's own site, or PWS Weather Info?

@Cobra has a weather driver for a PWS that uses Weewx (a free PWS weather software). You could set that up with your PWS and use his driver. [RELEASE] Weewx Weather Driver With External Forecasting

@bangali

I do like this DH a lot btw! Thank you for creating it.

So my request.... :wink:

I noticed that the LUX calculations seem to be fairly spot on overall on sunny days. My issue really surrounds cloudy days. The LUX factor in the APIXU doesn't seem to reflect the true LUX of the environment. I would say that the actual LUX value on a cloudy day is 50% less than what the DH is reporting. Any way to add a check for "cloudy with a chance of meatballs" and then take into account a lower LUX value?

As an example currently at 3:30PM on 10/29/2018 with a sunny day it is 4,473. IF today was actually cloudy at this time the LUX would be more like 1900-2100. Make sense?

1 Like

you are welcome. :slight_smile:

thats already built in. here are some of the factors used in the adjustment:

Sunny = 1
Cloudy = 0.6
Overcast = 0.5
Mist = 0.5

and so on.

if any particular condition is not adjusted well enough … happy to update the factor for closer approximation?

I will look at the code on my next cloudy day. :grin:

1 Like

@bangali

Alrighty....guess what?!? It is cloudy with a chance of meatballs here in Chicago again today. So I went ahead and modified the following the following condition factors: cloudy, patchy rain possible, partly cloudy, to 0.4 which is representative of the true lux outside for this latitude. Maybe thoughts on a sliding scale for latitude could help with more accuracy.

Another thing was I am not seeing the polling/refresh happen correctly. When I went into the device information it stated the conditions was sunny but the conditions are not that. I did have my polling at every 5 minutes (why I do not know). Is there a limit of polls in a day/month? I reset it back to the recommended 30 minutes.

could do that … but would need user input from a range of locations to get to the right scale. :slight_smile:

the polling/refresh is probably happening correctly unless there are errors in the log. think apixu only updates their data hourly … at least for the free plan.

Gotcha! So polling every 30 minutes really doesn't do anything eh?

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.

1 Like

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.

    in Metadata
    attribute "mytile", "string"

    at the end of poll()
def mytext =obs.location.name + ', ' + obs.location.region
mytext+='<br>' + '<img src=https:' + obs.current.condition.icon + '>'
if (isFahrenheit)
	{
	mytext+='<br>' + "${Math.round(obs.current.temp_f)}" + '&deg;F ' + obs.current.humidity + '%'
	mytext+='<br>' + localSunrise + ' - ' + localSunset
	mytext+='<br>' + obs.current.wind_dir + ' ' + "${Math.round(obs.current.wind_mph)}" +'mph'
	}
else
	{
	mytext+='<br>' + obs.current.temp_c + '&deg;C ' + obs.current.humidity + '%'
	mytext+='<br>' + localSunrise + ' - ' + localSunset
	mytext+='<br>' + obs.current.wind_dir + ' ' + obs.current.wind_kph +'kph'
	}
sendEvent(name: "mytile", value: mytext, isStateChange: true, displayed: true)

The USA radar map is from http://www.intellicast.com/

  • radar --> current loops
  • select your location --> play animation
  • copy the image location of the animated map then use in an image tile

4 Likes

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"?

1 Like

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

def mytext =obs.location.name + ', ' + obs.location.region
if (isFahrenheit)
	{
	mytext+='<br>' + "${Math.round(obs.current.temp_f)}" + '&deg;F ' + obs.current.humidity + '%'
	mytext+='<br>' + localSunrise + ' <img style="height:1em" src=https:' + obs.current.condition.icon + '> ' + localSunset
	mytext+='<br>' + obs.current.wind_dir + ' ' + "${Math.round(obs.current.wind_mph)}" +'mph'
	mytext+='<br>' + obs.forecast.forecastday[0].day.condition.text
	}
else
	{
	mytext+='<br>' + obs.current.temp_c + '&deg;C ' + obs.current.humidity + '%'
	mytext+='<br>' + localSunrise + ' <img style="height:1em" src=https:' + obs.current.condition.icon + '> ' + localSunset
	mytext+='<br>' + obs.current.wind_dir + ' ' + obs.current.wind_kph +'kph'
	mytext+='<br>' + obs.forecast.forecastday[0].day.condition.text
	}
sendEvent(name: "mytile", value: mytext, isStateChange: true, displayed: true)

image

1 Like

Message Central will send or speak a message triggered by temperature threshold.

Andy

use WATO? :slight_smile:

you can even use rises and drops to get notification if there is sudden rise or drop of X degrees as well as above or below a temperature value.

@cobra and @bangali: thanks--I'll give these a try.

1 Like

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.

1 Like