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

Be certain to actually select the attribute.... the first row is blank.

DOH!!

Face Slap!

Thanks I think I have it now.

I did one too for not remembering that pitfall last night on my first reply.

:man_facepalming:

The problem with Hubitat is that once you get stuff working you don't have to fuss with it and you forget, or at least I do.
Thanks again, have a great day

2 Likes

Just playing around here. How can I change the mytile? Is that in the DH?

This is a Thread about the original APIXU driver code. I don't use that anymore, having cloned/forked to a different version: wx-ApiXU-Driver. I did that to try and reduce the load on the Hub. Which I think I've accomplished, in the form of splitting the subset of features to run independently and thus introduce gaps in the continuous CPU load.

And like so many other portions of this code, didn't look at what MyTile is doing. I think it's a fixed display hard coded into the driver. I've had one other query into making that 'different' - but I'd only do that in the code I've cloned/forked.

I am getting an Unauthorized error. Here is the Live Log:
dev:392019-09-18 07:26:37.791 pm warnNo response from ApiXU API

dev:392019-09-18 07:26:37.786 pm errorhttp call failed for ApiXU weather api: groovyx.net.http.HttpResponseException: Unauthorized

dev:392019-09-18 07:26:37.505 pm debug>>>>> apixu: Executing 'poll', location: 80504

I get data from the apixu site:
http://api.weatherstack.com/current?access_key=1d622c02ba965d4862440edae43c5e08&query=80504

{"request":{"type":"Zipcode","query":"80504","language":"en","unit":"m"},"location":{"name":"Longmont","country":"USA","region":"Colorado","lat":"40.160","lon":"-104.966","timezone_id":"America/Denver","localtime":"2019-09-18 19:23","localtime_epoch":1568834580,"utc_offset":"-6.0"},"current":{"observation_time":"01:23 AM","temperature":22,"weather_code":113,"weather_icons":["https://assets.weatherstack.com/images/wsymbols01_png_64/wsymbol_0008_clear_sky_night.png"],"weather_descriptions":["Clear"],"wind_speed":17,"wind_degree":310,"wind_dir":"NW","pressure":1018,"precip":0,"humidity":25,"cloudcover":0,"feelslike":23,"uv_index":0,"visibility":16,"is_day":"no"}}

Any ideas?

Nevermind, they are getting rid of the old interface.

I'm getting this error as well. Is there a fix for the unauthorized error? I'm not getting any data

The APIXU API has been deprecated. Many here have transitioned to

2 Likes

Since Dark Sky no longer issues API keys I took this driver as a starting point and rewrote it to work with the free API from weatherstack. They allow 1K API calls per month so you can poll every hour with no problems. You can find it here if you are interested - GitHub - craigde/hubitat-weatherstation: Hubitat driver for weatherstack API

5 Likes

So, I installed your version trying to get lux info, Im seeing data but none seem to be lux information, Did I miss something?

It is called luminance and it is updated by a calculation more frequently than it polls the weather API. Here is what it looks like right now on my device.

You can use that to trigger a rule when it passes a certain threshold

Yea, somethings wrong on my end. Not sure what. I confirmed I have your code for device driver. I selected

the Weatherstack device driver for my virtual device but my output does not match yours.

Interesting. Do you see anything in the events tab or the log that shows an error?

Hey @craigde and @logeo2004-register,

I don't mean to be rude but maybe you should start a new topic for this specific Weather API. It'll make it easier for me and others to follow.
Just thinking it'd keep things a little focused seeing as APIXU is going away. :slight_smile: .

1 Like

I see regular lastXUupdate space and hour apart. The data under State Variables is changing but does not include everything you showed under current status. CS only shows last update time

You may want to try this driver:

It has a Lux calculation and OWM allows up to 60 calls/minute and 1,000 calls per day on their free tier.

Well , Im seriously confused. I by no means am a novice at this stuff. I seem to be missing something, so someone clue me in. I installed your driver and created an api key, I see no data in Current status, I have access to all the options in the device driver. I do see weather status info in the device details but I still dont see illumination/lux. non the less I went and created a Virtual tile and tried both weather and illumination. Neither produce any details. So what am I doing wrong?

1 Like

Please ask questions about the OWM driver in the OWM thread (link in the post above).

Thanks.

1 Like