Page 3 of 9
Re: Weather Underground Plugin
Posted: Sat Apr 08, 2017 3:31 pm
by kgschlosser
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.
Re: Weather Underground Plugin
Posted: Sat Apr 08, 2017 3:33 pm
by kgschlosser
to use a .egplugin file all you should have to do is with EG closed. double click on the file.
Re: Weather Underground Plugin
Posted: Sat Apr 08, 2017 7:42 pm
by loveleejohn
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.

Re: Weather Underground Plugin
Posted: Sat Apr 08, 2017 9:27 pm
by loveleejohn
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.
At any rate, I think it is jammed to the brim with plugin actions. Good work kg!
Re: Weather Underground Plugin
Posted: Sat Apr 08, 2017 11:08 pm
by kgschlosser
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

Re: Weather Underground Plugin
Posted: Sat Apr 08, 2017 11:48 pm
by loveleejohn
Good deal. Currently I'm able to pull in the current conditions if I pull in everything with the example you posted.
The following is causing the window to bleed.
Code: Select all
print eg.result.Apr08.High.english
I've shared a screeny. Not sure what the problem could be.
Re: Weather Underground Plugin
Posted: Sat Apr 08, 2017 11:52 pm
by loveleejohn
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

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!
Re: Weather Underground Plugin
Posted: Sun Apr 09, 2017 4:17 am
by kgschlosser
loveleejohn wrote:Good deal. Currently I'm able to pull in the current conditions if I pull in everything with the example you posted.
The following is causing the window to bleed.
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.
Re: Weather Underground Plugin
Posted: Sun Apr 09, 2017 4:55 am
by kgschlosser
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
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.
Re: Weather Underground Plugin
Posted: Sun Apr 09, 2017 6:51 am
by kgschlosser
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
Re: Weather Underground Plugin
Posted: Sun Apr 09, 2017 12:47 pm
by loveleejohn
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.

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!
Re: Weather Underground Plugin
Posted: Sun Apr 09, 2017 1:18 pm
by loveleejohn
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.

- Error log for 0.5b

- Error log for 0.7b
Re: Weather Underground Plugin
Posted: Sun Apr 09, 2017 2:16 pm
by kgschlosser
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.
Re: Weather Underground Plugin
Posted: Sun Apr 09, 2017 2:52 pm
by loveleejohn
Good deal. No red lights on this one.

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
Re: Weather Underground Plugin
Posted: Sun Apr 09, 2017 10:44 pm
by kgschlosser
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