taim
New Member
Posts: 32
|
Post by taim on Mar 21, 2022 2:34:20 GMT -8
Hi, I noticed strange sunlight readings. It seems that they drop down when they reach a certain threshold? When you take a look at the curves (uploaded blynk here but dash looks similar), is this expected behavior?
|
|
taim
New Member
Posts: 32
|
Post by taim on Mar 21, 2022 3:56:19 GMT -8
In addition, I get some UV index of 1 in the middle of the night. This shouldn't be possible... Attachments:
|
|
|
Post by SDL on Mar 21, 2022 8:15:06 GMT -8
Can you look in the database and find the actual values before, during and after the UV1 event?
BP
|
|
taim
New Member
Posts: 32
|
Post by taim on Mar 21, 2022 15:33:40 GMT -8
ID TimeStamp 1 OutdoorTemperature OutdoorHumidity IndoorTemperature IndoorHumidity TotalRain SunlightVisible SunlightUVIndex WindGust WindDirection WindSpeed BarometricPressure BarometricPressureSeaLevel BarometricTemperature AQI AQI24Average BatteryOK CPUTemperature SerialNumber RSSI SNR NOISE
22128 2022-03-21 03:51:01 6,67 84 20,06 51 176,4 0 0 0 70 0 102,46 103,19 24,46 0 0 OK 37,93 4 -0,13 24,86 -24,98 22127 2022-03-21 03:36:02 6,89 83 19,94 52 176,4 0 0 0 28 0 102,46 103,19 24,11 0 0 OK 39,55 4 -0,14 24,3 -24,44 22126 2022-03-21 03:21:02 6,89 82 20,11 51 176,4 0 1 0 305 0 102,48 103,21 24,38 0 0 OK 37,93 4 -0,12 25,21 -25,33 22125 2022-03-21 03:06:02 6,89 82 20,06 52 176,4 0 0 0 57 0 102,48 103,21 24,09 0 0 OK 40,08 4 -0,11 24,11 -24,22 22124 2022-03-21 02:51:02 6,83 83 20,17 51 176,4 0 0 0 323 0 102,48 103,21 24,18 0 0 OK 37,39 4 -0,13 22,28 -22,41
|
|
|
Post by SDL on Mar 22, 2022 10:32:10 GMT -8
Do you have multiple WeatherRack2's?
It's really hard to read your print out above, but it looks like you have different serial numbers coming though.24, 25, 24, 22
Can you verify when you are getting good data what serial number you have? You may just be getting bad data (which has a bad serial number too) that others in the forum have mentioned.
BP
|
|
taim
New Member
Posts: 32
|
Post by taim on Mar 22, 2022 12:45:48 GMT -8
Do you have multiple WeatherRack2's? It's really hard to read your print out above, but it looks like you have different serial numbers coming though.24, 25, 24, 22 Can you verify when you are getting good data what serial number you have? You may just be getting bad data (which has a bad serial number too) that others in the forum have mentioned. BP No, only one weather rack.
Sorry for the formatting. I attached a .csv file. As you can appreciate it is only one serial number (4).
Any thoughts on the sunlight values getting "clipped" at 60.000?
|
|
|
Post by SDL on Mar 22, 2022 14:42:10 GMT -8
Send me the data formatted as the CSV file (but include the headers) for the event you were talking about. Before and after.
BP
|
|
taim
New Member
Posts: 32
|
Post by taim on Mar 24, 2022 2:08:14 GMT -8
Send me the data formatted as the CSV file (but include the headers) for the event you were talking about. Before and after. BP Ok, thanks!
I uploaded two .csv files, one for each issue.
1.) UVIndex values in during nighttime
2.) "Clipping"/"Breakdown" of Sunlight Values around midday
|
|
|
Post by SDL on Mar 24, 2022 7:59:56 GMT -8
1) Regarding the UV glitches. No explanation and we have seen those in our data too. I will report that to the WeatherRack2 manufacturers. We don't own the code in the sensors themselves.
2) I don't see anything that shows "clipping" of the light sensor. I see variability (clouds, shadows, etc.). Can you give me a specific line that you are looking at? With the samples around it please.
BP
|
|
|
Post by cdenney on Mar 24, 2022 12:07:40 GMT -8
I would like to chime in and say that I'm also having the sunlight clipping down problem. Every day, just about late-morning to noon, the sunlight readings drop and then slowly climb back up. This does not seem to be associated with clouds or shadows. Here is an example with todays light, with no clouds at all (nearly every day has a similar pattern although todays happened to be exceptionally striking). I also happen to have a commercial light sensor that was reading between 75,000 and 80,000 Lux when the weather station was reading about 45,000. I haven't had the UV issues, outside a single anomalous reading several days ago, but it hasn't repeated. -edit- adding image link didn't work, so here's a file upload -edit2- looking more closely at the taim's images, my problem seems to be different than the one they are experiencing, although it's a bit hard to tell given the different display options I have. My declines and returns both seem less abrupt, and I don't seem to have the sustained low values they have. Attachments:
|
|
taim
New Member
Posts: 32
|
Post by taim on Mar 25, 2022 0:21:46 GMT -8
1) Regarding the UV glitches. No explanation and we have seen those in our data too. I will report that to the WeatherRack2 manufacturers. We don't own the code in the sensors themselves. 2) I don't see anything that shows "clipping" of the light sensor. I see variability (clouds, shadows, etc.). Can you give me a specific line that you are looking at? With the samples around it please. BP Regarding No.2: Well, it has been sunny all day without any clouds (see video) and actually all week. This "drop" also seems to be a repeating pattern beginning around noon and recovering in late afternoon. Also, the rack is on the roof where there are no trees or other objects that could cast a shadow. So this can't really be it, I think In additon, from my understanding, if the Sunlight values drop shouldn't the UV-index values drop as well (which they don't)?
I am not a real programmer at all and the only snippet of code that could possibly related I found in WirelessSensors.py in lines 151-160.
wLight = var["light"] if (wLight >= 0x1fffa): wLight = wLight | 0x7fff0000
wUVI =var["uv"] if (wUVI >= 0xfa): wUVI = wUVI | 0x7f00
state.SunlightVisible = wLight state.SunlightUVIndex = round(wUVI/10.0, 1 ) Something happens if values are too high but I really don't get what the hex values and the vertical bar are doing and if that has anything to do with it.
Here are some more charts and data:
|
|
|
Post by SDL on Mar 27, 2022 9:13:58 GMT -8
Based on your excellent data and information, I think the word "clipping" is correct. I am guessing that have a bug that when the sunlight goes over ~65000 (2^16), it overflows and drops way down. Sounds like an unsigned integer problem that should be an unsigned long.
I'll bet you this problem is in the rtl_433 driver for the WeatherRack2. I'll note that in the bug report.
The other code has to do with filtering out errors.
I might be able to get to this problem today, depending on how some other debugging goes. It's a good day to do this as I agreed to work today and take next Friday off so I have few distractions!
BP
|
|
|
Post by SDL on Mar 27, 2022 9:55:49 GMT -8
Hmmm. I'm digging into the rtl_433 code and I'm not sure this problem can be fixed in a trivial manner. I'm looking at it.
I have dug through the data logs of our test unit and it is doing the same thing. I'm going to go put a really bright light on it since it is pretty cloudy today to capture the JSON from the WeatherRack2. I don't know if you are saving the log data in a nohup.out, but if You could dig through the logs and find that JSON during the "Clip time" and post it that would be very helpful.
BP
|
|
|
Post by SDL on Mar 27, 2022 10:33:27 GMT -8
Fixed and uploaded.
go into your rtl_433 directory (under SDR on the SwitchDoc Labs Card) and do the following:
git pull
cd build cmake .. make clean make sudo make install
The problem was that the high order bit of the Light data was not being shifted over far enough to reflect above the ~65000 light.
BP
|
|
|
Post by cdenney on Mar 27, 2022 13:55:52 GMT -8
Dang, and I was just finishing up collecting two days of sunlight data comparing the SkyWeather2 and my other sensor, haha. Thanks for the quick fix!
That makes sense though as in nearly 2 months of data, the max sunlight value I have is ~69,000. And there have been plenty of sunny days that should have been well over that.
I'll report back with how the data looks, after the fix, although I may not be able to get comparison data for a while since it's going to rain and my alternate sensor isn't waterproof.
|
|