Hi
installed sqlite3 but when run I get nothing printed. the same query with 
rain I also get nothing printed, it just returns to sqlite3 prompt.
Nothing on console, user logs etc

I am going to try the same query to see if I can get the data using Sequel 
Pro. I use this app to check my db usually.
I mention rainrate because that is in the Groups in weewx.conf...I have not 
edited that part of the file, in any of my versions of weewx.conf...just 
looking for any possible anomaly.
Nev

On Tuesday, January 19, 2021 at 10:05:43 AM UTC+10 tke...@gmail.com wrote:

> Your weewx.conf seems to be configured correctly. And, it's definitely 
> "rainRate" (not "rainrate"). Let's take a look at the database, using the 
> tools sqlite3. 
>
> You may have to install it:
>
> *sudo apt install sqlite3*
>
> *sqlite3 /home/weewx/archive/weewx.sdb*
> sqlite> *select 
> dateTime,datetime(dateTime,'unixepoch','localtime'),rain,rainRate from 
> archive where rainRate>0 order by dateTime desc limit 50;*
> sqlite> *.quit*
>
> This will print the last 50 non-zero rainRates. 
>
> -tk
>
>
> On Mon, Jan 18, 2021 at 3:39 PM Neville Davis <nevilled...@gmail.com> 
> wrote:
>
>> Hi I have the same problem...
>> We have long periods without rain then it buckets down so I have only 
>> recently started to notice it is always zero.
>> I upgraded to 4.3 this month and had a reading of 2mm per hour after a 
>> rain period...and thought the upgrade had fixed it. Then last evening a 
>> large downpour approx 30mm in about 1 hour...rainRate = 0.0 mm per hour.
>> I have checked [StdWXCalculate] and rainRate was prefer hardware ( mine 
>> is a home brewed system, raspberry Pi with i2C sensors, without rainRate) I 
>> changed it to software calculation. Still zero.
>> I then noticed this last post, but my groups have it at mm per hour... I 
>> have noticed that the group has rainrate not rainRate, I checked some old 
>> weewx.confs back to may last year they are also rainrate??
>> I started weewx directly and a copy of the consul log is attached....at 
>> the beginning I also looked at old weewx.confs to see if I had made any 
>> stuff ups...so this info is also in the console log.
>> I also looked back into mySql db and this zero rainRate has been there 
>> for sometime..except for this one time 2.0mm per hour. 
>> If I set debug in weewx.conf what extra data will it show??
>> Any suggestions...??
>>
>>             [[[[Groups]]]]
>>                 
>>                 group_altitude = meter    # Options are 'foot' or 'meter'
>>                 group_degree_day = degree_C_day    # Options are 
>> 'degree_F_day' or 'degree_C_day'
>>                 group_distance = km    # Options are 'mile' or 'km'
>>                 group_pressure = hPa    # Options are 'inHg', 'mmHg', 
>> 'mbar', or 'hPa'
>>                 group_rain = mm    # Options are 'inch', 'cm', or 'mm'
>>                 group_rainrate = mm_per_hour    # Options are 
>> 'inch_per_hour', 'cm_per_hour', or 'mm_per_hour'
>>                 group_speed = km_per_hour    # Options are 
>> 'mile_per_hour', 'km_per_hour', 'knot', or 'meter_per_second'
>>                 group_speed2 = km_per_hour2    # Options are 
>> 'mile_per_hour2', 'km_per_hour2', 'knot2', or 'meter_per_second2'
>>                 group_temperature = degree_C    # Options are 'degree_F' 
>> or 'degree_C'
>>                 group_direction = degree_compass
>>                 group_moisture = centibar
>>                 group_percent = percent
>>                 group_radiation = watt_per_meter_squared
>>                 group_uv = uv_index
>>                 group_volt = volt
>>                 group_rpm = rpm
>>
>> [StdWXCalculate]
>>     
>>     [[Calculations]]
>>         # How to calculate derived quantities.  Possible values are:
>>         #  hardware        - use the value provided by hardware
>>         #  software        - use the value calculated by weewx
>>         #  prefer_hardware - use value provide by hardware if available,
>>         #                      otherwise use value calculated by weewx
>>         
>>         pressure = prefer_hardware
>>         altimeter = prefer_hardware
>>         appTemp = prefer_hardware
>>         barometer = prefer_hardware
>>         beaufort = prefer_hardware
>>         cloudbase = prefer_hardware
>>         dewpoint = prefer_hardware
>>         ET = prefer_hardware
>>         heatindex = prefer_hardware
>>         humidex = prefer_hardware
>>         inDewpoint = prefer_hardware
>>         maxSolarRad = prefer_hardware
>>         rainRate = software
>>         windchill = prefer_hardware
>>         windrun = prefer_hardware
>>
>> This was the first recording of a rainRate for a long time....but only 
>> once right after upgrade to 4.3.
>> [image: Screen Shot 2021-01-19 at 9.06.21 am.png]
>>
>> On Monday, January 18, 2021 at 8:10:01 AM UTC+10 bana...@gmail.com wrote:
>>
>>> It may be of interest to you that I had problems with the rain rate 
>>> being reported as 0.00 all the time.
>>> I eventually tracked this down to the weewx.conf file having cm/hr 
>>> rather than mm/hr as the measurement required. This was in the Units Group 
>>> section of Standard Report and Defaults lower down.
>>>
>>> On Saturday, 26 December 2020 at 02:02:22 UTC+13 jbel...@gmail.com 
>>> wrote:
>>>
>>>> I do appreciate the guess, but I know they’re all using the stone conf 
>>>> file since there’s only one! :-)
>>>>
>>>> Sent from my iPhone
>>>>
>>>> On Dec 24, 2020, at 6:56 PM, Tom Keffer <tke...@gmail.com> wrote:
>>>>
>>>> 
>>>>
>>>> Hard to say without seeing the log, but if I had to hazard a guess, I'd 
>>>> say you're not consistently using the same copy of weewx.conf for all 
>>>> runs. 
>>>> One of the copies does not have rainRate in [StdWXCalculate].
>>>>
>>>> But, that's just a guess. 
>>>>
>>>> On Thu, Dec 24, 2020 at 1:58 PM James Bellanca <jbel...@gmail.com> 
>>>> wrote:
>>>>
>>>>> Appreciate the help so far. I had to wait for it to start raining 
>>>>> again to do anything haha. And ok, so this is very strange behavior. 
>>>>>
>>>>> I stopped the weewx service, and ran it directly (log of the terminal 
>>>>> window is attached). rainRate calculates fine, AND updates the database 
>>>>> fine, just like it should. I stop the direct run, and run it as a service 
>>>>> again, and it's working fine now! HOWEVER – Those results are weird, so I 
>>>>> did it all again from scratch - rebooted, ran at startup as a service (no 
>>>>> rain rate in the database again, just like before!), stopped it, ran it 
>>>>> directly (rain rate works fine), stopped it, started the service (and now 
>>>>> it works again?!). So it calculates rain rate, but won't update the 
>>>>> database with it, UNTIL I run it directly first, then after that, it 
>>>>> works 
>>>>> even not directly... until I reboot, and it's broken again.
>>>>>
>>>>> Any idea what would cause that bizarre behavior???
>>>>>
>>>>> Attaching three files - 
>>>>> (1) weewx.log from startup (directly) through some archive cycles 
>>>>> where it was actually raining (which you'll see near the end).
>>>>> https://www.dropbox.com/s/iqmi3e61y1zn0yt/weewx-1224-1500.log?dl=1
>>>>> (2) terminal.log from running weewx directly. I can see in this that 
>>>>> it's definitely calculating rainRate. It's just not updating the field in 
>>>>> the database with the value it's calculating.
>>>>> https://www.dropbox.com/s/xtbilj0s1ar9fw7/terminal-1224-1500.log?dl=1
>>>>> (3) full weewx.log from Dec 9th (when I confided this new Pi 4) with 
>>>>> weewx startup (as a service) through some archive cycles where it was 
>>>>> raining, including the direct starts today where it worked.
>>>>> https://www.dropbox.com/s/6veouk8rets8lsg/weewx-420-full.log?dl=1
>>>>>
>>>>>
>>>>> On Thursday, December 24, 2020 at 1:00:04 PM UTC-5 tke...@gmail.com 
>>>>> wrote:
>>>>>
>>>>>> The log does not include when weewx started up, so we can't tell 
>>>>>> which weewx.conf it is using, what the sensor map was, nor what services 
>>>>>> are being loaded. Otherwise, it looks normal. Do a restart, then post 
>>>>>> the 
>>>>>> log through the first archive cycle.
>>>>>>
>>>>>> If rainRate is being calculated (and your instrumented version of 
>>>>>> wxxtypes.py seems to indicate that it is), then, if it's in the schema, 
>>>>>> it 
>>>>>> should be incorporated into the database.
>>>>>>
>>>>>> If you run weewxd directly from the command line, it will print out 
>>>>>> all LOOP packets and archive records. What do they show for rainRate?
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Dec 24, 2020 at 7:56 AM James Bellanca <jbel...@gmail.com> 
>>>>>> wrote:
>>>>>>
>>>>>>> Here's a little more info. I added from log.debug lines in the 
>>>>>>> wxxtypes.py rainRater class.
>>>>>>>
>>>>>>> In get_scalar that calculated rainRate, right before "return rr", I 
>>>>>>> added: log.debug("rr=%s", rr)
>>>>>>> In _setup in the if not... section right before the except error 
>>>>>>> trap, I added: log.debug("Log row %s %s %s.", time_ts, unit_system, 
>>>>>>> rain)
>>>>>>>
>>>>>>> Now in the logs, I'm seeing a lot of rows like:
>>>>>>>
>>>>>>> Dec 24 10:36:56 raspberrypi weewx[18054] DEBUG weewx.wxxtypes: 
>>>>>>> rr=(0.0010683464566929135, 'inch_per_hour', 'group_rainrate')
>>>>>>>
>>>>>>> Dec 24 10:37:01 raspberrypi weewx[18054] DEBUG weewx.wxxtypes: 
>>>>>>> rr=(0.0015807874015748033, 'inch_per_hour', 'group_rainrate')
>>>>>>> ...
>>>>>>>
>>>>>>> Dec 24 10:42:04 raspberrypi weewx[18054] DEBUG weewx.wxxtypes: 
>>>>>>> rr=(0.0017618897637795277, 'inch_per_hour', 'group_rainrate')
>>>>>>> I've been watching the log for 10 mins now and I'm not seeing any 
>>>>>>> "Log row..." debug messages. 
>>>>>>> But, this means is calculating rainRate, but it's not updating the 
>>>>>>> database with what it's calculating for some reason.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thursday, December 24, 2020 at 9:39:13 AM UTC-5 James Bellanca 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Both running on Python 3. 
>>>>>>>>
>>>>>>>> $ ps ax | grep python
>>>>>>>>   831 ?        Sl   468:45 *python3* /usr/share/weewx/weewxd 
>>>>>>>> --daemon --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf
>>>>>>>>
>>>>>>>> Attaching 3 files - the weewx.conf files from both 4.1.1 and 4.2.2, 
>>>>>>>> and the logs from 4.2.0 from 12/21 through today. It's been raining 
>>>>>>>> all 
>>>>>>>> morning today (12/24), and same thing - 4.1.1 calcs the rainRate, but 
>>>>>>>> 4.2.0 
>>>>>>>> doesn't. (weewx.conf files have been renamed to include the version 
>>>>>>>> number.) Sensor maps between them are both the same - and it's def 
>>>>>>>> getting 
>>>>>>>> the rain value itself correct and inserting it to the database fine. I 
>>>>>>>> don't see anything suspicious in the log, either. I appreciate the 
>>>>>>>> help!
>>>>>>>>
>>>>>>>> https://www.dropbox.com/s/tfvngl92flq9a4b/weewx-4.1.1.conf?dl=1
>>>>>>>> https://www.dropbox.com/s/33uakjaj8oix3yk/weewx-4.2.0.conf?dl=1
>>>>>>>> https://www.dropbox.com/s/g9egyues81u87qj/weewx-4.2.0.log?dl=1
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thursday, December 24, 2020 at 8:15:44 AM UTC-5 tke...@gmail.com 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> In addition to Peter's questions, what do you have for a sensor 
>>>>>>>>> map?
>>>>>>>>>
>>>>>>>>> On Wed, Dec 23, 2020 at 9:46 PM p q <peterq...@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Any messages in the log? Did you switch python versions?
>>>>>>>>>>
>>>>>>>>>> On Wed, Dec 23, 2020, 9:21 PM James Bellanca <jbel...@gmail.com> 
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Btw, I've even checked/compared the rain rate data in the SDB 
>>>>>>>>>>> files, and all other data is populated the same between the two 
>>>>>>>>>>> instances, 
>>>>>>>>>>> except the blank rain rate field. Look at the data in the first 10 
>>>>>>>>>>> rows of 
>>>>>>>>>>> each file for 12/21. (Ignore the fact that Excel presents some of 
>>>>>>>>>>> the small 
>>>>>>>>>>> rain numbers exponentially - they're right in the database, it's 
>>>>>>>>>>> just an 
>>>>>>>>>>> Excel thing.) You'll see that it's adding up the rain values 
>>>>>>>>>>> perfectly - 
>>>>>>>>>>> just off very slightly due to timing. But, rainRate's = 0 in the 
>>>>>>>>>>> 4.2.0 
>>>>>>>>>>> file, so it's not calculating. Any thoughts as to why?
>>>>>>>>>>>
>>>>>>>>>>> Google wouldn't let me upload the files here, so here they are:
>>>>>>>>>>>
>>>>>>>>>>> https://www.dropbox.com/s/9a8wicnjs4y8r0j/rainRate_12-21_4.1.1.slk?dl=0
>>>>>>>>>>>
>>>>>>>>>>> https://www.dropbox.com/s/qcyng5ckxoiqzmw/rainRate_12-21_4.2.0.slk?dl=0
>>>>>>>>>>>
>>>>>>>>>>> -- 
>>>>>>>>>>> You received this message because you are subscribed to the 
>>>>>>>>>>> Google Groups "weewx-user" group.
>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from 
>>>>>>>>>>> it, send an email to weewx-user+...@googlegroups.com.
>>>>>>>>>>> To view this discussion on the web visit 
>>>>>>>>>>> https://groups.google.com/d/msgid/weewx-user/267f1df2-33ce-4609-92c9-bf01ce173ed4n%40googlegroups.com
>>>>>>>>>>>  
>>>>>>>>>>> <https://groups.google.com/d/msgid/weewx-user/267f1df2-33ce-4609-92c9-bf01ce173ed4n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>>>> .
>>>>>>>>>>>
>>>>>>>>>> -- 
>>>>>>>>>> You received this message because you are subscribed to the 
>>>>>>>>>> Google Groups "weewx-user" group.
>>>>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>>>>> send an email to weewx-user+...@googlegroups.com.
>>>>>>>>>>
>>>>>>>>> To view this discussion on the web visit 
>>>>>>>>>> https://groups.google.com/d/msgid/weewx-user/CAA1SM20Yhv0N%3DctzQ5xkQU%3DOwbQ%2B7P6%3Dyn35qyHiuP3N_HGV9w%40mail.gmail.com
>>>>>>>>>>  
>>>>>>>>>> <https://groups.google.com/d/msgid/weewx-user/CAA1SM20Yhv0N%3DctzQ5xkQU%3DOwbQ%2B7P6%3Dyn35qyHiuP3N_HGV9w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>>>>> .
>>>>>>>>>>
>>>>>>>>> -- 
>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>> Groups "weewx-user" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>> send an email to weewx-user+...@googlegroups.com.
>>>>>>>
>>>>>> To view this discussion on the web visit 
>>>>>>> https://groups.google.com/d/msgid/weewx-user/7e77eaad-44a1-4e37-be67-fea6e9051336n%40googlegroups.com
>>>>>>>  
>>>>>>> <https://groups.google.com/d/msgid/weewx-user/7e77eaad-44a1-4e37-be67-fea6e9051336n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>>
>>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "weewx-user" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to weewx-user+...@googlegroups.com.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/weewx-user/b0db090a-8d25-460b-9c99-fc76d29d8f74n%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/weewx-user/b0db090a-8d25-460b-9c99-fc76d29d8f74n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> -- 
>>>>
>>>> You received this message because you are subscribed to a topic in the 
>>>> Google Groups "weewx-user" group.
>>>> To unsubscribe from this topic, visit 
>>>> https://groups.google.com/d/topic/weewx-user/zR14R_FTd4I/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to 
>>>> weewx-user+...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/weewx-user/CAPq0zEAbTZ2QLxifFj0Tuwpg7GqeC8TJaE7etd7cv-qEfTu2Kw%40mail.gmail.com
>>>>  
>>>> <https://groups.google.com/d/msgid/weewx-user/CAPq0zEAbTZ2QLxifFj0Tuwpg7GqeC8TJaE7etd7cv-qEfTu2Kw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to weewx-user+...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/b52d225f-70a3-4583-8a59-9ed2ff45ba60n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/b52d225f-70a3-4583-8a59-9ed2ff45ba60n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/51476eaf-d41d-4592-a3e5-fc1fa224c539n%40googlegroups.com.

Reply via email to