Invalid dewpoint reported **solved**

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

Post Reply
doncurtis
Senior Boarder
Senior Boarder
Posts: 51
Joined: Wed Jan 25, 2017 2:12 am

Invalid dewpoint reported **solved**

Post by doncurtis » Sat Aug 26, 2017 3:36 pm

WS-1090 console only reports humidity from 10% to 99%, below 10% (relatively common in summer here in Colorado) below 10% the console shows two dashes. I do not know what data is received by meteobridge (3.2) but it reports 0% to WU and other sites but also reports dewpoint as the same as temperature! As if it were 100% humidity.

I have set weather station setup in meteobridge to 10 on the first item and 99 on the 2nd.

So why does meteobridge report dewpoint incorrectly when meteobridge believes humidity is zero?

Would it be possible for meteobridge to calculate dewpoint as if humidity were 5% when it reports 0% or some such?

I have until Feb. 2019 for free updates so not a problem for me to uodate to 3.3 ir 3.4 if needed.

Don
Last edited by doncurtis on Sat Sep 09, 2017 11:03 pm, edited 1 time in total.
---------
Don

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5026
Joined: Mon Oct 01, 2007 10:51 pm

Re: Invalid dewpoint reported

Post by admin » Sat Aug 26, 2017 11:37 pm

When sensor reports zero humidity, dewpoint cannot be calculated as "log (0)" in the used formular is not defined and might be assumed to be somehow infinite. I would recommend to get the originating sensor issue solved.

doncurtis
Senior Boarder
Senior Boarder
Posts: 51
Joined: Wed Jan 25, 2017 2:12 am

Re: Invalid dewpoint reported

Post by doncurtis » Sun Aug 27, 2017 4:09 pm

I understand, at zero percent, there is no water, thus no dewpoint. However the issue isn't the sensor itself. Meteobridge, under that condition, reports dewpoint as the same value as temperature. Which would be 100% rel humidity.

The console on the WS-1080/1090 will not display a humidity reading below 10%...it shows two dashes instead. I am presuming in that state the console reports 0% relative humidity. In Colorado, and throughout the desert states, during the summer, relative humidity readings below 10% are not that unusual when the temperature get into the 90's and 100's Fahrenheit.

My original sensor read too high, I just replaced it with a brand new one from Ambient Weather. When this issue showed up, Ambient Weather sent me another new sensor. Same issue.

The issue is the way meteobridge handles the console output. We all know zero percent relative humidity is impossible near the earth's surface.

So all I am asking is if a humidy sensor reports 0% relative humidity then use 5% instead to calculate dewpoint. It's essentially 1 line of code before you calculate dewpoint.

If relhum = 0 then relhum = 5......

For the time being, I put the original sensor back, it's reading high but better that than impossible values.

Don
---------
Don

dolfs
Junior Boarder
Junior Boarder
Posts: 35
Joined: Mon Apr 20, 2015 11:26 am

Re: Invalid dewpoint reported

Post by dolfs » Sat Sep 02, 2017 1:45 pm

You are putting the values 10 and 99 in the MeteoBridge setup. I can only imagine you are referring here to the item called humidity stretching. You should not use that this way.

Let's discuss with some symbols:
  • RH = "true" relative humidity
  • RHm = measured RH (sensor value with 10 ≤ RH ≤ 99)
  • RHd = displayed RH, assumed RHm is valid. For RHm < 10 it displays "--" for out of range. Don't know what it does for RHm > 99. It could also display "--", or it could simply limit itself to 99.
  • RHc = measured RH as output to MeteoBridge. This is not necessarily the same as RHd. You describe RHc as 0 for RHm < 10, and I assume it will be 99 or 100 for RHm > 99.
  • RHs = "Stretched" RHc, as computed by MeteoBridge from RHc, using formula below.
  • RHl = Low value entered into MeteoBridge stretching (-> 0%)
  • RHh = High value entered into MeteoBridge stretching (-> 100%)
