|
Post by Powderjockey on Jun 24, 2020 17:27:34 GMT -8
Patting The Dog------- WARNING:apscheduler.scheduler:Execution of job "checkForButtons (trigger: interval[0:00:10], next run at: 2020-06-24 18:31:56 MDT)" skipped: maximum number of running instances reached (1) WARNING:apscheduler.scheduler:Execution of job "checkForButtons (trigger: interval[0:00:10], next run at: 2020-06-24 18:32:06 MDT)" skipped: maximum number of running instances reached (1) What causes this?
|
|
|
Post by SDL on Jun 25, 2020 8:01:05 GMT -8
Hmm. Something is waiting in "checkForButtons" and apscheduler will not run a second instance.
def checkForButtons(): reinitializeOLED = False if ((state.runOLED == False) and (config.OLED_Originally_Present == True)): reinitializeOLED = True
if (config.USEBLYNK): updateBlynk.blynkStatusUpdate()
if ((state.runOLED == True) and (reinitializeOLED == True)): I2C_Lock.acquire() initializeOLED() I2C_Lock.release()
Reboot if you can and if it starts happening again, please capture the 100 or so lines above the start of duplication. That should give us a big clue.
I am thinking that it is hanging in the "blynkStatusUpdate" probably due to some weird network condition.
BP
|
|
|
Post by Powderjockey on Jul 1, 2020 7:43:53 GMT -8
currentInsideTemperature = 15.07 currentInsideHumidity = 58.67 currentRain60Minutes = 0.0 currentSunlightVisible = 3063.1008 currentSunlightIR = 666 currentSunlightUV = 0 currentSunlightUVIndex = 0.0 ScurrentWindSpeed = 24.2349684166 ScurrentWindGust = 59.7133757962 ScurrentWindDirection = 0.0 currentTotalRain = 0.8382 currentBarometricPressure = 893.66 currentAltitude = 999.0 currentSeaLevel = 1007.37615463 barometricTrend = True pastBarometricReading = 893.66 Outdoor_AirQuality_Sensor_Value = 163 Hour24_Outdoor_AirQuality_Sensor_Value = 0 Indoor_AirQuality_Sensor_Value = 0 ------------- currentAs3935Interrupt = 0 currentAs3935LastInterrupt = 0 currentAs3935LastDistance = 0 currentAs3935LastStatus = 0 currentAs3935LastLightningTimeStamp = 0 ------------- runRainbow = False flashStrip = False runOLED = True ------------- Last_Event = My Last Event EnglishMetric = 1 ------------- 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 None ------------- ------------- WXbatteryVoltage 0 WXbatteryCurrent 0 WXsolarVoltage 0 WXsolarCurrent 0 WXloadVoltage 5.0 WXloadCurrent 0 WXbatteryPower 0 WXsolarPower 0 WXloadPower 0 WXbatteryCharge 0 ------------- fanState = False ------------- WXLink Blocks Block1 Length= 0 Block2 Length= 0 The pastebin URL is (r.text):{"jpg":"https://cdn.weatherstem.com/user_generated/skyweather/powderjockey/2020/07/01/15/39/10.jpg","internal":{"station":{"name":"SkyWeatherSouthCBK","handle":"powderjockey"},"record":"19611802","image":"19610074","readings":[{"value":"12.700","id":"501660481","sensor":"1"},{"sensor":"4","value":"52.800","id":"501660484"},{"sensor":"7","id":"501660487","value":"15.070"},{"sensor":"10","id":"501660490","value":"58.821"},{"sensor":"13","id":"501660493","value":null},{"value":"2989.171","id":"501660496","sensor":"16"},{"sensor":"19","id":"501660499","value":"649.000"},{"id":"501660502","value":null,"sensor":"22"},{"sensor":"25","value":"19.483","id":"501660505"},{"value":"54.148","id":"501660508","sensor":"28"},{"id":"501660511","value":"315.000","sensor":"31"},{"value":"0.838","id":"501660514","sensor":"34"},{"sensor":"37","id":"501660517","value":"893.710"},{"sensor":"40","value":"999.000","id":"501660520"},{"value":"1007.433","id":"501660523","sensor":"43"},{"value":"0.000","id":"501660526","sensor":"46"},{"sensor":"49","value":"163.000","id":"501660529"},{"sensor":"52","id":"501660532","value":null},{"id":"501660535","value":null,"sensor":"55"},{"value":null,"id":"501660538","sensor":"58"}]},"json":"https://cdn.weatherstem.com/user_generated/skyweather/powderjockey/2020/07/01/15/39/10.json"} WARNING:apscheduler.scheduler:Execution of job "checkForButtons (trigger: interval[0:00:10], next run at: 2020-07-01 09:39:44 MDT)" skipped: maximum number of running instances reached (1) ------Patting The Dog------- WARNING:apscheduler.scheduler:Execution of job "checkForButtons (trigger: interval[0:00:10], next run at: 2020-07-01 09:39:54 MDT)" skipped: maximum number of running instances reached (1) ------Patting The Dog------- WARNING:apscheduler.scheduler:Execution of job "sampleAndDisplay (trigger: interval[0:00:30], next run at: 2020-07-01 09:40:04 MDT)" skipped: maximum number of running instances reached (1) Tick! The time is: 2020-07-01 09:40:04.514798 ------Patting The Dog------- trying database trying database before query query=INSERT INTO PowerSystem(TimeStamp, batteryVoltage, batteryCurrent, solarVoltage, solarCurrent, loadVoltage, loadCurrent, batteryPower, solarPower, loadPower, batteryCharge) VALUES (UTC_TIMESTAMP (), 4.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000) before query query=INSERT INTO WeatherData(TimeStamp,as3935LightningCount, as3935LastInterrupt, as3935LastDistance, as3935LastStatus, currentWindSpeed, currentWindGust, totalRain, bmp180Temperature, bmp180Pressure, bmp180Altitude, bmp180SeaLevel, outsideTemperature, outsideHumidity, currentWindDirection, currentWindDirectionVoltage, insideTemperature, insideHumidity, AQI) VALUES(UTC_TIMESTAMP(), 0.000, 0.000, 0.000, "", 24.235, 59.713, 0.838, 15, 893.660, 999.000, 1007.376, 12.700, 52.400, 0.000, 3.773, 15.070, 58.670, 163.000) query=INSERT INTO Sunlight(TimeStamp, Visible, IR, UV, UVIndex) VALUES(UTC_TIMESTAMP(), 3063, 666, 0, 0.000) BarometerLightningGraph source:test days:10 ('sleeping seconds:', 0) BarometerLightningGraph running now trying database query= SELECT TimeStamp, bmp180SeaLevel, as3935LastInterrupt, as3935LastDistance FROM WeatherData where now() - interval 240 hour < TimeStamp ############### Reading AQI ############### Turning Dust Power On -------------------- SkyCam Picture Taken -------------------- ('count of t=', 3685) -------------------- SkyCam Package Sending -------------------- BarometerLightningGraph finished now TemperatureHumidityGraph source:test days:10 ('sleeping seconds:', 0) TemperatureHumidityGraph running now trying database query= SELECT TimeStamp, bmp180Temperature, outsideTemperature, outsideHumidity, insideHumidity FROM WeatherData where now() - interval 240 hour < TimeStamp ('count of t=', 3685) ------Patting The Dog------- currentTime=124 DEBOUNCE-count=342 ----------------- Sample and Display Done ----------------- TemperatureHumidityGraph finished now PowerCurrentGraph source:test days:10 delay:0 ('sleeping :', 0) PowerCurrentGraph running now trying database ('count of t=', 3685) ------Patting The Dog------- WARNING:apscheduler.scheduler:Execution of job "checkForButtons (trigger: interval[0:00:10], next run at: 2020-07-01 09:40:24 MDT)" skipped: maximum number of running instances reached (1) PowerCurrentGrapGraph finished now PowerVoltageGraph source:test days:10 delay:0 ('sleeping :', 0) PowerVoltageGraph running now trying database ('count of t=', 3685) currentTime=3905 DEBOUNCE-count=447 ------Patting The Dog------- ----------------- Sample and Display ----------------- ----------------- Weather Sampling ----------------- (' value = ', 3282.1875) (' voltageValue = ', 3.2821875) ----------------- PowerVoltageGraph finished now The pastebin URL is (r.text):{"jpg":"https://cdn.weatherstem.com/user_generated/skyweather/powderjockey/2020/07/01/15/40/13.jpg","internal":{"image":"19610107","readings":[{"id":"501661459","value":"12.700","sensor":"1"},{"id":"501661462","value":"52.400","sensor":"4"},{"value":"15.070","id":"501661465","sensor":"7"},{"id":"501661468","value":"58.670","sensor":"10"},{"value":null,"id":"501661471","sensor":"13"},{"value":"3063.101","id":"501661474","sensor":"16"},{"id":"501661477","value":"666.000","sensor":"19"},{"value":null,"id":"501661480","sensor":"22"},{"value":"24.235","id":"501661483","sensor":"25"},{"value":"59.713","id":"501661486","sensor":"28"},{"sensor":"31","value":null,"id":"501661489"},{"id":"501661492","value":"0.838","sensor":"34"},{"sensor":"37","value":"893.660","id":"501661495"},{"sensor":"40","id":"501661498","value":"999.000"},{"id":"501661501","value":"1007.376","sensor":"43"},{"sensor":"46","id":"501661504","value":"0.000"},{"id":"501661507","value":"163.000","sensor":"49"},{"value":null,"id":"501661510","sensor":"52"},{"sensor":"55","value":null,"id":"501661513"},{"value":null,"id":"501661516","sensor":"58"}],"record":"19611835","station":{"handle":"powderjockey","name":"SkyWeatherSouthCBK"}},"json":"https://cdn.weatherstem.com/user_generated/skyweather/powderjockey/2020/07/01/15/40/13.json"} Air Quality Measurements for PM2.5: 77936 particles/0.01ft^3 121 ugm^3 Current AQI (not 24 hour avg): 185
Turning Dust Sensor Power Off AM2315 Stats: (g,br,bc,rt,pc) (1159, 0, 0, 2, 0) --Sending Data to WeatherUnderground-- cws=| 18.1509099565 myURL= ID=ICRANBRO8&PASSWORD=xv79etqu&dateutc=now&winddir=337&windspeedmph=11.34&windgustmph=335.50&humidity=52&tempf=54.86&dewptf=37.80&rainin=0.00&dailyrainin=0.03&baromin=29.75&indoortempf=59.13&indoorhumidity58.72=&software=SkyWeather https://rtupdate.wunderground.com/weatherstation/updateweatherstation.php?ID=ICRANBRO8&PASSWORD=xv79etqu&dateutc=now&winddir=337&windspeedmph=11.34&windgustmph=335.50&humidity=52&tempf=54.86&dewptf=37.80&rainin=0.00&dailyrainin=0.03&baromin=29.75&indoortempf=59.13&indoorhumidity58.72=&software=SkyWeather success
GET sent ----------------- SunAirPlus Not Present ----------------- ----------------- ----------------- ----------------- AS3935 Lightning Detector ----------------- Last result from AS3935: ----No Lightning detected--- Lightning Count = 0 ----------------- ------------- Current State ------------- currentOutsideTemperature = 12.7 currentOutsideHumidity = 52.6 currentInsideTemperature = 15.07 currentInsideHumidity = 58.716 currentRain60Minutes = 0.0 currentSunlightVisible = 3191.0496 currentSunlightIR = 717 currentSunlightUV = 0 currentSunlightUVIndex = 0.0 ScurrentWindSpeed = 18.1509099565 ScurrentWindGust = 536.792663834 ScurrentWindDirection = 337.5 currentTotalRain = 0.8382 currentBarometricPressure = 893.68 currentAltitude = 999.0 currentSeaLevel = 1007.39869958 barometricTrend = True pastBarometricReading = 893.68 Outdoor_AirQuality_Sensor_Value = 185 Hour24_Outdoor_AirQuality_Sensor_Value = 0 Indoor_AirQuality_Sensor_Value = 0 ------------- currentAs3935Interrupt = 0 currentAs3935LastInterrupt = 0 currentAs3935LastDistance = 0 currentAs3935LastStatus = 0 currentAs3935LastLightningTimeStamp = 0 ------------- runRainbow = False flashStrip = False runOLED = True ------------- Last_Event = My Last Event EnglishMetric = 1 ------------- 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 None ------------- ------------- WXbatteryVoltage 0 WXbatteryCurrent 0 WXsolarVoltage 0 WXsolarCurrent 0 WXloadVoltage 5.0 WXloadCurrent 0 WXbatteryPower 0 WXsolarPower 0 WXloadPower 0 WXbatteryCharge 0 ------------- fanState = False ------------- WXLink Blocks Block1 Length= 0 Block2 Length= 0 ------Patting The Dog------- ------Patting The Dog------- WARNING:apscheduler.scheduler:Execution of job "sampleAndDisplay (trigger: interval[0:00:30], next run at: 2020-07-01 09:41:04 MDT)" skipped: maximum number of running instances reached (1) Tick! The time is: 2020-07-01 09:41:04.524079 Probably more than 100 lines. Seems very lethargic. It would have rebooted yesterday on the 5 day cycle.
The AQ does not produce a line graph any more in Blynk (live view), mostly dots and the outside temp seems off from what it actual is..
|
|
|
Post by SDL on Jul 1, 2020 18:49:57 GMT -8
Hmm. Something is hanging. I wonder. Do you have an AM2315 or an SHT30 on your station?
Second weird thing is the "checkForButtons" hanging. Shut off the Blynk variable in conflocal.py and see if the sampleanddisplay still hangs.
BP
|
|
|
Post by Powderjockey on Jul 9, 2020 14:42:56 GMT -8
I believe it is the AM2315.
The unit has become sluggish and I'm wondering about disk space. I have an 8 GB card in there and I'm going to set up a 16 and see if there is any difference. I have about 1.3 GB free on the 8.
It has stopped numerous times lately
pi@skyweather:~ $ cd SDL_Pi_SkyWeather pi@skyweather:~/SDL_Pi_SkyWeather $ sudo python SkyWeather.py (1505.6832000000004, 1007, 389) () ('Pi Camera Revision', u'ov5647') ('after bme680', True) as3935 start I/O error(121): Remote I/O error after SHT30 outsideTemperature: 16.0 C outsideHumidity: 43.5 % crc: 0x8b01
SkyWeather Weather Station Version 055 - SwitchDoc Labs
Program Started at:2020-07-09 07:42:05
---------------------- I2C Mux - TCA9545: Present BME680: Present BMP280: Not Present SkyCam: Present DS3231: Not Present HDC1080: Not Present SHT30: Not Present AM2315: Present ADS1015: Not Present ADS1115: Present AS3935: Present OLED: Not Present SunAirPlus/SunControl: Not Present SolarMAX: Not Present SI1145 Sun Sensor: Not Present TSL2591 Sun Sensor: Present DustSensor: Present WXLink: Not Present Dual SolarMAX/WXLink: Not Present
UseBlynk: Present UseMySQL: Present Check WLAN: Present WeatherUnderground: Present UseWeatherStem: Present ---------------------- ----------------- Sample and Display ----------------- ----------------- Weather Sampling ----------------- (' value = ', 3780.0) (' voltageValue = ', 3.78) ----------------- AM2315 Stats: (g,br,bc,rt,pc) (2, 0, 0, 0, 0) --Sending Data to WeatherUnderground-- cws=| 0.408006538985 myURL= ID=ICRANBRO8&PASSWORD=xv79etqu&dateutc=now&winddir=0&windspeedmph=0.26&windgustmph=0.00&humidity=96&tempf=60.80&dewptf=59.50&rainin=0.00&dailyrainin=0.00&baromin=30.08&indoortempf=51.06&indoorhumidity65.78=&software=SkyWeather https://rtupdate.wunderground.com/weatherstation/updateweatherstation.php?ID=ICRANBRO8&PASSWORD=xv79etqu&dateutc=now&winddir=0&windspeedmph=0.26&windgustmph=0.00&humidity=96&tempf=60.80&dewptf=59.50&rainin=0.00&dailyrainin=0.00&baromin=30.08&indoortempf=51.06&indoorhumidity65.78=&software=SkyWeather success
GET sent ----------------- SunAirPlus Not Present ----------------- ----------------- ----------------- ----------------- AS3935 Lightning Detector ----------------- Last result from AS3935: ----No Lightning detected--- Lightning Count = 0 ----------------- ------------- Current State ------------- currentOutsideTemperature = 16.0 currentOutsideHumidity = 96.4 currentInsideTemperature = 10.59 currentInsideHumidity = 65.778 currentRain60Minutes = 0.0 currentSunlightVisible = 1517.4336 currentSunlightIR = 397 currentSunlightUV = 0 currentSunlightUVIndex = 0.0 ScurrentWindSpeed = 0.408006538985 ScurrentWindGust = 0 ScurrentWindDirection = 0.0 currentTotalRain = 0.0 currentBarometricPressure = 903.59 currentAltitude = 999.0 currentSeaLevel = 1018.56972401 barometricTrend = True pastBarometricReading = 903.59 Outdoor_AirQuality_Sensor_Value = 0 Hour24_Outdoor_AirQuality_Sensor_Value = 0 Indoor_AirQuality_Sensor_Value = 0 ------------- currentAs3935Interrupt = 0 currentAs3935LastInterrupt = 0 currentAs3935LastDistance = 0 currentAs3935LastStatus = 0 currentAs3935LastLightningTimeStamp = 0 ------------- runRainbow = False flashStrip = False runOLED = True ------------- Last_Event = My Last Event EnglishMetric = 1 ------------- 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 None ------------- ------------- WXbatteryVoltage 0 WXbatteryCurrent 0 WXsolarVoltage 0 WXsolarCurrent 0 WXloadVoltage 5.0 WXloadCurrent 0 WXbatteryPower 0 WXsolarPower 0 WXloadPower 0 WXbatteryCharge 0 ------------- fanState = False ------------- WXLink Blocks Block1 Length= 0 Block2 Length= 0 exception in blynkStateUpdate Traceback (most recent call last): File "/home/pi/SDL_Pi_SkyWeather/updateBlynk.py", line 274, in blynkStateUpdate r = requests.put(config.BLYNK_URL+config.BLYNK_AUTH+'/update/V3', data=put_body, headers=put_header) File "/usr/lib/python2.7/dist-packages/requests/api.py", line 124, in put return request('put', url, data=data, **kwargs) File "/usr/lib/python2.7/dist-packages/requests/api.py", line 56, in request return session.request(method=method, url=url, **kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 488, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 609, in send r = adapter.send(request, **kwargs) File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 487, in send raise ConnectionError(e, request=request) ConnectionError: HTTPConnectionPool(host='blynk-cloud.com', port=80): Max retries exceeded with url: /2-IbtQzTAxXUmyt7pbyp9_8gxvDzHyYO/update/V3 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7045dab0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
HTTPConnectionPool(host='blynk-cloud.com', port=80): Max retries exceeded with url: /2-IbtQzTAxXUmyt7pbyp9_8gxvDzHyYO/update/V3 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7045dab0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)) ----------------- Sample and Display Done ----------------- taking SkyPicture -------------------- SkyCam Picture Taken -------------------- -------------------- SkyCam Package Sending -------------------- Traceback (most recent call last): File "SkyWeather.py", line 1783, in <module> SkyCamera.takeSkyPicture() File "/home/pi/SDL_Pi_SkyWeather/SkyCamera.py", line 125, in takeSkyPicture sendSkyWeather() File "/home/pi/SDL_Pi_SkyWeather/SkyCamera.py", line 400, in sendSkyWeather r = requests.post(url = API_ENDPOINT, json = data) File "/usr/lib/python2.7/dist-packages/requests/api.py", line 110, in post return request('post', url, data=data, json=json, **kwargs) File "/usr/lib/python2.7/dist-packages/requests/api.py", line 56, in request return session.request(method=method, url=url, **kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 488, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 609, in send r = adapter.send(request, **kwargs) File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 487, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='skyweather.weatherstem.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x702df490>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
|
|
|
Post by Powderjockey on Jul 10, 2020 19:04:08 GMT -8
I had enough of the problems with this, so I pulled the micro SD card out and created a brand new with Raspian Buster on it, with a larger capacity and reloaded the software on it.
Even after spending the day getting the system up and running and I'm still having these issues.
------Patting The Dog------- WARNING:apscheduler.scheduler:Execution of job "sampleAndDisplay (trigger: interval[0:00:30], next run at: 2020-07-10 20:58:32 MDT)" skipped: maximum number of running instances reached (1) ------Patting The Dog-------
|
|
|
Post by SDL on Jul 13, 2020 13:12:34 GMT -8
I'm almost certain that this has to do with a flaky internet or Wifi connection to your unit.
This is why:
=443): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.Verifi edHTTPSConnection object at 0x702df490>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
BP
|
|
kiwx
Junior Member
Posts: 65
|
Post by kiwx on Jul 19, 2020 10:28:49 GMT -8
I found that my ISP DNS was denying the connection to the DNS because of too many queries. I don't think the RPi is caching the DNS query. There is also something wrong in the blynk code that holds open the TCP socket. If you perform a netstat on the RPi, you will see hundreds of tcp sockets to blynk-cloud.com in a TIME_WAIT state. I modified the code to add a 20 second timeout to each blynk update URL command as well as update the "check buttons" code to only poll every few mins...not every 10 seconds.. That reduced the sockets, but is not a good method for those that are not familiar with coding and will break updates from Switchdoc.
The best method I found was to have the blynk-cloud.com ip in a HOSTS file on the RPi. This does not stop the sockets from opening, but it does prevent the DNS query to the ISP and seem to fix this particular error.
|
|
|
Post by SDL on Jul 19, 2020 11:40:05 GMT -8
Kwix,
I believe that you have nailed the problem. Somebody is your chain is not caching correctly. If that is true, your solution is perfect!
Please post exactly what you did so others can see the process.
BP
|
|