|
Post by robertlb56 on Jul 10, 2017 5:45:46 GMT -8
1) I'm having the same problem with 24 hour rain. Database and log both show over 1" of rain last night but Weather Underground always shows 0. However I am still using version 2.91 of the software.
2) My graphs also quit updating.I can see the software running the update for each graph,but the file in /static remains dated 7/6/2017 @8:50. Is there a log in can look at to see where the graph making is failing at?
3) Also,the sunlight sensor shows present but outputs 0 for all parameters. If I keep rebooting it, finally it will start reading correct, but then the AM2315 will show as not present.
4) Finally,if I connect the soldered on wire from the USB control to the Watchdog Timer reset pin,the system will not power up (lipo battery is over 4v) until I disconnect the wire from the reset pin. Once started, I can reconnect the wire and it stays running. This leads me to believe that the Watchdog reset pin stays grounded when the Watchdog board is not receiving power from the Pi Zero.
I consider myself an advanced newbie. I bought the GroveWeatherPi and Solar bundles and wired everything up according to the tutorial and Instructable. Any ideas on what I need to check?
|
|
|
Post by SDL on Jul 10, 2017 7:48:42 GMT -8
We moved it over, and I have broken up your questions into Numbers! We will start answering shortly.
BP
|
|
|
Post by robertlb56 on Jul 10, 2017 14:21:40 GMT -8
Thanks! I was also getting a lot of 0 readings from the AM2315, but patching the main file in 2 places with Kevin's work around code works like a charm as long as it recognizes it as present on bootup.
|
|
texag
New Member
Posts: 21
|
Post by texag on Jul 10, 2017 16:12:11 GMT -8
Robert, I tweaked the GroveWeatherPi.py *a lot*. So, I'm more than a little hesitant about posting a reply as my changes might make your situation worse. So if you act on anything I have in my reply, make sure you backup your original code. Also, while my day job is software development, I'm still cutting my teeth on Python. I had problems with my rain processing as well. However, I don't remember the exact details. Here are my changes (see the attached file). - I changed the number of samples in the rain array from 20 to 12 ( I sample the rain data once every 5 minutes. 5x12 gives me the 60 minutes of rain data I need for WeatherUnderground).
- I added a scheduled function (job) that clears the totalRain value after midnight.
- I added the global statement to UpdateRain(). According to the Python 2.7 documentation (docs.python.org/2/faq/programming.html#what-are-the-rules-for-local-and-global-variables-in-python) modifications to global variables in a function require they be declared "global" otherwise those modifications are considered local. My understanding is that without the global specifier the changes to lastRainReading and rain60Minutes won't change the global values. (disclaimer: I'm still learning Python)
I also removed the scheduled (job) call to UpdateRain() and moved that call to within the SampleWeather() function. I don't think this affected anything, just a code re-org on my part. <*Edit *> After taking a second look, you should probably not make the change to the UpdateRain() scheduled job and the move of that call to SampleWeather(). The way I changed and use GroveWeatherPi.py it is safe. But, it may not be safe in your case (especially if you use RasPiConnect). That said, the "global" declaration change to UpdateRain() noted above is still valid.<*End Edit*> Anyway, These changes fixed *my* rain problems. Regards, Kevin
|
|
texag
New Member
Posts: 21
|
Post by texag on Jul 10, 2017 17:20:57 GMT -8
There are three places where outsideTemperature, outsideHumidity, crc_check = am2315.sense() is called. Try adding the work around code to the AM2315 detection logic around line #497. See my attachment. Kevin
|
|
|
Post by SDL on Jul 11, 2017 4:03:19 GMT -8
You might want to modify the detect code to do multiple tries too before declaring it not present.
We will be looking at the Rain problem on Thursday, but I would guess Kevin has found it. We will update our code.
BP
|
|
|
Post by robertlb56 on Jul 14, 2017 1:50:41 GMT -8
Kevin,
Thanks for the help and suggestions. Unfortunately I fubared my code to the point where the weather script will not even start anymore (NOT with your suggestions btw). My wind direction had stopped reading, and after retracing my installation I noticed in the readme on SDL's GitHub (where it state some installations may require these ...), I had not run the setup.py file in Adafruit_Python_GPIO. Being tired/not paying attention/old/and definitely not a coder, I ran setup.py from the Adafruit_Python_GPIO folder under the SDL_Pi_GroveWeatherPi directory. OOPS, script now starts then aborts. Double OOPS, I learned python scripts don't have an uninstaller! I need to stop messing with stuff when I am tired, but I had just put my station up last week and we were getting the first rain here north of Houston since then to test it out. Oh well, I always learn best by mistakes LOL. Looking at my previous posts, I need to stop posting when I am tired from my phone too. Autocorrect (what a joke) auto-altered some words. Thinking back, since my watchdog board is not functioning correct, the Pi Zero had to be power reset a few times do to battery running out in the early morning hours, so I may be fighting a corrupted sd card. I'm going to start over from scratch this weekend redoing the software and test the watchdog board to try and figure out what is going on with it.
|
|
|
Post by mikethechap on Jul 22, 2017 2:21:38 GMT -8
I'm having the same difficulties with the code as others have mentioned.
Thanks for your work on this, Kevin.
I was just wondering if you were posting this code to GitHub or some other code repository? It would be very helpful to see and to copy/paste the code, rather than transcribing it from an image. I tried the suggested changes in the code and must have missed something because Weather Underground sent me and email a couple hours after I made them saying that my station was offline. Fortunately, I had backed out up (a too rare event!). Anyway, just checking to see if you were keeping your code on GitHub, Bitbucket or some other place? That way I could make the changes now pending update by SDL.
|
|