Possible drop in replacement for Fantastic Weather plugin

Posted on
Mon Apr 24, 2023 5:32 am
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Possible drop in replacement for Fantastic Weather plugi

neilk wrote:
It seems he changed the sign up process...

That's helpful to know. I hadn't realized that the sign-up process changed.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Apr 24, 2023 12:36 pm
Different Computers offline
User avatar
Posts: 2556
Joined: Jan 02, 2016
Location: East Coast

Re: Possible drop in replacement for Fantastic Weather plugi

Is the new FW plugin in a state now where it does work then? I see both results in the posts above.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Mon Apr 24, 2023 12:41 pm
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Possible drop in replacement for Fantastic Weather plugi

It is. I believe there are two issues with the current release (which aren't critical):

  1. The default prefs have Dark Sky as the lookup for an API key if you use the button in the config dialog (if I post another release, that will be fixed), and
  2. The plugin wiki still refers to Dark Sky extensively; I'm not planning to update the wiki pages since the plugin is deprecated.

That said, with a (functional) API key for Pirate Weather, it will work without modification.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Apr 24, 2023 2:53 pm
neilk offline
Posts: 715
Joined: Jul 13, 2015
Location: Reading, UK

Re: Possible drop in replacement for Fantastic Weather plugi

I think I may have cracked this, something weird is going on with the API key reporting that Alexander is helping with (he had a different API key than I see in the portal), but I now have a key that works with a simple curl that Alexander provided

Code: Select all
https://api.pirateweather.net/forecast/<your_api_key>/45.4215,-75.6972?units=ca


I then realised the plugin is actually calling (with the faked Long/Lat for Ontario as Alexander used)

Code: Select all
https://dev.pirateweather.net/forecast/<your_api_key>/45.4215,-75.6972??exclude='minutely'&extend=''&units=auto&lang=en


which gives the following error (in a browser)

Code: Select all
{"message":"Forbidden",
"Subscription":"Ensure that subscribe is clicked for this endpoint: https://pirateweather.net/apis/hv9nrw1tjg/Beta",
"Help":"For other issues, please contact api@alexanderrey.ca"}


But if I change line 940 in plugin.py to call api.pirateweather.net then everything works as expected.

I will report back if I learn more on the API key issue but this fixes it for me.

Neil

Posted on
Mon Apr 24, 2023 3:06 pm
Different Computers offline
User avatar
Posts: 2556
Joined: Jan 02, 2016
Location: East Coast

Re: Possible drop in replacement for Fantastic Weather plugi

Maybe I'm missing a step but here's what I've done:

Updated to the GitHub version.

signed up at pirate weather

got my api key

Plugged it in to the indigo config

result: Fantastic Weather Warning Unable to make a successful connection to API. Retrying in 60 seconds.

I've tried restarting the plugin, and it makes no difference. Also deleted the preference file for the plugin. same error.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Mon Apr 24, 2023 3:23 pm
neilk offline
Posts: 715
Joined: Jul 13, 2015
Location: Reading, UK

Re: Possible drop in replacement for Fantastic Weather plugi

My working theory is that people who registered earlier had access to a beta/developer endpoint in the API, but the newer accounts do not.

In my case changing line 940 of plugin.py from

Code: Select all
       f"https://dev.pirateweather.net/forecast/{api_key}/{latitude},{longitude}?"


to

Code: Select all
       f"https://api.pirateweather.net/forecast/{api_key}/{latitude},{longitude}?"


Got me working.

It is not hugely difficult to do, the file is

Screenshot 2023-04-24 at 22.19.14.png
Screenshot 2023-04-24 at 22.19.14.png (118.49 KiB) Viewed 2866 times


And as you navigate to the plugin folder - use the "show package contents" option then use the editor of your choice to make the change and restart the plugin and refresh the weather data.

Neil

Posted on
Mon Apr 24, 2023 4:16 pm
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Possible drop in replacement for Fantastic Weather plugi

Ah yes. If he changed the name of the endpoint, that would definitely make a difference. Thanks for sharing your solution.

Just a reminder, if someone wants to take over the Fantastic Weather plugin, the license allows it. :D

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Apr 25, 2023 1:22 am
colinpartridge offline
Posts: 373
Joined: Jan 13, 2014
Location: London, UK

Re: Possible drop in replacement for Fantastic Weather plugi

neilk wrote:
My working theory is that people who registered earlier had access to a beta/developer endpoint in the API, but the newer accounts do not.

In my case changing line 940 of plugin.py from

Code: Select all
       f"https://dev.pirateweather.net/forecast/{api_key}/{latitude},{longitude}?"


to

Code: Select all
       f"https://api.pirateweather.net/forecast/{api_key}/{latitude},{longitude}?"


Got me working.

It is not hugely difficult to do, the file is

Screenshot 2023-04-24 at 22.19.14.png


And as you navigate to the plugin folder - use the "show package contents" option then use the editor of your choice to make the change and restart the plugin and refresh the weather data.

Neil


Awesome! Thanks Neil, that worked for me.

Colin

Posted on
Tue Apr 25, 2023 3:53 am
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Possible drop in replacement for Fantastic Weather plugi

I changed mine locally to the new endpoint and it works for the "dev" API keys as well.

I'll make this change and publish a new release.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Apr 25, 2023 6:51 am
Different Computers offline
User avatar
Posts: 2556
Joined: Jan 02, 2016
Location: East Coast

Re: Possible drop in replacement for Fantastic Weather plugi

changed "dev" to "api" and all is working! Thanks very much!

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Tue Apr 25, 2023 6:54 am
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Possible drop in replacement for Fantastic Weather plugi

I released an updated version of the plugin which changes the target endpoint to "api.pirateweather.net".

https://forums.indigodomo.com/viewtopic.php?f=285&t=21061&start=15#p217956

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Apr 25, 2023 9:01 am
marcel langelaan offline
Posts: 65
Joined: May 12, 2017

Re: Possible drop in replacement for Fantastic Weather plugi

Thx changing from dev to api also got it working for me (Netherlands).

Posted on
Tue Apr 25, 2023 10:07 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Possible drop in replacement for Fantastic Weather plugi

Working great now!!!!!!

_______
Norm

Posted on
Tue Apr 25, 2023 3:53 pm
Londonmark offline
Posts: 509
Joined: Feb 29, 2012

Re: Possible drop in replacement for Fantastic Weather plugi

And for me! Thank you.

Posted on
Wed Apr 26, 2023 7:30 am
jalves offline
Posts: 746
Joined: Jun 16, 2013

Re: Possible drop in replacement for Fantastic Weather plugi

Adding another positive experience here (orlando, FL). Works great.

Running Indigo 2023.2 on a 24" iMac M1), OS X 14.4
Jeff

Who is online

Users browsing this forum: No registered users and 7 guests