What humidity stretching does is to take the RHc value from your station and subject it to a formula: Rhs = SF * (RHc - RHl). All input values have RHl subtracted, and then stretched by multiplying by SF = 100 / (RHh - RHl). This means that true "stretching" only happens if (RHh - RHl) < 100, otherwise it will be shrinking. In your case, with RHl = 10, if RHm ≤ 10 it gets mapped to 0 as RHc before the dew point calculation is even begun. That runs afoul of the logarithm calculation in the formula, which requires RHc > 0 (lots of detail here: formula 11). RHc=99 becomes RHs = 100/89 * (99 - 10) = 100 which does not have much impact.

If you believe your sensor's values are correct for RHm=RHc=RH in the range of 10-99 (it reads "true" within its accuracy and range) you should set your station's low high stretching values to 0 and 100 respectively, which effectively does not stretch at all, and does not offset. If you don't know if it reads "true", you could calibrate with a known good reference hygrometer. Take measurements of at least two different RH and RHm (in the valid range where RHc=RHm). Now take those points and perform a linear fit (RHm = slope * RH + intercept). From that determine what RH would give you a RHm=0 (enter as RHl), and ditto for 100 (enter as RHh; a little math required here). Of course this assumes your sensor behaves more or less linearly. Most sensors do between at least 30% and 80% so I would try to take the measurements there. If you have no reference hygrometer, but you have a nearby station known to be correct, you can use that as a starting point.

Even if you correctly "calibrate" and determine RHl and RHh, unless your fit is such that RHl < 0 (and thus no RHc can produce a value ≤ 0), you will still have the logarithm problem. If your fit requires RHl ≥ 0, you will have the problem.

Lets assume for a moment that RHh - RHl = 100 (effectively no stretching, just an offset), and that RHl ≠ 0. That means:
  • RHl < 0: Never a problem, because it will correct all RH values upwards, meaning they can never be 0.
  • RHl ≥ 0, all values will go down by RHl. If in real life your RH is always ≥ RHl, or your station will never deliver values below RHl there will be no problem (but your station does, because it delivers RHc=0 for RHm < 10). Since you state RH can be < 10 in Colorado summers, you will have the problem with RHc=0 a true possibility.
  • For those with stations that do not "drop to zero", but "clamp" values (e.g. to 10 and 99), you might be safe with an RHl > 0, as long as "clamped(RH)"=RHm=RHc ≥ RHl.
So, for you any value of RHl ≥ 0 will cause problems. Your only choice is to set RHl to something like -0.1 (this avoids the problem, but is not the "right" fit). If your desired RHl was > 0 this change tends to flatten the slope of the stretching line. You'll effectively have to increase RHh as well. Lets take the example of RHl=9, RHh=109 (implying max RHs is 91 at RH=100). You can choose to raise it by the same amount as the original RHl (make it -0.1 and 99.9). This leaves the slope intact, but now max RHs is 99.9 of course. That introduces an error at the top end. May be you want to keep the error there at 0, so you still want max RHs=91 at RH=100. That means RHh = 100 * 100 / 91 = 109.9. If you would prefer the error to remain 0 around RH=50 you would choose different. 50 should have mapped onto 41, so now RHh must be chosen to be 100 * 50 / 41 = 121.95.

There are more complicated alternatives for non-linear fits and dealing better with your "drop to zero" issue, but they all require using custom HTTP uploads with complicated (and conditional) MeteoBridge template expressions. You probably do not want to go there.

doncurtis
Senior Boarder
Senior Boarder
Posts: 51
Joined: Wed Jan 25, 2017 2:12 am

Re: Invalid dewpoint reported

Post by doncurtis » Mon Sep 04, 2017 12:47 am

I'll reset the "stretching" to 0 to 100. And replace my current sensor (which I know reads high) with the new sensor and see what happens.

I have no way to adjust what the console sends to meteobridge.
---------
Don

Mattk
Gold Boarder
Gold Boarder
Posts: 295
Joined: Mon Sep 22, 2014 3:24 am

Re: Invalid dewpoint reported

Post by Mattk » Mon Sep 04, 2017 1:24 am

So does the console send anything (as such) to MeteoBridge? My understanding is MB "reads" its own data and not data that the console has massaged in any way.

