Weather Underground Rapid Fire Patch
Introduction
This patch creates a new binary 'wu2300_RapidFire' which is a daemon that opens the weather station port, grabs current data and uploads to the weather underground
RapidFire system every 3-5 seconds.
Installation of Patch
patch -p1 < wu_rapidfire_v1.0.diff
Change History of Patch
v1.0 Initial release of patch based on code mods I made -
AndyBrown
v2.0a Closed testing with select members of the mailing list (Thanks to Pete Geenhuizen)
v2.0b New patch made available, see below for FULL details of this patch and how to use it.
Somebody needs to test the windows port as I've made what I believe are the correct changes, but haven't got a station connected to my windows PC to test this with.
--
AndyBrown - 10 Jan 2007
Version 2.0b released:
The new patch incorporates the http patch that corrected the original Weather Underground uploading problem. Apply the patch with either patch -p0 or -p1 to a clean download of version 1.10 (It will not apply cleanly to any other patched versions).
After applying, you need to compile. Do a 'make all' and if you want the
MySQL then compile 'make wu2300_RapidFire_MySQL'.
The patch will provide you with 2 additional binaries 'wu2300_RapidFire' and 'wu2300_RapidFire_MySQL'. Both of these will upload to the weather underground rapidfire service every 3 seconds, and if you are using the
MySQL version will also insert the db row into your database every 3 seconds.
Several new configuration options are present:
WURAPIDFIRE_MYSQLLOG 1
This enables the
MySQL logging when you use the wu2300_RapidFire_MySQL binary.
WURAPIDFIRE_TOUCHFILE 1 # Set to 1 to automatically 'touch' a file on each loop (use it to check process isn$
This enabled the 'touchfile' so that every time the binary sends an upload to wunderground it will 'touch' or update the timestamp of a file. This allows you to monitor the file for freshness and kill/restart the program if it hasn't sent an update for longer than a certain period of time. I have also included a file 'check_rapidfire.sh' that will check the file and send a killall if the file hasn't been refreshed for the last 5 minutes.
WURAPIDFIRE_TOUCHFILENAME /tmp/weather.stamp
This sets the 'touchfile' as defined above. If you change this path, be sure to change the 'check_rapidfire.sh' script if you use it.
All comments are welcome, I'll email Kenneth and hope to have this tested and included in an official release very shortly.
--
AndyBrown - 05 Aug 2007
It would be really nice if patches were relative to the SVN version.
There are many other bug fixes on SVN and I do not have the time to manually convert the patches against 1.10 to current SVN
--
KennethLavrsen - 05 Aug 2007
I'll do that today and post back a new diff that applies to the SVN
--
AndyBrown - 06 Aug 2007
Is anyone still working on this project, or is it dead? I tried to get the wu2300_RapidFire v2b to work, but from what I can tell it is broken and will not produce a proper get request and dosent produce the proper
UserAgent or HTTP version strings. I don't really know a lot about C so I tried to copy and paste and edit some elements from wu2300.c into wu2300_RapidFire.c and was able to get it to make a proper GET / request... but as I know almost nothing about C I ended up creating some kinda loop and it made 6 of those then promptly failed back at send(5, "GET /weatherstation/updateweathe"..., 268, 0) = 268
recv(5,
--
GregBolte - 02 Feb 2008
well as it turns out I was just doing it wrong, I was trying to patch the wrong version of the thing...anyway it works perfectly now sorry for the wrong information.
--
GregBolte - 05 Feb 2008