[RELEASE] Weather-Display With External Forecast Driver

Matt,

Dark Sky has stopped working for me. I made sure and grabbed the latest driver code.

There is no issue with my installation? Dark Sky is still polling and receiving data at the set interval with no errors. The error does indicate that Dark Sky is not responding to the API data pull. Suggest you go to Dark Sky and review your account to make sure there is no issue there (your API key is still valid). Check your internet connection and make sure nothing is blocking the Dark Sky data pull (virus protection). If that all looks good ..... reboot the hub?

APIXU works fine. DarkSky does not.

I'm also noticing when switching between from APIXU to Darksky and invoke a poll, the log is still showing an error display Apixu when I've saved with Darksky selected.

I checked my weather website and that is accessing Dark Sky just fine. I can stay with Apixu.

Try to use Dark Sky and let it run until at least a second scheduled polling attempt is made after you have saved the preferences and see if the error persists. When I was testing I did occasionally get an error on the first poll attempt but that never happened more than just one time. I was thinking there was something in the preferences (API Key?) that may have been cached and did not get fully replaced until the second poll.

[UPDATED] JUST TO MAKE SURE .... You do have your own Dark Sky API key and you are changing the driver preferences to use that key .... right?

mine seems to be doing the same
I can go to my darksky api page and see all the data fine
before it was the "station Data File location" incorrectly entered but everything appears correct

station Data File location:
https://api.darksky.net/forecast/my new private key/51.018840,-113.813900
API Key *:
my new private key

I reset the key as well but still not grabbing the data to the driver

something dumb I am doing wrong
I also went back and forth between DarkSky and ApiXU driver maybe something is stuck in the data memory
but I also created a second weather device and only loaded DarkSky driver (Weather-Display With External Forecast Driver) and the same results
ApiXU driver works fine

I'm seeing darksky errors as well.

[dev:13](http://10.0.6.4/logs/past#dev13)2019-03-15 01:57:00.833 pm [error](http://10.0.6.4/device/edit/13)java.lang.NullPointerException: Cannot invoke method toDouble() on null object on line 613 (updated)

[dev:13](http://10.0.6.4/logs/past#dev13)2019-03-15 01:57:00.811 pm [warn](http://10.0.6.4/device/edit/13)Weather-Display Driver - WARNING: No response from DarkSky API

[dev:13](http://10.0.6.4/logs/past#dev13)2019-03-15 01:57:00.809 pm [error](http://10.0.6.4/device/edit/13)Weather-Display Driver - ERROR: http call failed for DarkSky weather api: groovyx.net.http.HttpResponseException: Bad Request

[dev:13](http://10.0.6.4/logs/past#dev13)2019-03-15 01:57:00.259 pm [info](http://10.0.6.4/device/edit/13)Weather-Display Driver - INFO: DarkSky: Executing 'poll', location: Home

[dev:13](http://10.0.6.4/logs/past#dev13)2019-03-15 01:57:00.243 pm [info](http://10.0.6.4/device/edit/13)Weather-Display Driver - INFO: pollIntervalStation: 10Minutes

[dev:13](http://10.0.6.4/logs/past#dev13)2019-03-15 01:57:00.217 pm [info](http://10.0.6.4/device/edit/13)Weather-Display Driver - INFO: pollIntervalForecast: 1Hour

also getting error pulling clientraw.txt... so will need to figure that out.

@Matthew do you pay for the service or use the trial version? not that it should matter if I can access my api weather page

okay, figured part out. You give the directory for clientraw.txt, not the full path (leave off the clientraw.txt piece).

Just re-read and got the json-webservice-wdlive installed. now I'm seeing an error:

dev:132019-03-15 02:14:44.840 pm errorjava.lang.NullPointerException: Cannot invoke method toInteger() on null object on line 335 (updated)

@Matthew Looks like meteobridge is leaving "condition" as "null". So the Groovy is bailing because of that. Might I ask throwing a clause in there that basically checks for null, and if so, sets the condition to unknown, or maybe pulls it from API source?

If you want to see the full output from Meteobridge, it's here: Weather Display Log - Pastebin.com

My java/groovy is extremely limited (as in, non-existant). But it seems like something like this in the switch (line 335) statement:

switch(wd.everything.forecast.icon.code.isInteger() ? wd.everything.forecast.icon.code.toInteger() : null) {

But that then breaks a later line (I think). I'm sure there's a better way to go about this...

I use the trial version.

I am not getting the error, so mine appears to be pulling fine?

I am stumped at this point. I will look more this weekend.

I am glad you have been making progress in adapting this driver to Meteobridge. I do not have any experience with Meteobridge and I do not intend on attempting to alter this Weather-Display driver to work with Meteobridge. Most of this driver was cobbled together from adapting other's drivers that I learned from. Please feel free to do as most of us do and make a copy of the code, and alter it to meet your needs. My guess is there are others who do use Meteobridge that would benefit from it if you get it working and are willing to share.

Good luck.

@CurtisZM I am still stumped on the issue you are having? Mine is pulling Dark Sky data without error every 5 minutes.

Maybe toggle on the 'Create Extended Logging' option in the preferences and see if there are any more clues on what the issue is in the logs. If there is an issue with the code, I would love to try to fix it .... I just cannot replicate what you have so I don't know how to fix it.

image

The error occurs when I hit Save Preferences.

The "extSource: 0" does not look right? That variable is initialized to "0" so that it is not null, but the valid values are 1, 2 or 3 for 'None, APIXU and Dark Sky respectively. What does your preferences show for Select External Source?
image

Open the Driver Code. Change line 150 from:
extSource = 0
to
extSource = 1
save it and then open your driver and 'save device'.

Does that help anything?

Can somebody walk me through how to install [Weather-Display With External Forecast Driver] - giving me a dummies guide please? I have added it as a driver within Hubitat hub - what next? How do i get it on to SharpTools

Confirm the following:

  1. You have your own Personal Weather Station hardware
  2. You are running Weather-Display software and it is creating the output file clientraw.txt file on a webserver you can access.

If you do not have both #1 AND #2 above, this driver will not work for you. If you do have both of the above, confirm you have installed the json-webservice-wdlive described in the first post. If you have made is this far and you are still having problems, let me know specifically what you are having an issue with and I will attempt to help.

thanks matthew for getting back swiftly and i can safely answer no to both those questions. Is there an alternative of having a weather icon on SharpTools?

Try @bangali's APIXU driver. No PWS required.

2 Likes