Don Lafferty has created a program allowing you to tweet your current weather in almost real time.
This program is a helper to the excellent WUHU(Weather Underground HeavyWeather Updater) program. This program is called by WUHU using it’s Actions/Alerts feature and will post your weather to Twitter at intervals determined by the user. For an example see these web sites:
Files are held in the wuhu software group on yahoo.com
Put the wp_Tweet.exe and wuhutweet.cfg files into your WUHU folder.
Edit the wuhutweet.cfg file if you wish but in basic mode you don’t need to change anything.
Unzip the WUHUTweetValidate.zip file into a temporary folder.
Run the setup.exe file to install WUHU TweetValidate on your computer. After you have run this once to obtain your PIN you can uninstall it.
Follow the instructions on WUHUTweetValidate to allow wp_Tweet to post to your Twitter account.
Verify there is a file named wuhutweet_oauth.txt in your WUHU folder. This file has your public key and key secret which allows us to post to your Twitter. You can open this file if you are interested but the key and key secret are just random appearing characters.
Verify the TwitterVB.dll file is also in your WUHU folder.
Select Alerts/Actions from WUHU
Select “On Weather Update” Sound/Action and put the following into “Action on Activation”:
wp_Tweet.exe "%TimeHHMM%|Temp %OutdoorTempDegF% °F|Hum: %OutdoorHumidity% %|Pres %OutdoorPressureRelativeINHG% "|24Hr Rain %OutdoorRain24HrIN% "|Winds %OutdoorWindDirectionLetters% %OutdoorWindAverageSpeedMPH% MPH|Windchill: %OutdoorWindchillF% °F"
Make sure there are quotes around everything except wp_Tweet.exe.
You can change the info but there may be a few characters it won’t like. It also needs to be 140 chars or less once the WUHU vars have been replaced.
Go to WUHU Actions to complete setup.
WUHU Tweet has the ability to use METAR sky and weather observations from WUHU.
If you want to use the Manual Metar feature then do the following:
Put the file named wuhutweetmetar.txt into your WUHU folder.
Edit the file named wuhutweetmetar.txt to replace any of the words on the right side of the , on each line if you wish or you can leave it as is.
Change your Sound/Action line to include <metarsky>%MetarSkyConditions%</metarsky> and/or <metarweather>%MetarWeatherConditions%</metarweather> depending on whether you want Metar Sky conditions and/or Metar Weather conditions included in your Tweet. Keep in mind these can break the 140 character limit if you aren’t careful.
Here is an example:
wp_Tweet.exe "%TimeHHMM%|<metarsky>%MetarSkyConditions%</metarsky>|<metarweather>%MetarWeatherConditions%</metarweather>|Temp %OutdoorTempDegF% °F|Hum: %OutdoorHumidity% %|Pres %OutdoorPressureRelativeINHG% "|24Hr Rain %OutdoorRain24HrIN% "|Winds %OutdoorWindDirectionLetters% %OutdoorWindAverageSpeedMPH% MPH|Windchill: %OutdoorWindchillF% °F"
If you want to get your sky conditions from the US Weather service for an Airport near you do the following:
Change your text in Sound/Action to include <metarsky></metarsky> like the following:
wp_Tweet.exe "%TimeHHMM%|<metarsky>%MetarSkyConditions%</metarsky>|<metarweather>%MetarWeatherConditions%</metarweather>|Temp: %OutdoorTempDegF% °F|Hum: %OutdoorHumidity% %|Pres %OutdoorPressureRelativeINHG% "|24Hr Rain %OutdoorRain24HrIN% "|Winds %OutdoorWindDirectionLetters% %OutdoorWindAverageSpeedMPH% MPH|Windchill: %OutdoorWindchillF% °F"
Edit the wuhutweet.cfg file to replace the 3 letters after metarairport with the 3 letter code for the airport nearest you. To find your code you can use the internet to search or click on this link.
Make sure there is a 1 next to metarskyweb.
If you want Visibility included if it exists in the Metar report then put a 1 next to metarvis and the letters you want to show next to metarvisdesc
If you want the program to check the length of the status string and trim off the last information after the last | if it’s too long then put a 1 after trimend in the cfg file.
If you want to use your local manual Metar Sky Conditions but want the program to retrieve them from the online spot if you don’t have any then put a 1 after uselocalfirst in the cfg file.
Save the wuhutweet.cfg file
Version 0.30 introduces data rounding. This allows you to save spaces by rounding numbers to either integers or just 1 decimal point. WUHU puts out most of it’s numerical data with decimal places to either the tenths or hundredths. When using the data to Twitter sometimes you might want to do something like round off temperatures to integers, rain to tenths, pressure to tenths, and wind speed to integers. Follow the instructions below if you want to use rounding.
1. Open the wuhutweet.cfg file in notepad or your favorite text editor.
2. Add the following to the end of the file:
3. Save the file.
4. Copy your current tweetline into a text editor.
5. Add the following before each WUHU code that you want to round.
Where x = 0 or 1 depending on how many decimal places you want left in the data.
6. The following is a typical tweetline:
wp_Tweet.exe "%TimeHHMM%|<metarsky>%MetarSkyConditions%</metarsky>|<metarweather>%MetarWeatherConditions%</metarweather>|Temp (d=0)%OutdoorTempDegF% F|Hum (d=0)%OutdoorHumidity% %|Pres (d=1)%OutdoorPressureRelativeINHG%"|24Hr Rain (d=1)%OutdoorRain24HrIN%"|WndSpd (d=0)%OutdoorWindSpeedMPH% MPH|WndDir %OutdoorWindDirectionLetters%|WndChll (d=0)%OutdoorWindchillF% F"
Note: The above line does not have any carriage returns or linefeeds.
This will tweet the following if round is set to 1:
18:47|Sky: clear|Vis: 10mi|Temp 75 F|Hum 24 %|Pres 30.1"|24Hr Rain 0"|WndSpd 0 MPH|WndDir E|WndChll 75 F
If round is set to 0 it will look like this:
20:34|Sky: clear|Vis: 10mi|Temp 67.8 F|Hum 41.4 %|Pres 30.14"|24Hr Rain 0.00"|WndSpd 3.1 MPH|WndDir SSW|WndChll 67.8 F
This saved 6 characters. With Twitter’s 140 character limit this helps.
Setting up WUHU under Actions
Put a checkmark next to On Weather Update and On Update Seconds and make sure you put in a number of seconds. I use 3600 to update hourly but of course you can use whatever you wish.
Click on Save Changes and check your Twitter to see if it’s working correctly. Remember if you use a large number for the update it may not happen immediately. It could take the whole time you entered.
You can only use the online Metar function to replace Metar Sky Conditions
If you have any questions or can’t get it working you can ask in the wp_Software Yahoo Group or you can email firstname.lastname@example.org.