Weather Underground Plugin

Questions and comments specific to a particular plugin should go here.
User avatar
kgschlosser
Site Admin
Posts: 5341
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Weather Underground Plugin

Post by kgschlosser » Sat Apr 08, 2017 3:31 pm

this should fix that error.


that was an error in my coding.. that would only come up if you went to Configure the plugin more then once.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 5341
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Weather Underground Plugin

Post by kgschlosser » Sat Apr 08, 2017 3:33 pm

to use a .egplugin file all you should have to do is with EG closed. double click on the file.
If you like the work I have been doing then feel free to Image

loveleejohn
Experienced User
Posts: 133
Joined: Thu Dec 10, 2015 12:09 am

Re: Weather Underground Plugin

Post by loveleejohn » Sat Apr 08, 2017 7:42 pm

I deleted the plugin folder from my program files folder and then closed eventghost and double clicked the .egplugin in my downloads folder and nothing happened. I checked my eventghost plugins folder in my program files folder several times after double clicking the .egplugin file but nothing showed up. Just to be sure I wasn't missing anything I also checked my appdata folder and although there is an eventghost folder with a plugins subfolder there, there was no weather plugin there.

I'll try the new version with the old fashioned extract and copy method and see if the issue is resolved. :)

loveleejohn
Experienced User
Posts: 133
Joined: Thu Dec 10, 2015 12:09 am

Re: Weather Underground Plugin

Post by loveleejohn » Sat Apr 08, 2017 9:27 pm

This one does not bleed! :) Just a thought. I have no idea how difficult it would be but maybe you might want to add a way to set default location in the plugin's configuration instead of in each action or both?

... yikes!!! One of these days I guess I'll learn to patiently read the entire forum thread. I just realized that this plugin is for personal weather stations which I do not have. :shock:
At any rate, I think it is jammed to the brim with plugin actions. Good work kg!

User avatar
kgschlosser
Site Admin
Posts: 5341
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Weather Underground Plugin

Post by kgschlosser » Sat Apr 08, 2017 11:08 pm

no it's not for personal weather stations.. if you have a personal weather station and it is connected to weather underground then you can use this plugin to access the data from the PWS. but this plugin is for weather in general.

and the reason i didn't set a global location is because it is not that hard to copy and paste :shock: :wink:
If you like the work I have been doing then feel free to Image

loveleejohn
Experienced User
Posts: 133
Joined: Thu Dec 10, 2015 12:09 am

Re: Weather Underground Plugin

Post by loveleejohn » Sat Apr 08, 2017 11:48 pm

Good deal. Currently I'm able to pull in the current conditions if I pull in everything with the example you posted.

Code: Select all

