Weather Underground Plugin

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

Re: Weather Underground Plugin

Post by kgschlosser » Tue May 02, 2017 12:42 am

Construction. that's what I am doing. working on my house.
If you like the work I have been doing then feel free to Image

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

Re: Weather Underground Plugin

Post by loveleejohn » Tue May 02, 2017 1:08 am

Building is lots of fun most of the time unless your help is as good at building as I am with Python... :lol:

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

Re: Weather Underground Plugin

Post by kgschlosser » Tue May 02, 2017 1:50 am

Help??

LMAO

I have no help.. it's just me... I have to engineer ways to do thing. and sometimes that takes longer then doing the actual task... for instance... picking up a 6'x4' slider on each end. 5 feet off the ground to put it in the hole in the side of the house.. while managing a screw gun and screws and holding the window. now that was an interesting task.... Or how about this.. the main beam (35 feet long) in my house shifted in the direction of the beam the long ways... almost 2" causing the front foundation wall to bow inward and the 3 story back wall of the house to bulge outward. now how do you go about moving just the center of the house 2" now mind you the house is 35 feet long and 30 feet wide. 2 stories tall in the front and 3 stories in the back. All by yourself??? well it took me a long while to do it. But i managed to do it by myself. my tools... a shovel, a pick axe, a sled (to move the dirt) a come along 2 rather large ratchet straps. 1 12 ton bottle jack. and 4 8 ton bottle jacks. and a 5 lb mallet. and a various assortment of 6x6's 8x8's and 4x4's I also leveled the whole house at the same time.
If you like the work I have been doing then feel free to Image

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

Re: Weather Underground Plugin

Post by loveleejohn » Tue May 02, 2017 10:33 am

:shock: Yikes! Yep I've had a small team on past remodeling projects and I did some parts alone but geez it sounds like you're the kind of person that insurers beg to get a policy elsewhere. :lol: Your McGuvyerisms reminds me of a lot of my remodeling experiences 10 or so years ago. Hats off to ya on doing the work yourself!

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

Re: Weather Underground Plugin

Post by kgschlosser » Tue May 02, 2017 12:20 pm

My "McGuvyerisms" (one of my favorite childhood shows mind you) were only used to get from point A to point B the lever to move the rock. But the finished work is better then if I hired a company to do it that had "the right" tools. My finished job put the beam back into place and the house is level to the point of only being 1/8 inch out of level across 30 feet. Not to shabby for the guy with ratchet straps a shovel and a sled. I had to do a lot of thinking about using forces that acted on the house to make it that way in reverse. But I will tell you this. My house is 50 years old. And like you or I it had some lumps and bumps. And most of those have now completely gone away. My neighbor has told me he has been watching and he said it's amazing to see because the changes are that visable. he tells me that every time he comes home (he travels a lot) he really can't wait to see what I have been up to.. mind you he has never stepped foot on my property he just looks from his yard.
If you like the work I have been doing then feel free to Image

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

Re: Weather Underground Plugin

Post by loveleejohn » Tue May 02, 2017 12:37 pm

I will never recover the hours spent watching MacGyver when I was younger. Lol. I saw the trailer for a reboot and almost threw up. Definitely not as good in my opinion. Lol. Anyways 1/8" is pretty darn good for a house that size! Great job. Yep this discussion takes me way back... Lol. For some odd reason it's reminding me of the time I drove for almost 6 hours using a screw as a rotor button when the button failed in my distributor on a long roadtrip and all the repair shops were closed that were near the highway. :lol: At any rate, I guess I better return to my "coding" shenanigans so I can mark it off of the lists!

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

Re: Weather Underground Plugin

Post by kgschlosser » Tue May 02, 2017 2:31 pm

throw a task on me.. I will help ya out. I have gotten pretty good at explaining the bits and pieces of python and EG. I am not one to just do it for ya.. or if I do I will explain every single step
If you like the work I have been doing then feel free to Image

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

Re: Weather Underground Plugin

Post by loveleejohn » Tue May 02, 2017 8:17 pm

