[Plugin]DarkSky Weather

This is the error I am seeing in the log
01 03/05/20 18:40:55.143 luup_log:68: DarkSky Weather_error: DarkSky API call failed with http code = closed <0x740bc520>
Hoping Rene can provide some help.

1 Like

For everyone’s information, this appears to be a Dark Sky problem.
Homeseer users are also affected.

Dark Sky not working. [broken link removed]

1 Like

Hi,

It is working for me now. Does it again for you too?

Cheers Rene

I am still showing ‘Complete settings first’. I probably shouldn’t have reset my key. Do I need to reinstall the app?

Hi Tim,

If you entered the new key and reload luup it should be working again.

Cheers Rene

Tried several reloads and still shows ‘Complete settings first’, just tried generating a new key and reloading and getting the same thing.

If I use a browser and go to the following it returns the data
https://api.darksky.net/forecast/mykey/mylatitude,mylongitude

On luup reloads I do not see calls counter updating on DSW’s site.
Must be something with my install?

Does anyone have any further suggestions on how to possibly troubleshoot what may be happening or should I just try uninstalling and reinstalling the app?

UPDATE:
I changed the log level to Debug for the device and grabbed the string from the log and pasted into a browser and it looks like it worked fine in the browser.
The Vera log shows the error that it returned with the status = to closed. I omitted my key and latitude and longitude but here are the lines from my log:

50 03/07/20 8:56:05.102 luup_log:68: DarkSky Weather_debug: calling DarkSky API with url = https://api.darksky.net/forecast/mykey/mylatitude,mylongitude?lang=en&units=auto&exclude=hourly,alerts,minutely <0x73dd6520>
01 03/07/20 8:56:05.159 luup_log:68: DarkSky Weather_error: DarkSky API call failed with http code = closed <0x73dd6520>

The newer LuaSec on Plus/Secure 7.3x requires that protocol be set on https.request() calls. This had a default before but now does not, and that has broken many similar plugins. I don’t have access to the code to check this one.

Hi,

It looks like DarkSky changed something as it is also failing on a VeraLite on V7.0.28. But it does seem to do with the protocol and DarkSky no longer accepting any as the value. Oddly it does work just fine on openLuup with a simple https.request.

Soo, it seems they need tlsv1.2 as a minimum now. That is supported on Vera 7.30, but not the Lite etc.

Updated version 1.5 will be available later today, but that won’t work on the Lite or older.

Cheers Rene

2 Likes

Mine running on openluup on much newer luasec version has been working just fine. Very likely a security level requirement change indeed with tlsv1.2.

Thanks everyone. Looking forward to the update.
Copied in the new file and back up and running.
Thanks Rene

1 Like

Will this require a firmware update? I hate doing those.

I am on 1.7.4453 now

Thanks.

M

Not sure when Vera updated LuaSec so it supports tlsv1.2. But DarkSky won’t work without the update so you have to update the plugin and just see if it starts working again.

Cheers Rene

ok, is the update out yet for mios?

It is not yet. Normally they get approved on Mondays, but none of my updates are up to now. You can force an update by putting this in your browser with your Vera’s IP address: http://VERA_IP/port_3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=CreatePlugin&PluginNum=9231&Version=39710

Cheers Rene

I remember having the same problem with the ecobee plugin when ecobee also upgraded their security to tlsv1.2. Maybe should get a ticket to vera to implement a fix to not have to express the tls version in the http request call?

Hi Rafale,

According to the LuaSec documentation when passing just an URL the protocol is any. When I explicitly try any with the DarkSky API it rejects the call. I have to set the tlsv1_2 value. Does Vera default something else?

Cheers Rene

I know that for openluup, I actually made the request call retry with different tls versions in the header if the return is a security error and I started from the higher version. It was a patch. I don’t know what is going on in the vera but I suspect that you are correct that it fills the header with a default version if it is left blank from everything I am seeing.

Can you try using all and no_sslv3 in the options array?

Also you may try turning peer certificate validation off, in case they are self signing or have an outdated CA chain.

1 Like

My darksky plugin stopped working 5 days ago. I have done
RESET SECRET KEY, and remains the same. someone can help me?

See @reneboer’s response that was posted earlier: