Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-15 Thread Thomas Keffer
In that case, just use the [StdQC] service . -tk On Sat, Sep 15, 2018 at 8:31 AM Rahul Bedi wrote: > Negative value. > > Thanks. > > - Rahul > > On Sat 15 Sep, 2018, 7:55 PM Thomas Keffer, wrote: > >> What's a "-ve" value? >> >> -tk >> >> On Sat,

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-15 Thread Rahul Bedi
Negative value. Thanks. - Rahul On Sat 15 Sep, 2018, 7:55 PM Thomas Keffer, wrote: > What's a "-ve" value? > > -tk > > On Sat, Sep 15, 2018 at 6:10 AM Rahul Bedi wrote: > >> On the topics of negative numbers, I have also realized that in cases >> where I shutdown weewx running on Pi, unplug

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-15 Thread Thomas Keffer
What's a "-ve" value? -tk On Sat, Sep 15, 2018 at 6:10 AM Rahul Bedi wrote: > On the topics of negative numbers, I have also realized that in cases > where I shutdown weewx running on Pi, unplug the USB cable running to the > WMR200, plug it back and restart the weewx, sometimes I see -ve

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-15 Thread Rahul Bedi
On the topics of negative numbers, I have also realized that in cases where I shutdown weewx running on Pi, unplug the USB cable running to the WMR200, plug it back and restart the weewx, sometimes I see -ve value for rain getting populated in the database which I have to manually remove. Looks

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-15 Thread Thomas Keffer
Implemented in commit ea9fe13 -tk On Sat, Sep 15, 2018 at 5:38 AM Thomas Keffer wrote: > Thanks, Chris > > I worry that this approach doesn't cover the case where the "previous" > record has, say, a timestamp far

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-15 Thread Thomas Keffer
Thanks, Chris I worry that this approach doesn't cover the case where the "previous" record has, say, a timestamp far in the future. This patch would cause all of the remaining records to get thrown out, but the "future" record to be kept. In any case, it's way better than what we have, which

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-14 Thread Chris Manton
I suppose if the archived packets are presented out of order there could be a negative interval... I have not seen this but the wmr200 is full of wonderful surprises. One potential drive-by fix is to drop all packets satisfying this failing condition...here is one untested fix: $ git diff

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-14 Thread Thomas Keffer
Good. Looking through the WMR200 driver code (I didn't write it), it appears that a positive value for 'interval' is not guaranteed. I'll ask the author to take a look at it. -tk On Fri, Sep 14, 2018 at 5:44 AM Rahul Bedi wrote: > Yup found a record with -ve interval, changed that to 5 as

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-14 Thread Rahul Bedi
Yup found a record with -ve interval, changed that to 5 as thats what I am using. And problem fixed !! Thanks a lot. Not sure how this bad data entered into the db. Will be great if there is utility that finds such errors in the db and flags them. - Rahul On Fri, Sep 14, 2018 at 5:48 PM

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-14 Thread Thomas Keffer
I think the thing to do is to figure out how a negative value got in there, fix that, then rebuild the daily summaries. One possibility is that a record in your database has a negative value for 'interval' --- the time length of an archive record. Let's check that. *sqlite3

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-14 Thread Rahul Bedi
Here is what I get: 2018-08-02 00:00:00|2851473.0|86400 2018-08-03 00:00:00|2139447.0|86400 2018-08-04 00:00:00|2867211.0|86400 2018-08-05 00:00:00|3306195.0|86400 2018-08-06 00:00:00|3167394.0|86400 2018-08-07 00:00:00|2924283.0|86400 2018-08-08 00:00:00|2255208.0|86400 2018-08-09

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-14 Thread Thomas Keffer
You're on the right track: there must be an bad value in your database. Did you, by any chance, use a visual sql editor? They often put null strings in the database. In any case, the field 'wsquaresum' and 'sumtime' are used by rms. So, try this: *sqlite3 /var/lib/weewx/weewx.sdb* sqlite>

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-14 Thread Rahul Bedi
I found rms used in the statictics.ico and hilo.ico files in the Seasons directory. removed those segments. Diff as follows: $ diff statistics.14092018.inc statistics.inc 134,140d133 < < $obs.label.wind_rms < $unit.label.wind < #for $archive in

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-13 Thread Rahul Bedi
Thanks Gary. Charges were done about a month ago but have seen no errors till this episode. I will do a diff with the original skin files and post it here. Thanks. - Rahul On Fri 14 Sep, 2018, 7:35 AM gjr80, wrote: > On Friday, 14 September 2018 11:30:42 UTC+10, Rahul Bedi wrote: >> >> As I

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-13 Thread gjr80
On Friday, 14 September 2018 11:30:42 UTC+10, Rahul Bedi wrote: > > As I have made no code or config changes since the day before, I believe > it doing this for the right data. > This sounds to me like you have changed some of the seasons skin files. The error is coming form the use of a .rms

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-13 Thread Rahul Bedi
As I have made no code or config changes since the day before, I believe it doing this for the right data. Let me try tweaking the config and start eliminating some of these fields and see if the error goes away. Thanks for the help. - Rahul On Fri, Sep 14, 2018 at 2:51 AM Thomas Keffer wrote:

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-13 Thread Rahul Bedi
I did drop and rebuild from scratch but the error did not go away. I do suspect that there is some data error but unable to figure out which one. On Fri, Sep 14, 2018 at 2:41 AM gjr80 wrote: > Hi, > > I would suspect some dodgy data in your daily summaries. You said you > rebuilt them, did you

Re: [weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-13 Thread Thomas Keffer
Line 1314 is calculating an rms value. Make sure you're doing this against observation type 'wind'. For example $month.outTemp.rms could give you that error. -tk On Thu, Sep 13, 2018 at 2:11 PM gjr80 wrote: > Hi, > > I would suspect some dodgy data in your daily summaries. You said you >

[weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-13 Thread gjr80
Hi, I would suspect some dodgy data in your daily summaries. You said you rebuilt them, did you drop them using --drop-daily before you rebuilt them, if not try dropping them first then rebuilding. Gary -- You received this message because you are subscribed to the Google Groups

[weewx-user] Cheetahgenerator gives "math domain error" while processing Seasons skin

2018-09-13 Thread Rahul Bedi
Hi, This morning, weewx running Raspberry Pi starting logging the following errors: Sep 13 21:25:17 PrideWeatherStation weewx[1608]: manager: Added record 2018-09-13 21:25:00 IST (1536854100) to database 'weewx.sdb' Sep 13 21:25:17 PrideWeatherStation weewx[1608]: manager: Added record