[RELEASE] Weather-Display With DarkSky.net Forecast Driver

Thank you. Fixed in the next release in a few minutes.....

1 Like

[UPDATED]
V4.2.8
09/28/2019
Many thanks to @nh.schottfam for most of the changes below

  • Adds capability 'refresh' (that some apps need).
  • Bug fixes and corrections.
  • Compiler optimizations.
  • Fixed so 'wind' can be published on its own (vs. having to be done with many settings) (still works with group settings).
  • Added a Preference option for 'lux smoothing/jitter control.' This basically rounds the lux calculation to reduce the variability (code/recommendation from @nh.schottfam) . This is optional and must be selected to enable it.

The lux smoothing/jitter control works as follows:
If lux estimation is greater than 1,100 --> round to the nearest '800'
else If lux estimation is greater than 400 --> round to the nearest '400'
else set lux = 5
@nh.schottfam 's code it is the estimateLux routine in the driver if you want to see the details.

1 Like

Thank you! V4.2.8 seems to have fixed the UV related errors I was seeing in the logs.

1 Like

Looks good! The only nit picky thing I noticed was that the sunrise/sunset, last updated, and "powered by Dark Sky" link are all on the last line. I think they used to be separate. Can't swear to it, though. As I said... very nit picky.

I am good with nit picky. I have been playing with the formatting and spacing. Trying to balance making it looking good (which take a lot of html formatting) with minimizing the character length to keep under to 1,024 character limitation.

I did remove the forced line break before the Dark Sky attribution as it will line-wrap if it needs to based on the tile width. I think I will force the line break again ... it looks nicer.

On the DarkSky attribution logo/link ... I am leaning towards:
-> full logo image/hyperlink if size permits (under 1,024 characters),
--> else, a plain text hyperlink, if size permits,
---> else plain text (no hyperlink), if size permits,
----> else truncation as a last resort.

1 Like

That sounds good! Can't wait to see what you come up with. But I will be patient. :wink:

ETA: Just realized I was posting in the wrong thread, as I use the no PWS version. Sorry,

[UPDATED]
V4.2.9
09/29/2019

  • Only change is formatting on 'myTile.'

I tried to balance making it looking good (which takes a lot of html CSS formatting) with minimizing the character length to keep under to 1,024 dashboard tile character limitation. One change I made was to copy and then re-named the two Dark Sky logo icons to reduce the characters (every character counts!). If you host your own icon repository copy the two new icon files to your repository. If you use the default icon respository (tinyurl) they are already there so no action is required.

  • poweredby-oneline.png --> dsD.png ('D'ark text)
  • poweredby-oneline-darkbackground.png --> dsL.png ('L'ight text)

Every icon must have the full path to that image in the myTile text. The default display shows eight icons (nine if there is current day precipitation), so the length of the path is important. If you are not using the tinyurl for the default icon repository, consider creating your own tinyurl for your repository (they are free).

Finally, the myTile character string is built as follows:
The text string is constructed including all icons and html CSS styling from the top down to just before the Dark Sky attribution on the last line. A calculation is then made for the Dark Sky attribution as follows:

On the DarkSky attribution logo/link:
-> full logo image/hyperlink is used, if size will permit (under 1,024 characters),
--> else, a plain text hyperlink is used, if size will permit,
---> else plain text (no hyperlink) is used.

At this point if the myTile character string is still greater then 1,024 characters it will calculate how many icons it needs to discard and then remove those. Those icons are replaced with text titles (e.g. 'Hum: ' for 'Humidity'), if neccessary. It will only remove as many cons as may be required to get under the 1,024 character limit. Icons are removed from the bottom to the top (e.g. 'Sunset' is the first to go, then 'Sunrise' etc...)

If all icon have been removed and the myTile string is still greater than 1.024 characters, all html CSS formatting is removed.

If the myTile string is still greater than 1,024 characters then string is truncated to 1,024 characters.

What are the lux level ranges? 0-10k ?

The calculation uses 0 - 10,000 as the range. The default between twilight-end and twilight-begin is 5 lux (it is never really completely dark).

Thanks.

One other question. How often should i poll?

Maybe dumb question, but what is the difference between this and DarkSky.net Weather Driver

That is totally up to you. The driver allows up to every minute on the weather station and up to every two minutes on Dark Sky. You should balance the need for updated data for automations with hub/database resource utilization. I do use the lux calculation in my automations, so I poll Dark Sky frequently during 'Daylight' and then switch that to hourly at 'Nighttime'. Your station data may be staying local (depending on where your data file is hosted) so it may not be hitting the cloud, but it is still hitting the hub/database.

I have two drivers. This one (Weather-Display) requires that you have a Personal Weather Station (PWS) that is using Weather-Display software to gather and create the weather database from your station. All current weather (temp, humidity, wind, barometer, rain, and optionally solar and ultraviolet) are sourced from your PWS. Dark Sky is used only for forecast and optionally for sensors you may not have.

The other driver (Dark Sky no PWS Required) does NOT require a PWS. It pulls 100% of its data from Dark Sky.

1 Like

[UPDATED]
V4.3.0
09/30/2019

  • Eliminated the 'Std' icon option. There is now only one set of icons and they are used by default. The old 'Std' icon were a legacy item from when WeatherUnderground was used and the links still went to their website (I am suprised they still worked). Now all icon are based in the Vcloud icon set. I have pulled in a few new icons from @storageanarchy that are consistent with the Vcloud set. If you are using the tinyurl no action is required. If you copied the icons to your own repository please copy icons 48.png through 55.png from the tinyurl site.
  • Reworked the Dark Sky icon mapping (Thanks to @storageanarchy!) to add slightly more variability in the icons used while still maintaining consistency on the 'condition_code' standards that many dashboard use.
  • Several bug fixes and typo corrections.

[UPDATED]
V4.3.1
10/01/2019

  • Added ability to select 'knots' for wind/gust speed. If this is selected other 'distances' will show kilometers (not miles). Let me know if this is a problem.

image

[UPDATED]
V4.3.2
10/02/2019

  • Bug fix for 'is_day' and 'is_light' (impacts icons/conditions).

I am seeing this error in the logs. I am using the latest v4.3.2 driver.

It is not getting a value for 'precip_today' from your weather station? I have not done a 'null' check on this data value as this I have never seen this error before. It should report '0' if there is no rain .... so it should not be null. It rarely rains here so I am certain that I have had conditions where there is no precipitation and it must be returning a zero value.

No one else has reported this .... so I am guessing it is an issue with your clientraw.txt file or the JSON file that is used to extract the data from your station. In your weather station JSON file, what values shows for: wd.everything.weather.rainfall.daily.in ( or wd.everything.weather.rainfall.daily.mm if you are using millimeters)?

You can use the JSON viewer to make it easier to find those values.

I'm also getting the below error message using Dark Sky weather report from my dashboard:

This is a screen capture of the virtual device:

It seems to be working okay and reporting correctly but the "error" just bothers me... Could it have something to do with the decimal format of the illuminance? Any ideas?

The driver is "Weather-Display With DarkSky.net Forecast Driver" V- 4.3.2, (10/02/2019).