|
Post by SDL on Nov 14, 2018 9:30:14 GMT -8
|
|
|
Post by triggerfish on Nov 18, 2018 8:36:04 GMT -8
Just not to mess up things... How can I implement this on my GroveWeatherPi? Just wget it from github?
|
|
|
Post by triggerfish on Nov 18, 2018 8:40:51 GMT -8
Never mind... FOund the thread on the new GroveWeatherPi version...
|
|
|
Post by doxidad on Nov 18, 2018 13:08:29 GMT -8
I'm seeing a couple of things on the new version (GroveWeatherPi 034)- this is on a Pi Zero W.
1st thing is the AM2315 is not seen every other time the Groveweather Pi code is run.
The 2nd is this ----------------- AM2315 Temperature/Humidity Sensor ----------------- 'NoneType' object has no attribute '__getitem__' File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/home/pi/SDL_Pi_GroveWeatherPi/GroveWeatherPi.py", line 1376, in sampleAndDisplay outsideTemperature, outsideHumidity, crc_check = am2315.read_humidity_temperature_crc() File "./SDL_Pi_AM2315/AM2315.py", line 91, in read_humidity_temperature_crc self._read_data() File "./SDL_Pi_AM2315/AM2315.py", line 63, in _read_data self.humidity = ((tmp[2] << 8) | tmp[3]) / 10.0
Searching I found that it happened 446 time in 1654 reads
Still getting (thread?) errors on the INA3221 reads (not all of them).
|
|
|
Post by SDL on Nov 21, 2018 8:53:44 GMT -8
Doxidad,
Great information. Issue #1: Not detecting. I'll plug it into a Pi Zero and see if I can reproduce that. Could be a processor speed issue. Easy fix if so.
Issue #2: I think you are missing part of the error. Would you post the entire error again?
BP
|
|
|
Post by doxidad on Nov 21, 2018 9:44:22 GMT -8
Hmmm... everthing is included. Here are 2 that look exactly like the above - other than they appear at different spots in the log. All of them seem to happen in the scheduler call to sampleAndDisplay.
Let me know if there is something that I am missing that should be included.
I've programmed in about 10+ languages over the past 40 years and I have been resisting learning python. I think my language queue is full 8-}.
Have a great Thanksgiving Day!
----------------- AM2315 Temperature/Humidity Sensor ----------------- 'NoneType' object has no attribute '__getitem__' File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/home/pi/SDL_Pi_GroveWeatherPi/GroveWeatherPi.py", line 1376, in sampleAndDisplay outsideTemperature, outsideHumidity, crc_check = am2315.read_humidity_temperature_crc() File "./SDL_Pi_AM2315/AM2315.py", line 91, in read_humidity_temperature_crc self._read_data() File "./SDL_Pi_AM2315/AM2315.py", line 63, in _read_data self.humidity = ((tmp[2] << 8) | tmp[3]) / 10.0
Tick! The time is: 2018-11-21 06:25:58.324848
----------------- AM2315 Temperature/Humidity Sensor ----------------- 'NoneType' object has no attribute '__getitem__' File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/home/pi/SDL_Pi_GroveWeatherPi/GroveWeatherPi.py", line 1376, in sampleAndDisplay outsideTemperature, outsideHumidity, crc_check = am2315.read_humidity_temperature_crc() File "./SDL_Pi_AM2315/AM2315.py", line 91, in read_humidity_temperature_crc self._read_data() File "./SDL_Pi_AM2315/AM2315.py", line 63, in _read_data self.humidity = ((tmp[2] << 8) | tmp[3]) / 10.0
----------------- Local WeatherRack Weather Sensors Sampling ----------------- Rain Total= 0.74 in
|
|
|
Post by SDL on Nov 22, 2018 8:07:07 GMT -8
Sorry,
You are correct. I didn't see the top line.
Looking at it on Friday.
BP
|
|
|
Post by SDL on Nov 22, 2018 11:44:00 GMT -8
Question: Once it bombs as above, does it stay bombed until you start up the program again?
BP
|
|
|
Post by SDL on Nov 22, 2018 11:44:03 GMT -8
Question: Once it bombs as above, does it stay bombed until you start up the program again?
BP
|
|
|
Post by doxidad on Nov 23, 2018 7:26:36 GMT -8
The normal inline reads work OK but the ones that the scheduler run all fail.
ALSO - values that are returned are in the wrong order
The SDL_Pi_AM2315 returns the values as Humidity, Temperature CRC. The GroveWeatherPi code expects them to be in the order of Temperature, Humidity, CRC.
Easy fix.
|
|
|
Post by SDL on Nov 24, 2018 16:49:38 GMT -8
Doxidad,
Yep, we found the same problem. We are releasing 3.10 on late Sunday or Monday that fixes this problem, fixes the occasional bad I2C reads and adds in support for Blynk!
BP
|
|
|
Post by charliee on Oct 11, 2020 7:08:48 GMT -8
The current SDL AM2315 driver with the comment "modified for GroveWeatherPi to return CRC information" dated 2019 is not python3 ready, even though this is indicated in the Github version 1.3 comments.
I had to change two "<>" compares to "!=", and change most of the print statements. Easy changes and it works with the test program for both python2 and python3. For python3 you have to add a powerpin designation. I used a 1 and it worked.
Be glad to share my changes if you want, Just need an easy way for a novice in this environment to send you the file.
I'm slowly migrating my weather station code, based upon yours, to run under python3. Great learning experience. Enjoy your products.
|
|
|
Post by SDL on Oct 14, 2020 7:27:32 GMT -8
Charliee,
That is interesting. Please just post the changes here (the code) as an attachment and I'll update the GitHub.
BP
|
|
|
Post by charliee on Mar 6, 2021 8:42:52 GMT -8
Sorry about being late responding, life got in the way. Before I send you my changes to ASLAM2325.py for python3 compliance, I want to make sure that I have your latest version of the driver. Can you give me the link to your latest version on GITHUB? Many thanks.
|
|
|
Post by SDL on Mar 7, 2021 13:25:02 GMT -8
|
|