dolfs
Junior Boarder
Junior Boarder
Posts: 35
Joined: Mon Apr 20, 2015 11:26 am

Re: Invalid dewpoint reported

Post by dolfs » Mon Sep 04, 2017 9:05 am

Yes, MB "reads" data from the console port. What is not clear is whether the console display behaves differently from what values are made available on the port that MB uses. For example is it just the console that displays "--" when its RH sensor delivers values < 10 (because these values are not reliable), or does the sensor simply not deliver those values and deliver something representing "off scale low" for true RH < 10.

In the former case, the console might display "--", but the port may see a value such as 5, but in the other case it is simply not possible to give the console the value 5 because the sensor never delivers it.

When I mentioned clamping, I means it is also possible that there is no separate "off scale low" indication from the sensor to the firmware, but that values are simply "clamped" to 10.

It should be possible to determine what happens with some precise experiments, but I don't have this station.

doncurtis
Senior Boarder
Senior Boarder
Posts: 51
Joined: Wed Jan 25, 2017 2:12 am

Re: Invalid dewpoint reported

Post by doncurtis » Wed Sep 06, 2017 9:02 pm

I just reset the "stretch" humidity to 0 ->100 and replaced the sensor. I strongly *suspect* that the data read from the port is 0 when the humidity on the console shows "- -" as that is what MB reports to the networks, but... The biggest issue is when MB reads 0 from the console and calculates dewpoint...the result is EXACTLY the same as current temp... Thus resulting in the the effective rel humidity of 100% (where dewpoint and temp are equal).

I've done an awful lot of programming in my life and having MB "check" the reading and if 0, replace with 5 should be very simple to implement and avoid having the dewpoint jump from 35 deg to 90 deg and then a few minutes later jump from 90 deg back to 35 deg.

I don't so much care that rel. humidity is reported as zero as long as dewpoint is reasonable.

As I said... There is no such thing as zero relative humidity in our atmosphere at habitable altitudes. But there are relative humidites of < 10%.
---------
Don

doncurtis
Senior Boarder
Senior Boarder
Posts: 51
Joined: Wed Jan 25, 2017 2:12 am

Re: Invalid dewpoint reported *BUG*

Post by doncurtis » Sat Sep 09, 2017 11:02 pm

Right now, console is showing 89.1 deg F, and "--" for relative humidity. NO humidity stretch (set at 0 and 100) and live data is showing 0% humidity, current temp of 89.1 deg F and dewpoint of 89.1deg F.

THAT IS WRONG IT IS A BUG!

If outdoor dewpoint = current outdoor temp, then relative humidity is 100% not 0%.

Again,a simple fix is if you read rel humidity of 0,change rel humidity to 5% and calculate dewpoint
---------
Don

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5026
Joined: Mon Oct 01, 2007 10:51 pm

Re: Invalid dewpoint reported *BUG*

Post by admin » Sun Sep 10, 2017 1:49 pm

5? Why not 3? or 4? or 7?

A fix for your false reporting sensor (apart from replacing it) would be not to report dew point at all when your sensor is giving zero data. I will see how that can be achieved.

BTW, why don't you solve your individual "problem" by adapting the humidity stretch so that zero value cannot occur? :roll:

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5026
Joined: Mon Oct 01, 2007 10:51 pm

Re: Invalid dewpoint reported

Post by admin » Sun Sep 10, 2017 2:24 pm


doncurtis
Senior Boarder
Senior Boarder
Posts: 51
Joined: Wed Jan 25, 2017 2:12 am

Re: Invalid dewpoint reported **solved**

Post by doncurtis » Sun Sep 10, 2017 3:42 pm

I'd be happy to use humidity stretch but as you see I got a very long reply on why humidity stretch wouldn't help.

But that does bring up an interesting point, does the low value in humidity stretch accept a negative value? Could I set it to... - 5 for zero and 100 for 100%?

Added in edit:
(I see that it does from your example on the release note)

I have replaced the sensor twice.

Thank you for the software fix.

Don
---------
Don

Post Reply