Showing posts with label Weather Station. Show all posts
Showing posts with label Weather Station. Show all posts

Monday, January 13, 2014

WxService Stops Responding After Approx 17 Hours

I noticed recently that WxService would stop responding after a WxMonitor client was connected for about 17 hours (or half that with two WxMonitor clients, etc.). It turns out that StAX XMLInputFactory cannot create more than 64000 readers in JDK 1.7.0_45. In other words, WxService can only respond to 64,000 update requests until the XML parser stops responding. At one request per second, a single WxMonitor makes about that many requests in about 17 hours. Fortunately, there is a work-around that should hold us until Oracle produces a fix for this problem.

Using Notepad or other simple text editor, create a a file containing the following text:
#Hack for JAXP00010001 error.
jdk.xml.entityExpansionLimit=0
and save it as C:Program Files/Java/jre7/lib/jaxp.properties (that is, place the file jaxp.properties in $JAVA_HOME/jre/lib).

I will publish an update when this is no longer a problem.

Update: The latest WxService includes a code change that uses a different thread pool implementation that seems more compatible with JAX-WS. By "more compatible", I mean "the one it uses internally by default". There were some features that I liked with the one I had been using, but locking up wasn't one of them, so there you go. If you're experiencing lockups, download the latest version

Saturday, September 21, 2013

Going Down! (For Maintenance)

I will be taking the weather station offline for a short time while I upgrade my weather server computer. I hope that this interruption will be brief (less than a day).

Update: We're back!

Tuesday, August 13, 2013

How Vector Average Would Sum to Zero

In my post Consensus Averaging vs. Vector Averaging, I mentioned that adding two opposing vectors could produce undefined results. In a wind vane data averaging scenario, this would be extremely unlikely.

Assume the following conditions: A sample interval of 1 second, an average interval of 2 minutes, yielding 120 samples per average result. Incoming data is aligned on 16 compass headings:


It is quite possible for any two vectors to sum to zero. But we have 120 vectors to sum. In order to cancel out completely, we would require one of the following:
  • 60 vectors symmetrically distributed on either yellow or violet line.
  • 30 vectors symmetrically distributed on both the yellow and violet lines.
  • 30 vectors symmetrically distributed on any red, green or blue rectangle.
  • 15 vectors symmetrically distributed on all points.
  • Other permutations of symmetrical distributions on the various lines and rectangles and their rotations.
  • Equal numbers of samples from the northeast and northwest will result in a north vector that could be canceled by some number of south vectors. 
This list goes on, but when the wind is blowing, by far the most common scenario will have chaotic or turbulent input data in which more than half of the input data will be in the general direction of the prevailing wind, providing a dithered average with good resolution.

Sunday, September 16, 2012

Weather Station Back Online

I gave the entire 1-Wire network a complete going-over. RF is a big problem around here, since there's a 50KW AM transmitter within a mile of here. The new 1-Wire adapter is optically isolated from the computer's USB circuitry, and the adapter power supply is isolated from the house wiring, so presumably, there's no RF path to ground, and thus no current can flow.

However, the system had been working reliably for several years, before it began its downward slide. Maybe a lightning strike damaged the old 1-Wire adapter. I'll do some diagnostics on it when I get a chance.

Sunday, September 2, 2012

Weather Station Going Dark For a Few Days

I'm going to take my weather station offline for a few days for much needed repairs and improvements. My humidity sensor has been flaky for the last several weeks, and my attempts to fix it have been unsuccessful. So I'm going to take the whole thing down, and replace all of the RJ-11 and RJ-45 connectors, rearrange the wiring layout, and clean and oil the wind sensors. I'll probably bring the sensors back online one at a time, as I dial in each one before adding the next.