weather station software

46
Weather station software Weather station software 1 Greg Lehey, 18 May 2010 Fine Offset WH-1080 and WH-1081 Greg “groggy” Lehey [email protected] [email protected] [email protected] Ballarat, 18 May 2010

Upload: others

Post on 12-Sep-2021

16 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Weather station software

Weather station software

Weather station software 1 Gr eg Lehey, 18 May 2010

Fine Offset WH-1080 and WH-1081

Gr eg “gr oggy” [email protected]@[email protected], 18 May 2010

Page 2: Weather station software

Weather observation devices

Weather station software 2 Gr eg Lehey, 18 May 2010

• Old style: thermometer, hygr ometer, bar ometer andrain gauge.

• Digital devices start with inside/outside thermometerand inside hygrometer.

• Cost: about $30.

• Wireless versions include outside hydrometer, costabout $40.

• All of these are standalone devices.

Page 3: Weather station software

Computer connected devices

Weather station software 3 Gr eg Lehey, 18 May 2010

• All include outside thermometer, hygr ometer,bar ometer and wind gauge.

• Other features may be inside measurements andsunshine detectors.

• Used to be quite expensive.

• Older devices usually have async serial interfaces.

• Newer devices from China are muchcheaper, have USB interface.

Page 4: Weather station software

WH-1080 and WH-1081

Weather station software 4 Gr eg Lehey, 18 May 2010

• Made by Fine Offset.

• Marketed under many names.

• One of many products.

• WH-1080 has DCF receiver, not useful in Australia.

• WH-1081 has no DCF receiver, sold in Australia.

• Available on eBay for prices between $115 and$280.

• Search for Weather stations USB.

• Available from JayCar for currently $179.

Page 5: Weather station software

WH-1081 features

Weather station software 5 Gr eg Lehey, 18 May 2010

• Exter nal unit with wireless transmitter.

• Not clear if two can coexist.

• Ther mometer, resolution 0.1°.

• Hydr ometer, resolution 1%.

• Wind speed gauge, resolution 0.1 m/s.

• Wind direction measurement, resolution 22.5°.

• Appears to report only in incrementsof 45°.

• Rain gauge, resolution 0.3 mm.

Page 6: Weather station software

WH-1081 external unit

Weather station software 6 Gr eg Lehey, 18 May 2010

Page 7: Weather station software

WH-1081 internal unit

Weather station software 7 Gr eg Lehey, 18 May 2010

Page 8: Weather station software

WH-1081 internal unit

Weather station software 8 Gr eg Lehey, 18 May 2010

• Includes USB interface to computer.

• Displays temperatures, percentage humidity, airpr essur e, wind speed and direction.

• Displays some kind of rainfall average.

• Attempts weather forecast.

• Includes clock.

• Touch screen communication.

• Very low contrast.

• Pr etty much useless as a display.

Page 9: Weather station software

Softwar e

Weather station software 9 Gr eg Lehey, 18 May 2010

• Supplied with Easyweather software, runs on Mi-cr osoft only.

• Not supported out of the box by any free software.

• Steve Woodford adapted earlier code to wview.

• Only works on wview release 4.

• I adapted it to wview release 5.

Page 10: Weather station software

Weather web sites

Weather station software 10 Greg Lehey, 18 May 2010

• A couple of world-wide weather sites on the web.

• CWOP (Citizens Weather Observer Program),http://www.wxqa.com/

• Not investigated yet.

• Wundergr ound seems less US-centric.http://www.wunderground.com/

• Has map feature.

Page 11: Weather station software

Wundergr ound Der eel weather

Weather station software 11 Greg Lehey, 18 May 2010

Page 12: Weather station software

Wunder map Ballarat area

Weather station software 12 Greg Lehey, 18 May 2010

Page 13: Weather station software

wview (1)

Weather station software 13 Greg Lehey, 18 May 2010

• Written for a limited number of serial-connectweather stations.

• Thinks in American units, makes a half-hearted, in-accurate attempt to display metric units.

• Continually changing.

Page 14: Weather station software

wview (2)

Weather station software 14 Greg Lehey, 18 May 2010

Page 15: Weather station software

wview (3)

Weather station software 15 Greg Lehey, 18 May 2010

• Runs a number of processes.

• Emetic code.

• Communication by the Three Ugly Sisters (MSG,SEM, SHM).

• Stor es readings in (undocumented) custom format(version 4) or sqlite (version 5).

• Fr equently hangs, difficult to get start-ed again.

Page 16: Weather station software

Hardwar e issues: WH-1081 (1)

Weather station software 16 Greg Lehey, 18 May 2010

• No documentation of interface from manufacturer.

• Flaky interface.

• Fr equently retur ns invalid data.

• Game of catch-up recognizing invalid data.

• Doesn’t like NiMH batteries.

Page 17: Weather station software

Hardwar e issues: WH-1081 (2)

Weather station software 17 Greg Lehey, 18 May 2010

• Code we got was written for libusb, first version (0or 1, depending).

• Code had “just growed” and did all sorts of undocu-mented things.

• No easy way to get incorrect readings out of thewview database.

Page 18: Weather station software

Powercor to the rescue

Weather station software 18 Greg Lehey, 18 May 2010

• We have frequent power failures.

• On 11 November 2008, had a 5 hour failure.

• One computer and inside unit of weather stationdamaged.

• Many invalid readings.

• Couldn’t remove them from the record.

• Decided to write something more mal-leable.

