[RELEASE] DarkSky.net Weather Driver, no PWS Required

I did also try this driver but it seems to report the same, not really sure why Lux is reported so high. Like right now its raining out and the Lux is reported at almost 6k, but its very dark inside. I may just end up setting up some Hue motions outdoors, for lux reporting. Or I could always go back to a rule with weather conditions. Thanks guys.

Edit: So I just reinstalled the Dark Sky device and now the Lux seems to be right. Its showing 1400 Lux currently, but the Luxuriant Device shows 7k?

Mine looks normal... illumination is shifting from 2886 to 3385 over 15 mins. No Clouds.

Are you seeing Cloud values in the Event Log?

Luxuriant shows cloud cover but it only shows 1%. The Darksky device shows 100% cloud coverage.

Also how often is the driver supposed to update the cloud cover?

It polls per the "Publish Illuminance how frequently?" value:

if (weatherKey) schedule("3 0/${luxEvery} * * * ?", pollForClouds)

If you've entered a Key into the Weather Key field, then a poll will be attempted every ?? minutes per your selection.

On line 89 of the code, removing the // in front will display an additional button on the Device Info page.. which will force a Poll of Cloud data. Watch your Live Logs for more details.

The logs will show the Latitude/Longitude. Those values are pulled from your Hub's Location (Settings: Location and Modes) Logs will also show if Polling for Clouds is failing, and why.

I see the driver polling in the events and after changing the code I can manually poll. After reviewing the logs I see the polling event for cloud cover and there is no errors. But it is always 1%.

The DarkSky driver forces the minimum cloud cover percentage to 1%. If DarkSky does not report a cloudCover attribute or it is less than 1% then the driver will report 1%. It does this because there are too many calculations that will fail if the value is null or zero. I am guessing that your particular location is not reporting any cloud cover attribute and that is interpreted by the DarkSky driver as 1%. You can look at the raw result of a DarkSky API poll to verify what Dark Sky is returning to verify this. If DarkSky is not reporting a cloud cover attribute, this driver's Lux calculation will assume a constant 1% cloud cover factor and that means it will not reduce the clear sky illuminance calculated regardless of the actual cloud coverage that appears visually to you.

1 Like

Well that would explain why its stuck on 1%. I wonder what the distance is because there are multiple weather stations with 1-2 miles of my house.

Maybe there should be an option to input a location also instead of using the hub's coordinates?

On a side note I after reviewing the Darksky driver event logs again, I noticed cloud cover was only updated once since I reinstalled the driver a couple hours ago. Although it is displaying 100% cloud coverage which is correct.

A nuance here: If your are looking under 'Current States', please make sure you have turned on the optional attribute 'Cloud'. As discussed several times in this thread, the 'Current States' will only update if the optional attribute is turned on. If you turn off the optional attribute, that attribute will still show on the 'Current States' list but it will never update when then optional attribute is turned off. The only way to remove the attribute from this list is to remove the virtual device and create a new one and never turn on those optional attributes you do not want to use.

You can see what the value is for 'cloud' even if you do not have it turned on as an optional attribute. Look further down in the driver for the 'Device Details' section. in there it will list the values of most variables used by the driver, even if they are not selected as an optional attribute.
image

1 Like

Yeah I had already enabled the 'cloud' option, I just found it odd that the event log did not record another 'cloud' update when it polled. But maybe because the cloud cover has been consistent at 100% it had no need to update.

Under 'Device Details' it does show cloud cover at 100%.

So today I noticed that both Luxuriant driver and Darksky are reporting very close to the same lux.

I also saw this in the event logs for Luxuriant, it looks like cloud cover is 30%, but in the event log it shows .3. The Darksky driver is actually displaying 30% instead of .3. So something changed overnight with the Luxuriant driver maybe, but it looks to be receiving the correct cloud cover value, despite displaying the value as a decimal.

How a driver displays a value is a programming choice. "0.3" equals "30%", so the two different driver's have the same value, they just present that differently. There is no error here, just a style choice the programmers made. Glad it seems to be working for you now.

2 Likes

Yeah, that is what I figured. Not really sure why it was not working yesterday, I did not change anything just let it sit overnight.

Never forget that the value is coming from a third party.. who has their own set of developers that could be "making improvements" that break existing... then they find out, and put it back. We'd never know.

True, but I would have figured the Darksky driver would also not work properly since they are using the same provider for the data.

2 Likes

Having some issues with Precipitation forecast. Please see attached. I can't figure out where the rain forecast in the weather summary text (in this example 34%) is coming from, given that none of the above %'s highlighted match that figure. Can someone pls explain. Thank you.

Having some issues with some icons not showing up...

I'm using the tiny url provided.

Any ideas how to fix?

If you want the 'percentPrecip ' to display as an individual attribute and show in the Current States you either must turn on the 'Optional Attribute' for SharpTools.io or the SmartTiles dashboard options or you must turn on this 'Optional Attribute' switch:
image
Othewise it will not be available as a stand alone attribute, but will show in the pre-configured combination attribute tiles. It you ever had these turned on and then turned them all off, the percentPrecip will still show in the 'Current States', but it will never update (this platform 'bug' has been discused several times above). Even if you have the switches off you should be able to see the current value of percentPrecip in the 'Device Details' --> 'Data' section towards the bottom of the driver.

The icons are in the TinyURL site location. They are a very light colored (white) outline with a transparent background. If you try to view them against a white or very light colored background they will not be visible, or at least very hard to see. They do no appear to be there in the 'Current States' view because that is a white background. If you display them in a dashboard that does not have a white (or very light) background, they should be visible.

Great, thank you for the responses and kind assistance. Much appreciated.