I read that for sunlight, lux is approximately equal to solar radiation in w/m^2 * 127, so for a nominal max of 1kW/m^2 sunlight at the equator, illuminance would be about 127000.
Hubitat's UI for illuminance values appears to support a long integer, not a float. I added "as long" to the illuminance sending line:
sendEvent( name: "illuminance", value: state.illuminance as Long, unit: "lux",.........
and the illuminance value seems to be working fine with Hubitat now.
Looks like I have what to do. I used a calculation I found that is *126.7 and the attribute itself was just defined as a number. Guess I should change it to be more specific. Thanks for all the feedback folks.
Updated version 0.91 is now posted with the illuminance value changed to be "as Long" and "/ 0.0079" method versus the "* 126.7" I had before. The number no longer contains a decimal but because it is night I only get a 0 value so tough to test much.
Thanks to @deane.gardner for point this problem out and @jeubanks for the calculation change.
If anyone notices any other things like this, please let me know.
The links go to the same place (they are identical)... Maybe a browser refresh issue? When I click on either I get the correct one and I also copied both URLs to check them. I tried editing my original one just to check if there was something weird but could not find anything strange about the link.
@snell I am getting the following error continuously. Appears in log about every minute. I haven't changed any of the credentials. What is it trying to tell me?
dev:24672019-12-09 09:15:04.089 am errorAmbient Weather - Error connecting to AmbientWeather: 429
API requests are capped at 1 request/second for each user's apiKey and 3 requests/second per applicationKey. When this limit is exceeded, the API will return a 429 response code.
It's telling you there are too many requests to the API from a single API Key or APP Key. Are you using the same key from multiple apps/plugins? If so don't do that. Use a separate API Key.
I have found that if you have your data refresh rate set lower than every 5 minutes you will occasionally get the errors from too many requests to the API.
Just like @waynespringer79 mentioned, cannot really recommend going more often than a poll per 5 minutes.
Also, as discussed higher up in the thread also, the API itself does not have refreshed data as often as you might want. So if you go faster, you will likely just see repeated data.
I changed to 5 but what seemed to help stop the constant errors was to give each ambient weather driver a separate API number from the website. Making each hub independent, API wise.