dlw27
New Member
Posts: 22
|
Post by dlw27 on Jan 31, 2021 14:58:48 GMT -8
Now I have sensor data output on screen (after Ctrl-C) . . . see output file, but no records in mysql tables
MariaDB [SkyWeather]> select * from WeatherData; Empty set (0.001 sec)
MariaDB [SkyWeather]> select * from systemlog; +------+---------------------+-------+----------+-------------------------------+ | ID | TimeStamp | Level | Source | Message | +------+---------------------+-------+----------+-------------------------------+ | 2181 | 2021-01-25 00:07:58 | 20 | __main__ | SkyWeather Startup Version055 | | 2182 | 2021-01-27 00:49:54 | 20 | __main__ | SkyWeather Startup Version055 | | 2183 | 2021-01-29 21:53:07 | 20 | __main__ | SkyWeather Startup Version055 | | 2184 | 2021-01-31 21:03:56 | 20 | __main__ | SkyWeather Startup Version055 | | 2185 | 2021-01-31 21:25:51 | 20 | __main__ | SkyWeather Startup Version055 | | 2186 | 2021-01-31 22:51:10 | 20 | __main__ | SkyWeather Startup Version055 | +------+---------------------+-------+----------+-------------------------------+ 6 rows in set (0.002 sec)
|
|
|
Post by SDL on Feb 2, 2021 16:09:49 GMT -8
There are some records in the MySql table. You just showed it. That means the DB is working. For some reason you don't find anything in the other tables?
Post the other tables.
BP
|
|
dlw27
New Member
Posts: 22
|
Post by dlw27 on Feb 2, 2021 17:10:10 GMT -8
Table WeatherData is empty
MariaDB [SkyWeather]> describe WeatherData; +-----------------------------+--------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------------------+--------------+------+-----+---------------------+----------------+ | ID | int(20) | NO | PRI | NULL | auto_increment | | TimeStamp | timestamp | NO | | current_timestamp() | | | as3935LightningCount | float | NO | | NULL | | | as3935LastInterrupt | float | NO | | NULL | | | as3935LastDistance | float | NO | | NULL | | | as3935LastStatus | varchar(200) | NO | | NULL | | | currentWindSpeed | float | NO | | NULL | | | currentWindGust | float | NO | | NULL | | | currentWindDirection | float | NO | | NULL | | | currentWindDirectionVoltage | float | NO | | NULL | | | totalRain | float | NO | | NULL | | | bmp180Temperature | int(20) | NO | | NULL | | | bmp180Pressure | float | NO | | NULL | | | bmp180Altitude | float | NO | | NULL | | | bmp180SeaLevel | float | NO | | NULL | | | outsideTemperature | float | NO | | NULL | | | outsideHumidity | float | NO | | NULL | | | insideTemperature | float | NO | | NULL | | | insideHumidity | float | NO | | NULL | | | AQI | float | NO | | NULL | | +-----------------------------+--------------+------+-----+---------------------+----------------+ 20 rows in set (0.007 sec)
...............but no records
MariaDB [SkyWeather]> select * from WeatherData; Empty set (0.001 sec)
|
|
|
Post by SDL on Feb 3, 2021 8:45:10 GMT -8
That means you aren't writing to the WEatherData table.
Are you letting it run long enough?
writeWeatherRecord (trigger: interval[0:05:00], next run at: 2021-01-27 00:54:55 GMT)
It only writes every 5 minutes.
BP
|
|
dlw27
New Member
Posts: 22
|
Post by dlw27 on Feb 13, 2021 13:51:35 GMT -8
WeatherData records are writing to db table every 5 minutes, but only after Crtl-C keyboard interruption. Very Odd and not what I was expecting.
I start execution with: cd /home/pi/SDL_Pi_SkyWeather sudo python SkyWeather.py
then, terminal display shows mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM) mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1) ('after bme680', True) as3935 start I/O error(121): Remote I/O error I/O error(121): Remote I/O error after SHT30
I wait 15 minutes, but no records are written to WeatherData table (I know from timestamp)
I perform a keyboard interrupt . . . Contorl+C
then the display shows . . .
SkyWeather Weather Station Version 055 - SwitchDoc Labs
Program Started at:2021-02-06 22:12:21
---------------------- I2C Mux - TCA9545: Present BME680: Present BMP280: Not Present SkyCam: Not Present DS3231: Not Present HDC1080: Not Present SHT30: Not Present AM2315: Not Present ADS1015: Not Present ADS1115: Present AS3935: Not Present OLED: Not Present SunAirPlus/SunControl: Not Present SolarMAX: Not Present SI1145 Sun Sensor: Not Present TSL2591 Sun Sensor: Not Present DustSensor: Not Present WXLink: Not Present Dual SolarMAX/WXLink: Not Present
UseBlynk: Not Present UseMySQL: Present Check WLAN: Not Present WeatherUnderground: Not Present UseWeatherStem: Not Present ----------------------
Then records are written to SkyWeather database every 5 minutes (as I expected)
But why keyboard interrupt to start db writing . . . I'm guessing apscheduler is not configured correctly . . . your insight would be helpful
|
|
|
Post by SDL on Feb 14, 2021 10:07:11 GMT -8
Boy, you are giving me a headache here! I guess that's my job, however.
I think the problem is the SHT30 detection (actually the AM2315 detection - which is not there.)
Do you have an SHT30 or an AM2315 plugged in? Once I know that I can help you get this fixed!
BP
|
|
dlw27
New Member
Posts: 22
|
Post by dlw27 on Feb 14, 2021 11:00:48 GMT -8
Neither SHT30 or AM2315; I'm using the PiWeather Board with I2C BME680 built into board.
|
|
dlw27
New Member
Posts: 22
|
Post by dlw27 on Feb 14, 2021 14:38:06 GMT -8
Got it working without the keyboard interrupt by commenting out block of code starting with "Setup AM2315" down to bottom of "Main Program".
Let me know of a more eloquent solution . . . thanks for all of the help.
|
|
|
Post by SDL on Feb 14, 2021 14:45:46 GMT -8
That's the problem! The system was designed (and not perfectly well) to look for an SHT30 or AM2315. If you don't have either it taks a LONG time to time out.  BP
|
|
dlw27
New Member
Posts: 22
|
Post by dlw27 on Mar 7, 2021 13:24:17 GMT -8
Using SDL_Pi_WeatherRack.py v3 (within SDL_Pi_SkyWeather on github), what are the default units of wind speed? km/hr or m/sec or miles (statute) per hour.
I'm using SwitchDoc Labs WeatherRack Wind vane, anemometer and rain bucket on Raspberry pi.
I have "Adjust3or5" = 0.66 and PowerVoltage = 3.3
Thanks
|
|
|
Post by SDL on Mar 7, 2021 13:28:19 GMT -8
km/hr
BP
|
|
dlw27
New Member
Posts: 22
|
Post by dlw27 on Mar 13, 2021 13:02:24 GMT -8
Thanks. I just bought SHT30 sensor from switchdoc and I was able to use it immediately with my PiWeather Board.
Curious about accuracy of humidity. I'm testing indoors (both SHT30 and BME680 are side-by-side) and noticed a 10 point difference between the BME680 humidity values and the SHT30 humidity values. SHT30 values are consistently higher than BME680. Your thoughts and insight would be greatly appreciated.
Does either sensor have any calibration adjustments. . . I'm trying to understand difference. I will soon place both sensors outside and compare with my commercial humidity sensor.
Thanks
|
|
|
Post by SDL on Mar 15, 2021 8:20:35 GMT -8
The BME680 is on the board so is not really very accurate for T/H. Report back your calibration!
BP
|
|
dlw27
New Member
Posts: 22
|
Post by dlw27 on Mar 16, 2021 17:28:00 GMT -8
My outside comparison experiment was not wide in temperature range or humidity range and lasted only 5 hours. I used an inexpensive La Crosse Technology (LCT) product as "ground truth".
My results: - all 3 temperature measurements (SHT30, BME680 and LCT) were within 1F from a range from 45F to 60F - relative humidity measurements varied significantly between 3 sensors: LCT were consistently higher by 8 to 10 points above SHT30 which was 8 to 10 points higher than BME680.
Is there any way to adjust SHT30 humidity readings? Are my results consistent with other people?
My next experiment will be with a simple Sling Psychrometer for most accurate ground truth.
Thanks for any insight.
|
|
|
Post by SDL on Mar 17, 2021 8:58:32 GMT -8
You can map the sensors to your ground truth. Nice if it were linear, but we need to see your data! Which should be very interesting.
BP
|
|