|
Post by karambit on Apr 24, 2021 15:08:31 GMT -8
Is there a way to smooth out the Wind Direction readings over a certain interval? I find that sometimes the wind vane can get blown around if the wind has high variances in the speed and this can cause inaccurate wind direction readings if the writeWeatherRecord job runs at the wrong time. The vane has such little friction that is is very easy to make it spin and if the wind isn't a somewhat consistent speed then a small burst of wind can send the vane spinning in circles. This also happened on my old GroveWeatherPi system with the WeatherRack and I ended up coding it to read the wind direction every 10 seconds and when it went to write to the database or upload to Weather Underground it used the most common reading during the last 5 minutes. I also did the same thing for wind speed and wind gust on that system to use the average for each over the past 5 minutes. Attached is a sample from today on my Weather Underground PWS page showing the erratic readings. A second attachment is from the other day when the wind was a little more consistent and the direction had a lot less erratic readings. Attachments:
|
|
|
Post by karambit on Apr 22, 2021 15:02:57 GMT -8
I have a POE hat on mine so hardwire is preferred. If you are running a cable to it you might as well run just one and get network and power.
|
|
|
Post by karambit on Apr 22, 2021 8:15:37 GMT -8
My station stopped uploading data to Weather Underground. They've been having issues the past few days and looks like something happened last night that made the station stop uploading data. I think there needs to be some error handling in pclogging.py maybe to handle this issue and allow writeWeatherRecord to continue to run.
Apr 22 04:21:01 weatherstationpi sm-msp-queue[14377]: unable to qualify my own domain name (weatherstationpi) -- using short name
Apr 22 04:33:42 weatherstationpi rc.local[434]: File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1915, in do_handshake
Apr 22 04:33:42 weatherstationpi rc.local[434]: self._raise_ssl_error(self._ssl, result)
Apr 22 04:33:42 weatherstationpi rc.local[434]: File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1639, in _raise_ssl_error
Apr 22 04:33:42 weatherstationpi rc.local[434]: raise SysCallError(errno, errorcode.get(errno))
Apr 22 04:33:42 weatherstationpi rc.local[434]: OpenSSL.SSL.SysCallError: (104, 'ECONNRESET')
Apr 22 04:33:42 weatherstationpi rc.local[434]: During handling of the above exception, another exception occurred:
Apr 22 04:33:42 weatherstationpi rc.local[434]: Traceback (most recent call last):
Apr 22 04:33:42 weatherstationpi rc.local[434]: File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
Apr 22 04:33:42 weatherstationpi rc.local[434]: chunked=chunked)
Apr 22 04:33:42 weatherstationpi rc.local[434]: File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 343, in _make_request
Apr 22 04:33:42 weatherstationpi rc.local[434]: self._validate_conn(conn)
Apr 22 04:33:42 weatherstationpi rc.local[434]: File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 841, in _validate_conn
Apr 22 04:33:42 weatherstationpi rc.local[434]: conn.connect()
Apr 22 04:33:42 weatherstationpi rc.local[434]: File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 344, in connect
Apr 22 04:33:43 weatherstationpi rc.local[434]: ssl_context=context)
Apr 22 04:33:43 weatherstationpi rc.local[434]: File "/usr/lib/python3/dist-packages/urllib3/util/ssl_.py", line 344, in ssl_wrap_socket
Apr 22 04:33:43 weatherstationpi rc.local[434]: return context.wrap_socket(sock, server_hostname=server_hostname)
Apr 22 04:33:43 weatherstationpi rc.local[434]: File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 459, in wrap_socket
Apr 22 04:33:43 weatherstationpi rc.local[434]: raise ssl.SSLError('bad handshake: %r' % e)
Apr 22 04:33:43 weatherstationpi rc.local[434]: ssl.SSLError: ("bad handshake: SysCallError(104, 'ECONNRESET')",)
Apr 22 04:33:43 weatherstationpi rc.local[434]: During handling of the above exception, another exception occurred:
Apr 22 04:33:43 weatherstationpi rc.local[434]: Traceback (most recent call last):
Apr 22 04:33:43 weatherstationpi rc.local[434]: File "/usr/lib/python3/dist-packages/requests/adapters.py", line 449, in send
Apr 22 04:33:43 weatherstationpi rc.local[434]: timeout=timeout
Apr 22 04:33:43 weatherstationpi rc.local[434]: File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
Apr 22 04:33:43 weatherstationpi rc.local[434]: _stacktrace=sys.exc_info()[2])
Apr 22 04:33:43 weatherstationpi rc.local[434]: File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 398, in increment
Apr 22 04:33:43 weatherstationpi rc.local[434]: raise MaxRetryError(_pool, url, error or ResponseError(cause))
Apr 22 04:33:43 weatherstationpi rc.local[434]: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='rtupdate.wunderground.com', port=443): Max retries exceeded with url: /weatherstation/updateweatherstation.php?ID=XXXXXXX&PASSWORD=XXXXXXX&dateutc=now&winddir=352&windspeedmph=4.91&windgustmph=5.81&humidity=67&tempf=33.21&dewptf=21.33&rainin=0.00&dailyrainin=0.22&baromin=29.84&indoortempf=35.91&indoorhumidity59.00=&solarradiation=15.79&UV=0.50&software=SkyWeather2 (Caused by SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')")))
Apr 22 04:33:43 weatherstationpi rc.local[434]: During handling of the above exception, another exception occurred:
Apr 22 04:33:43 weatherstationpi rc.local[434]: Traceback (most recent call last):
Apr 22 04:33:43 weatherstationpi rc.local[434]: File "/home/pi/SkyWeather/SDL_Pi_SkyWeather2/WeatherUnderground.py", line 57, in sendWeatherUndergroundData
Apr 22 04:33:43 weatherstationpi rc.local[434]: r = requests.get("https://rtupdate.wunderground.com/weatherstation/updateweatherstation.php", params=myURL)
Apr 22 04:33:43 weatherstationpi rc.local[434]: File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get
Apr 22 04:33:43 weatherstationpi rc.local[434]: return request('get', url, params=params, **kwargs)
Apr 22 04:33:43 weatherstationpi rc.local[434]: File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
Apr 22 04:33:43 weatherstationpi rc.local[434]: return session.request(method=method, url=url, **kwargs)
Apr 22 04:33:43 weatherstationpi rc.local[434]: File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
Apr 22 04:33:43 weatherstationpi rc.local[434]: resp = self.send(prep, **send_kwargs)
Apr 22 04:33:43 weatherstationpi rc.local[434]: File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
Apr 22 04:33:43 weatherstationpi rc.local[434]: r = adapter.send(request, **kwargs)
Apr 22 04:33:43 weatherstationpi rc.local[434]: File "/usr/lib/python3/dist-packages/requests/adapters.py", line 514, in send
Apr 22 04:33:43 weatherstationpi rc.local[434]: raise SSLError(e, request=request)
Apr 22 04:33:43 weatherstationpi rc.local[434]: requests.exceptions.SSLError: HTTPSConnectionPool(host='rtupdate.wunderground.com', port=443): Max retries exceeded with url: /weatherstation/updateweatherstation.php?ID=XXXXXXXXX&PASSWORD=XXXXXX&dateutc=now&winddir=352&windspeedmph=4.91&windgustmph=5.81&humidity=67&tempf=33.21&dewptf=21.33&rainin=0.00&dailyrainin=0.22&baromin=29.84&indoortempf=35.91&indoorhumidity59.00=&solarradiation=15.79&UV=0.50&software=SkyWeather2 (Caused by SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')")))
Apr 22 04:33:43 weatherstationpi rc.local[434]: Execution of job "writeWeatherRecord (trigger: interval[0:05:00], next run at: 2021-04-22 04:33:42 EDT)" skipped: maximum number of running instances reached (1)
Apr 22 04:38:42 weatherstationpi rc.local[434]: Execution of job "writeWeatherRecord (trigger: interval[0:05:00], next run at: 2021-04-22 04:38:42 EDT)" skipped: maximum number of running instances reached (1)
After that this log message appears every time it tries to run writeWeatherRecord
Apr 22 08:58:42 weatherstationpi rc.local[434]: Execution of job "writeWeatherRecord (trigger: interval[0:05:00], next run at: 2021-04-22 08:58:42 EDT)" skipped: maximum number of running instances reached (1)
I had to restart everything to get it going again.
|
|
|
Post by karambit on Feb 11, 2018 11:23:18 GMT -8
Yeah the UV index is way way off. I just put the sensor outside the case and on a partly cloudy day it is showing a UV Index of 349 in both the GroveWeatherPi and simpltest scripts.
GroveWeatherPi script: ----------------- Sunlight Vi/IR/UV Sensor ----------------- Sunlight Visible(Lux): 26752.46 Sunlight IR(Lux): 26754.92 Sunlight UV Index: 349.74
simpletest script: Vis: 65535 IR: 65535 Vis Lux: 26752.4590164 IR Lux: 26754.9180328 UV Index: 349.74
|
|
|
Post by karambit on Feb 10, 2018 12:02:21 GMT -8
I plugged it into one of the I2C connectors on the Pi2Grover and now it seems to be working running the simpletest script as well as the GroveWeatherPi script.
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi/SDL_Pi_SI1145 $ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- -- 60: 60 -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 70: -- -- -- 73 -- -- -- 77
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi/SDL_Pi_SI1145 $ sudo python simpletest.py Press Cntrl + Z to cancel Vis: 0 IR: 0 Vis Lux: 0.0 IR Lux: 0.0 UV Index: 0.0 Vis: 289 IR: 267 Vis Lux: 12.2950819672 IR Lux: 5.73770491803 UV Index: 0.17 Vis: 311 IR: 272 Vis Lux: 21.3114754098 IR Lux: 7.7868852459 UV Index: 0.29
These values are form inside the case I have everything in so that is why they are so low. The UV Index does seem to be off though. For instance I opened the case and it was showing a UV Index of 20+. It is completely overcast today.
-----------------
Sunlight Visible(Lux): 1847.95
Sunlight IR(Lux): 14194.26
Sunlight UV Index: 24.16
-----------------
|
|
|
Post by karambit on Feb 6, 2018 15:00:45 GMT -8
Ok I will try that but the guide on your webpage for the sensor says to connect it where I have it.
|
|
|
Post by karambit on Jan 30, 2018 14:25:03 GMT -8
I have the jumpers hooked up correctly. The simpletest.py script is the one that you guys have on github. It looks like it already uses the main Raspberry Pi bus.
# Default constructor will pick a default I2C bus. # # For the Raspberry Pi this means you should hook up to the only exposed I2C bus # from the main GPIO header and the library will figure out the bus number based # on the Pi's revision.
I don't see anything in the script that is setting the bus.
|
|
|
Post by karambit on Jan 28, 2018 9:21:18 GMT -8
My DS3231 is showing the correct time, however the total rain amount is not resetting after midnight. I am using the latest 2.99 code.
|
|
|
Post by karambit on Jan 28, 2018 9:19:17 GMT -8
My SI1145 Sunlight Sensor is not working. I can't read it with the GroveWeatherPi.py script or the simpletest.py. It is wired up correctly to the Grove connector under the JP4 on the Mux. I see it on Bus 3 after running TCA9545 test script. I do not see it at 0x60 when running i2cdetect.
pi@raspberrypi:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- 73 -- -- -- 77
pi@raspberrypi:~ $ cd SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545/
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545 $ sudo python testSDL_Pi_TCA9545.py
Test SDL_Pi_TCA9545 Version 1.0 - SwitchDoc Labs
Sample uses 0x73
Program Started at:2018-01-28 12:14:03
-----------BUS 0-------------------
tca9545 control register B3-B0 = 0x1
ignore Interrupts if INT3' - INT0' not connected
tca9545 control register Interrupts = 0x0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- 73 -- -- -- 77
-----------------------------------
-----------BUS 1-------------------
tca9545 control register B3-B0 = 0x2
ignore Interrupts if INT3' - INT0' not connected
tca9545 control register Interrupts = 0x0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- 73 -- -- -- --
-----------------------------------
-----------BUS 2-------------------
tca9545 control register B3-B0 = 0x4
ignore Interrupts if INT3' - INT0' not connected
tca9545 control register Interrupts = 0x0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- 73 -- -- -- --
-----------------------------------
-----------BUS 3-------------------
tca9545 control register B3-B0 = 0x8
ignore Interrupts if INT3' - INT0' not connected
tca9545 control register Interrupts = 0x0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- 73 -- -- -- --
-----------------------------------
^CTraceback (most recent call last):
File "testSDL_Pi_TCA9545.py", line 122, in <module>
time.sleep(5.0)
KeyboardInterrupt
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545 $ cd ..
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi $ cd SDL_Pi_SI1145/
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi/SDL_Pi_SI1145 $ sudo python simpletest.py
Traceback (most recent call last):
File "simpletest.py", line 41, in <module>
sensor = SDL_Pi_SI1145.SDL_Pi_SI1145()
File "/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_SI1145/SDL_Pi_SI1145.py", line 165, in __init__
self._reset()
File "/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_SI1145/SDL_Pi_SI1145.py", line 172, in _reset
self._device.write_byte_data(SI1145_ADDR,SI1145_REG_MEASRATE0, 0)
IOError: [Errno 121] Remote I/O error
|
|
|
Post by karambit on Jan 25, 2018 13:40:51 GMT -8
The Rain Amount is still not resetting at Midnight. I have upgraded to the latest 2.99 version on github.
|
|
|
Post by karambit on Jul 27, 2017 5:38:55 GMT -8
Awesome. Thanks.
|
|
|
Post by karambit on Jul 25, 2017 4:15:55 GMT -8
It appears the rainfall amount is still not resetting at midnight unless I missed adding in the change that fixed this. Can you point out exactly which change in the code supposedly fixed this so I can verify?
|
|
|
Post by karambit on Jul 24, 2017 10:29:25 GMT -8
How is the rainfall rate per hour calculated? It doesn't seem quite right to me. After it stops raining it continues reporting the same rate for the next hour before starting to decline back to 0. See my attached image. It stopped raining at 7:44AM but the rate didn't hit 0 until 9:34AM. It should have been back to 0 by 8:44AM unless I am mistaken. If you think this should be a separate thread I can start one. Everything else appears to be working great. Thanks for all of the bug fixes! Attachments:
|
|
|
Post by karambit on Jul 20, 2017 8:43:56 GMT -8
GroveWeatherPi
|
|
|
Post by karambit on Jul 18, 2017 11:53:00 GMT -8
Does the updated bounce times also address the rain bucket showing double the amount of rain it should?
|
|