[RELEASE] wx-ApiXU-driver



I’m obviously doing something wrong. My Lux/Luminance has been stuck at 5 for the past few days. Ever since I updated to firmware 2.1.3

I’m running the latest version of this driver (just checked). I have looked at all the preferences related to lux. I have tried polling, refreshing, saving the device, saving preferences but my lux still says 5 even though there’s barely a cloud in the sky at 4:51p today.

Under ‘lux next’ it lists 1800 so somewhere the lux must be reporting correctly.

Does anyone have suggestions of what I should try to get my illuminance reporting properly?


Having the same problem. I've had to manually poll it every morning to get it going. It seems to stop around 8:00 PM or so.


I don't see "sunRiseSet" State Variable...

I'm seeing sunriseTime of 12 days ago --> 2019-06-20

On the Device Info page, at the very bottom, is the list of Scheduled Jobs. There should be one in there for "pollSunRiseSet" with a date/time of 10 mins after midnight. Each day that should get updated to the next midnight.

Enable Debug Logging and click Save Preferences. PM me the resulting logs. This should also cause the Scheduled Job to appear.

In the Driver Code, line 160 is:
// command "pollSunRiseSet" // --- delete for Release
feel free to remove the // and save the code. This will add a button to the Device Info page to manually get sunrise/sunset. Try that if you wish.


PM sent. Thank you very much!


take a look at this post above and see if it helps with what values are missing:


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


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:



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.



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)