[DEPRECATED] wx-ApiXU-driver

Nothing is missing, per se. I’m only using it for lux input to a couple of rules. I have it set to publish every 15 minutes, with “don’t publish” when illuminance is minimum.

Up until the 2.1.3 update, it worked as I expected it to. Now it stops publishing lux around sunset, but doesn’t start up again in the morning until I manually hit “poll.” Then it works again until evening.

I’ve changed the preferences to publish every 30 minutes when illuminance is minimum. I’ll see if that helps tomorrow.

If you're only using Lux, you can possibly use Luxuriant-Driver

https://raw.githubusercontent.com/HubitatCommunity/wx-ApiXU/master/Luxuriant-Driver.groovy

It's the simplified version and doesn't require any Key, although with one, it uses Cloud cover in the Lux calculation.

Oh man, I’m sorry. The Luxuriant-Driver is actually the one I’m having problems with. Posted in the wrong thread I guess. I’ll go pound my head on the keyboard for a while.

Click... Save Preferences

That will delete all the existing scheduled jobs and schedule them again.

Then check pollSunRiseSet in Scheduled Jobs at the very bottom of the Device Info page.

The Next Run Time column should show 12:10:23 "tomorrow" (10 mins after midnight, tonight)

I don't think that section of the Device Info page is dynamic... you may have to refresh the page again to see the result.

Yes, that's what it shows. I added a poll to my "I'm awake now" rule, to get it going if that's what it needs.

@bangali added the Day+1 forecast data as one of the last features to his code. After observing the day[0] and day[+1], his concerns are indeed valid (they are always the same). @csteele - would you look into advancing the day[+1] and day[+2]? Thank you!

for my zip code, the next 3 months of forecast precip is:

totalprecip_mm 0
totalprecip_in 0

I'd be happy to shift my development hub to a different zip.. one that gets rain. Should I just use Oregon? :slight_smile:

May have to invent my own Zip Code... Oregon has zero forecast for the next 3 days, I tried Rochester NY, America's rainiest city.. only one day of forecast precip. But I'll try and watch to see if it "rolls" through the day+x attributes.

:blush: Try KMCO. It doesn't necessarily rain every day in central Florida, but the forecast is always for rain in the summer months. The below is not apixu, but you get the idea:

@csteele

I noticed this morning that I am getting the following error with this driver. Don't know how long it has been going on, but I just noticed it just now.

Version 1.3.1

It's an odd error, that's for sure... can you look at the State Variables section on the Device Info page, please?

Yours would have different values, but this section is what I'd like to see, please:

And then, after screen capturing that, please click, Save Preferences and let me know if the error goes away.

I will do. I'm on a train working right now, but when I get to the hotel, I'll post the info you requested.

Scott

I have been noticing that lux is not updating unless I hit save preferences and then run a poll. This was working at some point, but I seem to need to do this almost daily. I am using the the wx-ApiXU driver, not the Luxuriant-Driver.

I'm reworking wx-Apixu-Driver to be more robust in the poll loop for LUX. I believe if you look at Scheduled Jobs you won't always find:

The next version, the version I'm currently testing, will probably look like this:

Well I am not seeing the errors in the logs now. Before I went to work this morning, I did change the minimun luminance interval to 5 minutes (was no selection) and saved preferences. Then I did a Poll and Refresh command.

Maybe I just needed to do that after updating the driver a few days ago.

Anyways, I will monitor the logs and if the error pops again, I will let you know.

A poll interval of no selection would certainly be the reason for the NPE (Null Pointer Exception)

@csteele
Ive been using your lux only driver since you released it. Its working great for my use cases. Ive been in contact with support over a corrupt data base that took down my zigbee network this past Sunday. Bobby went through my hub and noticed errors coming from my envisalink integration as well as the lux driver. Just wanted to let you know of the errors. Thx

ApiXU weather api did not return data: hubitat.scheduling.AsyncResponse@a1acf0

groovy.json.JsonException: Lexing failed on line: 1, column: 181, while reading 'S', no possible valid JSON value or punctuation could be recognized. on line 238 (apixuHandler)

Yeah...I am getting these now too. They just started today. Did anyone have any idea how to fix this? Although it does seem to have resolved itself for me about an hour ago. Maybe APIXU was down.

That error is disappointing, but accurate. Code checks that the site says "OK" (code 200) and then tries to parse the JSON. As is clear: "hubitat.scheduling.AsyncResponse@a1acf0" isn't json. Perhaps ApiXU did their own code upgrade and is returning defective data?

I've been getting wx-ApiXU-driver ready for a 1.4.0 release and I'm getting correct data.

I looked at my production hub and yes, I see the errors too.
First occurred at 11:30pm (yesterday) here... was intermittent til 9:32am when it pretty much became useless... then cleared up about 42 minutes ago. I've had 9 good returns in that period.

2 Likes

i'm seeing those same errors. It started at 9:20 AM PDT, and cleared up at 2:10 PM PDT. It's been fine since then.

Prior to that, I've been getting the error:
ApiXU weather api did not return data: hubitat.scheduling.AsyncResponse
Intermittently for the last couple of days.

Just checked my logs again and all seems well now too. Must of been something going on with the api like you and Ryan said.