print str(eg.result)
The following is causing the window to bleed. :(

Code: Select all

print eg.result.Apr08.High

Code: Select all

print eg.result.Apr08.High.english
I've shared a screeny. Not sure what the problem could be.
WeatherUnderground Night Forecast issue.PNG

loveleejohn
Experienced User
Posts: 133
Joined: Thu Dec 10, 2015 12:09 am

Re: Weather Underground Plugin

Post by loveleejohn » Sat Apr 08, 2017 11:52 pm

kgschlosser wrote:no it's not for personal weather stations.. if you have a personal weather station and it is connected to weather underground then you can use this plugin to access the data from the PWS. but this plugin is for weather in general.

and the reason i didn't set a global location is because it is not that hard to copy and paste :shock: :wink:
By global location I was talking about setting for the "Country/State/Zipcode/Latitude/Airport Code" field and the "City/Longitude" field in the configuration window for each action. I just thought that maybe some might find it easier to enter this once in the main configuration for the overall plugin instead of for each action. But maybe not? Either way I think this plugin is gonna rock when it's done!

User avatar
kgschlosser
Site Admin
Posts: 5341
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Weather Underground Plugin

Post by kgschlosser » Sun Apr 09, 2017 4:17 am

loveleejohn wrote:Good deal. Currently I'm able to pull in the current conditions if I pull in everything with the example you posted.

Code: Select all

print str(eg.result)
The following is causing the window to bleed. :(

Code: Select all

print eg.result.Apr08.High

Code: Select all

print eg.result.Apr08.High.english
I've shared a screeny. Not sure what the problem could be.
WeatherUnderground Night Forecast issue.PNG


ok Mr. John. LOL... i am going to poke ya with a stick a bit.,.

you are asking for a date with Night you would be looking for what??? a Forecast... but what action are you using?? Current Conditions. well sir.. if it's current then there is no date and no forecast for the evening either... you ahve to use one of the forecast actions if you want to look into the crystal ball and see the future.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 5341
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Weather Underground Plugin

Post by kgschlosser » Sun Apr 09, 2017 4:55 am

here is another new version.

added automatic return of metric/imperial

example

Code: Select all

eg.result.Apr0810.High.C
eg.result.Apr0810.High.F
becomes

Code: Select all

eg.result.Apr0810.High
it will automatically return the proper value. same goes for anything that was english/metric as well

I also split the whole WU parser and connection end of things off of the EG script. I have made it so that it can be used as a python library directly. if you didn't want to make use of the plugin end of things. you would need to download the plugin and copy the wu directory into your site_packages folder. there are no docs at the moment. but i will add them in the near future.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 5341
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Weather Underground Plugin

Post by kgschlosser » Sun Apr 09, 2017 6:51 am

another update.

added the parsing to a couple more actions. had to fix a bug with metric and data causing a collision because of attribute names.

I also reduced the Action bits of the code by using types.ClassTypes to add the actual actions to EG
If you like the work I have been doing then feel free to Image

loveleejohn
Experienced User
Posts: 133
Joined: Thu Dec 10, 2015 12:09 am

Re: Weather Underground Plugin

Post by loveleejohn » Sun Apr 09, 2017 12:47 pm

ok Mr. John. LOL... i am going to poke ya with a stick a bit.,.

you are asking for a date with Night you would be looking for what??? a Forecast... but what action are you using?? Current Conditions. well sir.. if it's current then there is no date and no forecast for the evening either... you ahve to use one of the forecast actions if you want to look into the crystal ball and see the future.

:oops: LOL. Oops... So anyways I'll try out your new version and see if has the power to deal with me and my two left feet!

loveleejohn
Experienced User
Posts: 133
Joined: Thu Dec 10, 2015 12:09 am

Re: Weather Underground Plugin

Post by loveleejohn » Sun Apr 09, 2017 1:18 pm

Unfortunately both version 0.5b and version 0.7b bleed in the log when they are installed. Here are screenies of what shows up in the log.
WeatherUnderground 0.5b error.PNG
Error log for 0.5b
WeatherUnderground 0.7b error.PNG
Error log for 0.7b

User avatar
kgschlosser
Site Admin
Posts: 5341
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Weather Underground Plugin

Post by kgschlosser » Sun Apr 09, 2017 2:16 pm

ok sorry about that i missed changing something out. But this should do the trick.

make sure you delete the old plugin first. as this one the file layout is completely different.
If you like the work I have been doing then feel free to Image

loveleejohn
Experienced User
Posts: 133
Joined: Thu Dec 10, 2015 12:09 am

Re: Weather Underground Plugin

Post by loveleejohn » Sun Apr 09, 2017 2:52 pm

Good deal. No red lights on this one. :D So to capture the current temperature I'm gonna have to take a couple more days to experiment with parsing so you might not hear from me for a while. Lol

User avatar
kgschlosser
Site Admin
Posts: 5341
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Weather Underground Plugin

Post by kgschlosser » Sun Apr 09, 2017 10:44 pm

here is yet another version. I only have 2 actions left to go. alerts and hurricane. tho the alerts has been empty I am guessing it will only populate when there is an alert. so it may be a while on that one.

Now i changed up how some of the actions work. anything that has resolution to the hour is not accessed by the standard Api0910 method. because the sample dates that are to the hour some of them are also to the minute and there really is no way of you knowing what hour or minute is available. so those are stored in a tuple and have to be iterated over.

I have not changed all of the actions over yet but this is going to be how it is. I have to go and check again what actions i still need to convert to this method.


the code below if by example. it is not specific to an action. tho i believe it will work in the history, yesterday and the tide. but it is for example..

Code: Select all


for observation in eg.result.Apr09:
    if observation.date.hour == '10':
        print observation.temp

If you like the work I have been doing then feel free to Image

Post Reply