Page 3 of 3

Re: Possible drop in replacement for Fantastic Weather plugi

PostPosted: Mon Apr 24, 2023 5:32 am
by DaveL17
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.

Re: Possible drop in replacement for Fantastic Weather plugi

PostPosted: Mon Apr 24, 2023 12:36 pm
by Different Computers
Is the new FW plugin in a state now where it does work then? I see both results in the posts above.

Re: Possible drop in replacement for Fantastic Weather plugi

PostPosted: Mon Apr 24, 2023 12:41 pm
by DaveL17
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.

Re: Possible drop in replacement for Fantastic Weather plugi

PostPosted: Mon Apr 24, 2023 2:53 pm
by neilk
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

Re: Possible drop in replacement for Fantastic Weather plugi

PostPosted: Mon Apr 24, 2023 3:06 pm
by Different Computers
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.

Re: Possible drop in replacement for Fantastic Weather plugi

PostPosted: Mon Apr 24, 2023 3:23 pm
by neilk
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 2943 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

Re: Possible drop in replacement for Fantastic Weather plugi

PostPosted: Mon Apr 24, 2023 4:16 pm
by DaveL17
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

Re: Possible drop in replacement for Fantastic Weather plugi

PostPosted: Tue Apr 25, 2023 1:22 am
by colinpartridge
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

Re: Possible drop in replacement for Fantastic Weather plugi

PostPosted: Tue Apr 25, 2023 3:53 am
by DaveL17
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.

Re: Possible drop in replacement for Fantastic Weather plugi

PostPosted: Tue Apr 25, 2023 6:51 am
by Different Computers
changed "dev" to "api" and all is working! Thanks very much!

Re: Possible drop in replacement for Fantastic Weather plugi

PostPosted: Tue Apr 25, 2023 6:54 am
by DaveL17
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

Re: Possible drop in replacement for Fantastic Weather plugi

PostPosted: Tue Apr 25, 2023 9:01 am
by marcel langelaan
Thx changing from dev to api also got it working for me (Netherlands).

Re: Possible drop in replacement for Fantastic Weather plugi

PostPosted: Tue Apr 25, 2023 10:07 am
by norcoscia
Working great now!!!!!!

Re: Possible drop in replacement for Fantastic Weather plugi

PostPosted: Tue Apr 25, 2023 3:53 pm
by Londonmark
And for me! Thank you.

Re: Possible drop in replacement for Fantastic Weather plugi

PostPosted: Wed Apr 26, 2023 7:30 am
by jalves
Adding another positive experience here (orlando, FL). Works great.