[RELEASE] wx-ApiXU-driver



I pushed another hotfix...

I can't be certain that the "nuts" you saw was the same "nuts" I saw the day before... but the patch fixes "mine". :smiley:


I've updated to the latest and I'm seeing this in the logs..


I'm seeing this error since updating.


I'm afraid Lux seems to be stuck on 5 for me now.


I would try to save preferences and then poll/refresh again. It seems to be work okay for me.

I am also not seeing any errors in the logs, when do you get that error?


I've tried that. No joy I'm afraid.

Every 5 minutes when it does its poll.


Is it just polling for lux every 5 min or condition updates?

i have lux set to 5 min and weather every 30 min.


Mine settings are the same. The error is since the latest update.


Yeah, that is odd I updated to the latest version a little while ago, but I have yet to see any errors in the logs.


For some reason it's saying that it is nighttime but I suppose that could be because of the error.


Go ahead and try to import again because the most recent update was only 18 hours ago.


Is the version 1.2.1 still? I have updated for the past two days but have not seen the version go up. Is the import correct?


I updated this morning to 1.2.1.
Just re-imported and saved preferences to give it a 'kick'
I'm not getting the error now but it's still saying its night and it's mid afternoon.
I'll let it run through its 30 minute update and see what happens.


Hot fixes.. when I'm simply making a 'typo size' correction. I don't update the version number, although github does show 'hf#'


Seeing this error now. :face_with_raised_eyebrow:
2019-07-02 17:17:46.390 errorgroovy.json.JsonException: Expected a value or a closing curly brace '}' on line: 10, column: 25. But got '"Luxuriant-Driver"' instead. on line 748 (updateCheckHandler)


In trying to test exactly what's going on with Lux, I created a simpler driver... It's actually cool enough that I think I'm going to release it now.

It's LUX ONLY. No weather offset.

Same installation process, add driver code, then create a Virtual device that uses that code.


The only external action it performs is to get Sunrise/Sunset data, once a day. (Or on demand -- aka save preferences)


RM v4 is eating all the eyeballs I imagine :smiley:


The difference would indicate that "cloud cover" is in the 0.961 range, and if I look outside, I see zero clouds. :slight_smile:

This "focused-use-driver" will help me with debugging the much larger wx-ApiXU-driver... Thanks for any feedback.


After doing what @bobbles suggested I do not have the error anymore.


I loaded the Luxuriant driver, and there is a huge difference in my case...

wx-ApiXU illuminance = 5952.0
Luxuriant illuminance = 7377.0

Both are successfully polling at 5 min intervals.



Luxuriant-Driver is the raw calculation. I think I mentioned it above... the day is split into 5 slices...

"Fully Night Time"
"between sunset and twilight"
"between sunrise and twilight"
"between sunrise and noon"
"between noon and sunset"

Sunrise to Sunset ("between sunrise and noon" + "between noon and sunset" ) have a maximum LUX value of 10000, while the Twilight slices are max of 50. Night Time is, of course, 5 fixed.

From those Max Values, time within each slice is used to create a 'factor' and that factor reduces the theoretical (Max) Lux. In other words, that would be the calculated value of sunlight hitting the tops of clouds.


wx-ApiXU-Driver acquires cloud cover and condition code. Those factors further reduce Lux.

I've got a version (v1.5) of Luxuriant that does get the ApiXU data but because I completely rewrote the "slice the day into 5 pieces" code, I need to finish testing before releasing.


v1.5 of Luxuriant-Driver Released.

  • Optional APIXU acquisition of Cloud data.
  • Rewrite of the "split day into 5 slices" code to reduce the number of conversions.
  • Added "betwixt" attribute to display the "slice of day" text.
    Note: ApiXU polling runs at the same rate as Illuminance.

I can't think of anything else to do with this code. It was mostly a vehicle to allow me to rework the "slice of day" code, but it turned out nicely.

Please remind yourselves that LUX is a calculated value, not measured, and probably won't even be close to a real measurement. Its value, for me, is the relative number, not the explicit number. Knowing that a bright sunny day has a lux of X and that a gloomy, rainy day has a value of Y is pretty much all I need. I can then hard code in those values to my RM rules to decide if extra light is needed now.