maccampb
New Member
Posts: 21
Raspberry Pi: Yes
Other Device: Linux on X64, Particle Photon, MAC
|
Post by maccampb on Feb 14, 2022 8:02:45 GMT -8
Hello all. In the dash app for SkyWeather2, I see on occasion, spurious temperature and humidity readings from the outdoor sensor SkyRack, that either pin high and/or oscillate. I've attached a screen shoot of the readings expanded to show the readings that I'm seeing this forint Outdoor temps overnight were -17C. I rebooted the system once and that reset the readings, but the spurious readings have started re-occured? Current temp as I write is -14C and SkyWeather2 is reporting the current outdoor temperature as 173.28C! Any thoughts as to how to troubleshoot this? MAC
|
|
maccampb
New Member
Posts: 21
Raspberry Pi: Yes
Other Device: Linux on X64, Particle Photon, MAC
|
Post by maccampb on Feb 14, 2022 8:34:30 GMT -8
|
|
maccampb
New Member
Posts: 21
Raspberry Pi: Yes
Other Device: Linux on X64, Particle Photon, MAC
|
Post by maccampb on Feb 14, 2022 10:47:51 GMT -8
I also have a debug log running capturing for today... too big to upload!
|
|
|
Post by SDL on Feb 16, 2022 13:12:21 GMT -8
What version of SkyWeather2 are you running?
We have fixed the bad readings (possibly! ) in previous version. This may be something else.
If you would, find out when you got the spurious readings, and then go into the debug log and cut out the debug information for 5 minutes before and 5 minutes after for us to look at.
BP
|
|
maccampb
New Member
Posts: 21
Raspberry Pi: Yes
Other Device: Linux on X64, Particle Photon, MAC
|
Post by maccampb on Feb 26, 2022 9:31:41 GMT -8
Sorry for the delay getting this uploaded... Here's some clipped data... I'm using 27.3. It looks like the spurious data is somehow a duplicated version logged at the same time in the database. I have clipped out and put in the database entries near the time of the original data from the outside sensors. There are three examples in this file. Look for a line of "*******************************" to find the occurrences. I fixed the data by going into the database with Beekeeper Studio and deleting the erroneous entries. SpuriousData0214.txt (227.91 KB)
|
|
|
Post by SDL on Feb 26, 2022 13:11:54 GMT -8
Previous good Data: This is the raw data: {"time": "2022-02-14 07:29:23", "model": "SwitchDoc Labs FT020T AIO", "device": 12, "id": 127, "batterylow": 0, "avewindspeed": 2, "gustwindspeed": 7, "winddirection": 329, "cumulativerain": 1044, "temperature": 402, "humidity": 79, "light": 1396, "uv": 0, "mic": "CRC", "mod": "ASK", "freq": 433.99, "rssi": -0.106, "snr": 17.905, "noise": -18.011} Bad Data: This is the raw data: {"time" : "2022-02-14 07:44:03", "model" : "SwitchDoc Labs FT020T AIO", "device" : 12, "id" : 126, "batterylow" : 0, "avewindspeed" : 494, "gustwindspeed" : 495, "winddirection" : 478, "cumulativerain" : 60927, "temperature" : 1727, "humidity" : 250, "light" : 50875, "uv" : 231, "mic" : "CRC", "mod" : "ASK", "freq" : 433.991, "rssi" : -0.117, "snr" : 18.931, "noise" : -19.048} Next Good Data: This is the raw data: {"time" : "2022-02-14 07:55:15", "model" : "SwitchDoc Labs FT020T AIO", "device" : 12, "id" : 127, "batterylow" : 0, "avewindspeed" : 7, "gustwindspeed" : 10, "winddirection" : 323, "cumulativerain" : 1044, "temperature" : 410, "humidity" : 76, "light" : 2827, "uv" : 1, "mic" : "CRC", "mod" : "ASK", "freq" : 433.990, "rssi" : -0.105, "snr" : 19.415, "noise" : -19.520 Next Bad Data: This is the raw data: {"time" : "2022-02-14 08:29:23", "model" : "SwitchDoc Labs FT020T AIO", "device" : 12, "id" : 127, "batterylow" : 0, "avewindspeed" : 5, "gustwindspeed" : 10, "winddirection" : 332, "cumulativerain" : 1044, "temperature" : 425, "humidity" : 72, "light" : 4773, "uv" : 2, "mic" : "CRC", "mod" : "ASK", "freq" : 433.989, "rssi" : -0.124, "snr" : 18.676, "noise" : -18.800} Looks like the serial number 127 is always right, while 126 is not. 127 is 01111111 in binary and 126 is 01111110 which makes me think that the whole data has been shifted by one bit during demodulation. But that doesn't quite make sense either since the serial numbers are 8 bits and the top bit is 0 in both cases. The CRC should catch that but it doesn't seem to do that. I checked and the CRC code is correct and will not send a JSON message if the WeatherRack2 message is corrupt. Here is one of my messages from our test unit: {"time" : "2022-02-26 11:38:30", "model" : "SwitchDoc Labs FT020T AIO", "device" : 12, "id" : 69, "batterylow" : 0, "avewindspeed" : 5, "gustwindspeed" : 7, "winddirection" : 294, "cumulativerain" : 54, "temperature" : 744, "humidity" : 54, "light" : 32718, "uv" : 17, "mic" : "CRC", "mod" : "ASK", "freq" : 433.976, "rssi" : -0.121, "snr" : 9.113, "noise" : -9.235} That leads me to believe that the WeatherRack2 is generating a bad message (we don't own that software and can't modify it), which you are receiving correctly. Ignore IDs of 126 is my best advice. Discussion on the RSSI, SNR and NOISE RSSI: 0 Good, further negative is low signal. Good Messages My RSSI: -0.121 Your RSSI: -0.105 (Your Bad Message is: -0.117) Seems comparable to mine. SNR: SNR = RSSI - Noise Higher the better Good Messages My SNR: 9.113 Your SNR: 19.415 (Your Bad Message: 18.676) NOISE: 0 is bad. More negative is good Good Message My NOISE: -9.235 Your NOISE: -19.50 (Bad Message is: -18) This tells me that this is probably not a noise or bad reception problem. Your signal is better than mine and you have a lot less noise (not surprised about that - you should see the amount of RF generating equipment I have here in the lab). So, that reinforces that the WeatherRack2 is sending bad data with a good CRC. Hope this helps! But you still have to do the filtering. BP
|
|
maccampb
New Member
Posts: 21
Raspberry Pi: Yes
Other Device: Linux on X64, Particle Photon, MAC
|
Post by maccampb on Feb 27, 2022 9:16:01 GMT -8
Thanks... that's very helpful as I was thinking about another approach to deal with this. Along the lines of calculating a smoothed average set of readings and ignoring anything that was obviously out of range.
My bet is that at the lower temps, the AIO clock or something similar just slows down just enough to cause the data to shift a bit. I will add in the ID check and see if that helps. I will log any time the spurious reading occurs, and see if your suggestion pans out.
And of course the weather here in Southern Ontario is trending warmer as we get into spring, so I may not be able to really test it until next winter. The weather here this winter has been colder and snowier than in recent years. The temps we've been experiencing in Jan/Feb may just be on the lower operational limit for this particular outdoor unit.
FYI, the antenna for the SDR is elevated and about 12m from the AIO, so that's the reason for the radio SNR and levels. Lots of computers in the office, but clearly not enough to swap the SDR.
And as a backup, I have ordered another Skyweather2 system as I wanted a backup set and some extra sensors. LOL.
Thanks for taking the time to check this out... Much appreciated.
MAC
|
|
|
Post by SDL on Feb 27, 2022 10:06:08 GMT -8
You bet! An interesting problem that had to be investigated. And we did want to document the RSSI, SNR and NOISE levels stored in the database from the AOI. Have to make this into a blog post.
BP
|
|
taim
New Member
Posts: 32
|
Post by taim on Mar 7, 2022 7:58:03 GMT -8
Similar problem here. Since this morning data is oscillating af.
Don't know really how to proceed from here...
|
|
|
Post by SDL on Mar 7, 2022 10:30:42 GMT -8
I would replace the batteries in the WeatherRack2. That might cause this.
BP
|
|
taim
New Member
Posts: 32
|
Post by taim on Mar 10, 2022 12:09:06 GMT -8
Well, I did change the batteries. The problem is still occurring though. I also looked at the data in the database and it is very strange. It seems that every second value is abnormal and has a different serial number. How is that possible?
In addtion, I also noticed a very strange behavior of the sunlight measurements around midday. They suddenly drop. I can exclude clouds or any other shadows as it has been sunny all day and the station really is in the open.
Any ideas?
|
|
maccampb
New Member
Posts: 21
Raspberry Pi: Yes
Other Device: Linux on X64, Particle Photon, MAC
|
Post by maccampb on Mar 11, 2022 7:15:34 GMT -8
I'm seeing the same second readings occur... For me, a reboot fixed it right away, making me think a software error. I's seeing WR=252 as the id for the second reading and the timestamp is different, so the duplicate check seems to fail.
It seems that a spurious reading from the outdoor sensor causes an error reading to be set, and is pushed to the database along with a valid data set at the same time.
Could be a queue error, a failure to reinitialize the state dataset or a bug in the radio software.
Here's an example from the logs...
--->Sending MQTT Packet<--- ------Patting The Dog------- trying database -------------------- SkyCam Picture Taken -------------------- Rain24Hour= 1.5 CPUT= 49.173 trying database --------- WR2 Array length= 2 --------- --------- WR - SerialNumber= 127 --------- processing FT020T Data This is the raw data: {"time": "2022-03-08 22:32:52", "model": "SwitchDoc Labs FT020T AIO", "device": 12, "id": 127, "batterylow": 0, "avewindspeed": 0, "gustwindspeed": 0, "winddirection": 145, "cumulativerain": 1485, "temperature": 663, "humidity": 83, "light": 0, "uv": 0, "mic": "CRC", "mod": "ASK", "freq": 433.991, "rssi": -0.108, "snr": 17.564, "noise": -17.673} --------- WR - SerialNumber= 252 --------- processing FT020T Data This is the raw data: {"time": "2022-03-08 22:42:12", "model": "SwitchDoc Labs FT020T AIO", "device": 12, "id": 252, "batterylow": 0, "avewindspeed": 0, "gustwindspeed": 57, "winddirection": 0, "cumulativerain": 23760, "temperature": 2341, "humidity": 80, "light": 0, "uv": 18, "mic": "CRC", "mod": "ASK", "freq": 433.986, "rssi": -0.116, "snr": 17.698, "noise": -17.815} error--->>> Temperature reading from FT020T This is the raw temperature: 194.1 mySkyCameraText= SkyWeather2 V027.3 08-Mar-2022 22:47:18 Wind Speed: 0.0KPH Wind Gust: 20.5KPH Temp: 90.1 C query= INSERT INTO SkyCamPictures (cameraID, picturename, picturesize, messageID, resends,resolution) VALUES('SkyCamPi', 'SkyCamPi_1_2022-03-08-22-47-18.jpg', 46328, 1, 0, 0 ) Processing F016TH data This is the raw data: {"time" : "2022-03-08 22:47:24", "model" : "SwitchDoc Labs F016TH Thermo-Hygrometer", "device" : 92, "modelnumber" : 5, "channel" : 1, "battery" : "OK", "temperature_F" : 64.700, "humidity" : 41, "mic" : "CRC", "mod" : "ASK", "freq" : 433.990, "rssi" : -0.110, "snr" : 17.737, "noise" : -17.847}
--->Sending MQTT Packet<--- ------Patting The Dog------- --->Sending MQTT Packet<--- ------Patting The Dog------- --->Sending MQTT Packet<--- Tick! The time is: 2022-03-08 22:48:16.095666 ------------- Current State ------------- ------------- latest MainSensor Reading= 2022-03-08 22:47:16 MainDeviceNumber= 93 OutdoorTemperature = 90.06 OutdoorHumidity = 80 latest Indoor Sensor Reading= 2022-03-08 22:47:24 IndoorDeviceNumber= 1 IndoorTemperature = 18.17 IndoorHumidity = 41 Rain60Minutes = 0.0 SunlightVisible = 0 SunlightUVIndex = 1.8 WindSpeed = 0.0 WindGust = 5.7 WindDirection = 0 TotalRain = 2376.0 BarometricTemperature = 28.18 BarometricPressure = 99.45295 Altitude = 210.0 BarometricPressureSeaLevel = 101.96583 BarometricTemperature = 28.18 barometricTrend = False pastBarometricReading = 99.45133 AQI = 0.0 Hour24_AQI = 0.0 WS_AQI = 0.0 WS_Hour24_AQI = 0.0 Main Battery Status = OK CPU Temperature = 49.173 Serial Number = 252 RSSI = -0.116 SNR = 17.698 NOISE = -17.815 ------------- runRainbow = False flashStrip = False runOLED = True ------------- Last_Event = My Last Event ------------- batteryVoltage 0 batteryCurrent 0 solarVoltage 0 solarCurrent 0 loadVoltage 0 loadCurrent 0 batteryPower 0 solarPower 0 loadPower 0 batteryCharge 0 SolarMAX Inside Temperature 0.0 SolarMAX Inside Humidity 0.0 SolarMAX Last Received Never ------------- ------------- ------------- fanState = False ------------- --->Sending MQTT Packet<--- ------Patting The Dog------- -------------------- SkyCam Picture Taken -------------------- Processing F016TH data This is the raw data: {"time" : "2022-03-08 22:48:17", "model" : "SwitchDoc Labs F016TH Thermo-Hygrometer", "device" : 92, "modelnumber" : 5, "channel" : 1, "battery" : "OK", "temperature_F" : 64.700, "humidity" : 41, "mic" : "CRC", "mod" : "ASK", "freq" : 433.989, "rssi" : -0.141, "snr" : 17.320, "noise" : -17.461}
mySkyCameraText= SkyWeather2 V027.3 08-Mar-2022 22:48:18 Wind Speed: 0.0KPH Wind Gust: 20.5KPH Temp: 90.1 C query= INSERT INTO SkyCamPictures (cameraID, picturename, picturesize, messageID, resends,resolution) VALUES('SkyCamPi', 'SkyCamPi_1_2022-03-08-22-48-18.jpg', 46950, 1, 0, 0 ) --->Sending MQTT Packet<--- ------Patting The Dog------- --->Sending MQTT Packet<--- ------Patting The Dog------- --->Sending MQTT Packet<--- Processing F016TH data This is the raw data: {"time" : "2022-03-08 22:49:10", "model" : "SwitchDoc Labs F016TH Thermo-Hygrometer", "device" : 92, "modelnumber" : 5, "channel" : 1, "battery" : "OK", "temperature_F" : 64.700, "humidity" : 41, "mic" : "CRC", "mod" : "ASK", "freq" : 433.995, "rssi" : -0.109, "snr" : 18.074, "noise" : -18.182}
Tick! The time is: 2022-03-08 22:49:16.095629 -------------
|
|
maccampb
New Member
Posts: 21
Raspberry Pi: Yes
Other Device: Linux on X64, Particle Photon, MAC
|
Post by maccampb on Mar 11, 2022 7:47:00 GMT -8
this might be part of the problem...
in wirelessSensors.py version 27.3
code snippet
# put in previous temperature wtemp = state.OutdoorTemperature if (config.SWDEBUG): print("wTemp=%s %s", (str(wTemp),nowStr() ))
state.OutdoorTemperature = round(((wTemp - 32.0)/(9.0/5.0)),2)
in the error case, the errored temp is not corrected...
|
|
|
Post by SDL on Mar 11, 2022 12:13:17 GMT -8
I see it! I hate this about Python. wTemp and wtemp are not the same thing. I'll fix that later today and upload a new version. Thank you!
BP
|
|
maccampb
New Member
Posts: 21
Raspberry Pi: Yes
Other Device: Linux on X64, Particle Photon, MAC
|
Post by maccampb on Mar 11, 2022 12:36:42 GMT -8
no worries... I set up a development environment with PyCharm and the RPi running the software. PyCharm kept reminding me that the wtemp variable was unused and I still had to look for it ....I've done a patch locally to see it that corrects it, and have added the 127 id check, which I think may also help...
|
|