Howdy kg. Sooo long story short I ended up making a mess of the forum by asking for help with payloads in the coding corner when I blending it with this plugin. lol. So here I am again. Here's the thing, I know how to do the most basic things in eventghost and even can do some things that make me feel like I'm a maverick but both you and I know the truth! :lol:
I am having the darnest time capturing just the temperature from this wu plugin. I have followed your examples to the letter at least I thought I did... Instead of a simple temperature showing up in the log when I go to print the eg.result, I'm getting an error that says something about not having "key temperature" which leaves me wondering where to find the keys. Here's what I'm trying.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1722">
    <Macro Name="Current Conditions" Expanded="True">
        <Action>
            WeatherUnderground.Conditions(u'CO', u'Evergreen', u'', False, True, False, False)
        </Action>
        <Action>
            EventGhost.DumpResult()
        </Action>
        <Action>
            EventGhost.PythonScript(u"eg.result = eg.result['High']")
        </Action>
    </Macro>
</EventGhost>

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

Re: Weather Underground Plugin

Post by loveleejohn » Tue May 02, 2017 8:19 pm

I'm sure I'm doing something wrong but I have no idea what it is. :?

User avatar
yokel22
Experienced User
Posts: 265
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: Weather Underground Plugin

Post by yokel22 » Tue May 02, 2017 10:33 pm

loveleejohn wrote:I'm sure I'm doing something wrong but I have no idea what it is. :?
your asking to retrieve the "high" key, but your using the current conditions action. There is no "key" for high in current conditions. High, indicates a forecast, not the current temp. Use one of the forecast actions, like 4 day forecast, then try this.

Code: Select all

print eg.result.May03
or this with the current conditions action you were using:

Code: Select all

print eg.result.temp_f

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

Re: Weather Underground Plugin

Post by loveleejohn » Wed May 03, 2017 1:02 am

yokel22! That was indeed the magical sauce. Thank you very much for the help. Here's my challenge in this. I could not figure out where to look for the "key". How did you know to use temp_f after eg.result? Is this something you learned over time or was the eventghost wiki really enough because I've read that many many times and I've even started swimming in tutorials from this website https://www.tutorialspoint.com/python/p ... e_time.htm. Sadly I was getting very disheartened after working on this for what certainly has felt like a very long time so thank you. Also want to say thank you to kg for the plugin in the first place. Just wish I was a bit better in python so I could make better use of it. :(

User avatar
yokel22
Experienced User
Posts: 265
Joined: Thu Feb 05, 2015 5:56 pm
Location: U.S. - Kansas city

Re: Weather Underground Plugin

Post by yokel22 » Wed May 03, 2017 1:23 am

kgschlosser put some very handy key values in each actions config.
wuConfig.jpg
These are some quick ones i was working out for current condition:

Code: Select all

data = eg.result

state = data.display_location.state_name

city = data.display_location.city

Location = city + "," + state

condition = data.weather

temp = data.temp_f

feelslike = data.feelslike_f

direction = data.wind_dir

mph = data.wind_mph

print Location + ": " + condition + ", " + temp + "/" + feelslike + ", " + direction + " winds at " + mph + " mph"

kgschlosser, i don't seem to see relative humidity in current conditions data.class. Am i just missing it?

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

Re: Weather Underground Plugin

Post by loveleejohn » Wed May 03, 2017 1:31 am

yokel22 scores again! Thank you, thank you thank you!! I actually clicked on that and even clicked on test to populate it but I had no idea what they were. :oops: At any rate, thanks kg for including this very stealthy arsenal! :lol:

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

Re: Weather Underground Plugin

Post by kgschlosser » Wed May 03, 2017 3:43 am

now let me ask the dumb question... did you scroll down on the scroll bar on the right.. because it's at the bottom

and also just a couple of pointers..

if you have the unit of measure set to Imperial..

you will only have a need to do this..

Code: Select all

data = eg.result
text = ''{0}, {1}: {2}, {3}/{4}, {5} winds at {6} mph, gusting at {7} mph'
print text.format(
    data.Display_location.city,
    data.Display_location.state_name,
    data.weather,
    data.temp,
    data.feelslike,
    data.wind_dir,
    data.wind,
    data.wind_gust
)
print data.relative_humidity
anything that has an imperial and a metric version of the attribute will automatically return the correct value based on what you set the action to do. so there is no need to specify mph or kph unless you have the action set to metric and want to see the imperial data. this goes for alot of the attributes. any attribute that there is 2 values for.
If you like the work I have been doing then feel free to Image

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

Re: Weather Underground Plugin

Post by kgschlosser » Wed May 03, 2017 3:48 am

@loveleejohn

do you even read my posts??

I explained what that data class help tab was for. It shows you the layout of the class. word for word. it even shows you the purdy icon. which I am going to change into a wx bitmap so it would be extremely easy to use
If you like the work I have been doing then feel free to Image

Post Reply