Page 19: Weather station software

My code (1)

Weather station software 19 Greg Lehey, 18 May 2010

• Still evolving.

• Uses web browser as primary display.

• USB interface based on Steve Woodford’s code.

• One process reads the data and stores in a MySQLdatabase.

• One process generates data for the web pages.

Page 20: Weather station software

My code (2)

Weather station software 20 Greg Lehey, 18 May 2010

• Cr on jobs synchronize data from remote weatherstations and generate graphs.

• One process sends reports to Wundergr ound.

• No CWOP support (yet).

Page 21: Weather station software

WH-1081 internals

Weather station software 21 Greg Lehey, 18 May 2010

• 64 kB memory.

• 32 byte “pages”, addressed by USB code

• 16 byte entries containing weather information.

• All entries related to metric units.

• Page 0 contains magic numbers and a pointer tocurr ent page.

• Page 1 contains absolute and relativepr essur e.

• Rest unknown or unused.

• Purpose of pressur e infor mation inpage 1 is unclear.

Page 22: Weather station software

WH-1081 accuracy

Weather station software 22 Greg Lehey, 18 May 2010

• Temperatur e accuracy seems to be OK.

• Pr essur e measur ements seem to have a random off-set.

• Appears to be a frequent problem with weather sta-tions.

• Wind speed measurements appear to be very low.

• No way to confirm.

Page 23: Weather station software

WH-1081 accuracy: rain gauge

Weather station software 23 Greg Lehey, 18 May 2010

• Measur es in units of 0.3 mm.

• Doesn’t match well with my manual rain gauge.

• Vibration or wind might cause too high a reading.

• Spiders nest in the gauge, obstructing the bucketsand causing too low a reading.

Page 24: Weather station software

Rain gauge (1)

Weather station software 24 Greg Lehey, 18 May 2010

Page 25: Weather station software

Rain gauge (2)

Weather station software 25 Greg Lehey, 18 May 2010

Page 26: Weather station software

OS-r elated pr oblems

Weather station software 26 Greg Lehey, 18 May 2010

• Fr eeBSD often retur ns ENODEV reading the device.

• Pr oblem is not recoverable. Process must stop.

• New process normally works OK.

• Sometimes takes up to a minute.

• libusb retur ns bogus error indications under Linux.

• Not investigated further.

Page 27: Weather station software

Main page

Weather station software 27 Greg Lehey, 18 May 2010

Page 28: Weather station software

Inside and outside temperature

Weather station software 28 Greg Lehey, 18 May 2010

Page 29: Weather station software

5 day comparison

Weather station software 29 Greg Lehey, 18 May 2010

Page 30: Weather station software

Relative humidity

Weather station software 30 Greg Lehey, 18 May 2010

Page 31: Weather station software

Wind speed

Weather station software 31 Greg Lehey, 18 May 2010

Page 32: Weather station software

Bar ometric pr essur e

Weather station software 32 Greg Lehey, 18 May 2010

Page 33: Weather station software

Rainfall

Weather station software 33 Greg Lehey, 18 May 2010

Page 34: Weather station software

Temperatur es: BoM and Dereel

Weather station software 34 Greg Lehey, 18 May 2010

Page 35: Weather station software

Pr essur es: BoM and Dereel

Weather station software 35 Greg Lehey, 18 May 2010

Page 36: Weather station software

Comparisons page

Weather station software 36 Greg Lehey, 18 May 2010

• These measurements leave some questions open.

• Is my data correct? How do I know?

• How does the weather here dif fer fr om the sur-rounding area?

• Thus the comparisons page.

• Alr eady helped calibrate the barometer.

• Curr ently only for current day.

Page 37: Weather station software

Comparisons page

Weather station software 37 Greg Lehey, 18 May 2010

Page 38: Weather station software

Comparisons: temperatures

Weather station software 38 Greg Lehey, 18 May 2010

Page 39: Weather station software

Comparisons: dewpoint

Weather station software 39 Greg Lehey, 18 May 2010

Page 40: Weather station software

Comparisons: humidity

Weather station software 40 Greg Lehey, 18 May 2010

Page 41: Weather station software

Comparisons: barometric pressur e

Weather station software 41 Greg Lehey, 18 May 2010

Page 42: Weather station software

Comparisons: wind

Weather station software 42 Greg Lehey, 18 May 2010

Page 43: Weather station software

Comparisons: wind gust

Weather station software 43 Greg Lehey, 18 May 2010

Page 44: Weather station software

To do

Weather station software 44 Greg Lehey, 18 May 2010

• Lots of things.

• Replicate MySQL database to remote site.

• Find a more general way of generating graphs (alsoknown as “I hate gnuplot”).

• Fix myriads of bugs.

• Think out more featur es.

• Make it easy for other people to install.

Page 45: Weather station software

Refer ences: exter nal

Weather station software 45 Greg Lehey, 18 May 2010

• Manufactur er Fine Offset http://www.fos-hk.com/en/products/show.asp?id=41

• wview softwar ehttp://www.wviewweather.com/

Page 46: Weather station software

Refer ences: my site

Weather station software 46 Greg Lehey, 18 May 2010

• These slides athttp://www.lemis.com/grog/Pa-pers/WH-1080.pdf

• Power outages athttp://tinyurl.com/powercor

• My code athttp://www.lemis.com/grog/pro-grams/WH1080.tar.gz

• Der eel weather observations athttp://tinyurl.com/dereel-weather