Re: [weewx-user] day is out of range for month

2019-09-19 Thread mph
 

Hi all,

the primary requirement is: „Do not generate errors on month_delta 
mathematics“

The implementation and thus resulting date is not so important, I think.

So if we will implement any error-free logic, then everything will be ok.

 

In my opinion, if the user has date say Mar 10th, or 03/10 and wants to 
subtract one month, it just wants to do MM=03-1 -> 02/10. If the formula 
generates invalid date (03/31 -> 02/31) then we should offer a valid date, 
e.g. 02/28. Nothing more special.
For general use the implementation of any existing logic (bash) should be 
acceptable.

Thank you

Pavel


Dne čtvrtek 19. září 2019 15:00:20 UTC+2 Thomas Keffer napsal(a):
>
> On Wed, Sep 18, 2019 at 11:37 PM gjr80 > 
> wrote:
>
>> That aside, whether you call it a bug or not I don't think we should have 
>> a tag that when you give it an allowed value/parameter it aborts the 
>> template. 
>>
>
> We don't. The tag that caused the error was user-supplied.
>
> From Graham's experiments, it looks like sqlite and bash simply subtract 
> four weeks. The span tag can already do that, so if that's what the user 
> wants, s/he can just specify it.
>
> As for Python, it doesn't even offer month arithmetic (at least, through 
> class datetime.timedelta), probably for the reasons we have discovered. 
> I'm thinking we should do the same.
>
> -tk
>  
>

-- 
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/36ad9d07-b295-4733-b0b2-44c9437133cd%40googlegroups.com.


[weewx-user] Re: te923 driver rain calculation is missing data

2019-08-19 Thread mph
I am sorry, I don't have acces to my weewx database now.
I will check and post the database data later.

The almanac is the set of historic records stored in the weather station 
internal memory.
It can be (and actualy was) obtained by calling wee_device --history
The almanac records are very similar to - if not the same as - loop records 
obtained via USB connection by weewx.


mph

Dne úterý 20. srpna 2019 7:46:20 UTC+2 Andrew Milner napsal(a):
>
> what are the database values for rain?
>
> not sure what the almanac is - or do you mean database?  does your 
> database store rain, ticks or both?
>
>
>
> On Tuesday, 20 August 2019 08:02:07 UTC+3, mph wrote:
>>
>> Ok,
>>
>> I've decoded all the almanac data and there is an excerpt:
>>
>> 01:19:00, 265   ticks
>> 01:49:00, 267 = 2
>> 02:19:00, 268 = 1
>> 02:49:00, 271 = 2
>> 04:49:00, 272 = 1
>> 05:49:00, 273 = 1
>> 07:49:00, 274 = 1
>> 08:19:00, 275 = 1
>> 10:49:00, 276 = 1
>> 19:19:00, 279 = 3
>>
>> As you may see, my almanac has 30 min interval, all times are local time.
>> Between 01:19 and 03:00 local time there are 5 ticks recorded, but weewx 
>> shows just 4 ticks. This is one missing tick.
>>
>> The fact is, that at 02:17 local time my RPi is backing up the weewx 
>> database to local file server. It took less than one minute and I am doing 
>> it "safe way" - weewx stop/DB copy/weewx start.
>> But if the weewx/te923 driver is losing tick in that period, then theres 
>> something wrong - current station data always show actual tick count and it 
>> is correct.
>> Seems there may be a problem with "tick-delta" calculation.
>>
>> Maybe upon service restart the weewx/te923 driver should read the latest 
>> recorded tick count and then start to compute the delta ticks from current 
>> loop record. 
>>
>>
>> mph
>>
>> Dne pondělí 19. srpna 2019 22:36:46 UTC+2 mph napsal(a):
>>>
>>> [image: dayrain.png]
>>> Hello,
>>>
>>> today it was a bit rainy here and my weather station Garni 857 (Hideki 
>>> clone) is showing the 24h rain volume as 9.8 mm (14 bucket tips of 0.7 mm 
>>> each).
>>> But weewx shows just 7.9 mm of rain (12 bucket tips with weewx/te923 
>>> driver bucket volume correction 0.7 -> ~0.65 mm).
>>>
>>> Seems that 2 of the bucket tips are lost by weewx/te923 driver.
>>>
>>> The today weewx rain history is visible on the attached image.
>>> Please, see attached txt file with almanac read from the station using 
>>> wee_device --history.
>>> Only the changes of the "rain" value are included.
>>> At the end of the file is copy of the result of wee_device --current 
>>> call.
>>>
>>> The "rain" field changed from 265 to 279 tips in last 24 hours.
>>> But weewx image shows just 12 tips.
>>>
>>> My weather system is backed-up and there's no drop or loss in the 
>>> weather data.
>>>
>>> Any suggestions?
>>>
>>> Thank you
>>> Pavel
>>>
>>
>>

-- 
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/6999b9c8-8d61-48c7-b1c8-024cb5e26c2b%40googlegroups.com.


[weewx-user] te923 driver rain calculation is missing data

2019-08-19 Thread mph


[image: dayrain.png]
Hello,

today it was a bit rainy here and my weather station Garni 857 (Hideki 
clone) is showing the 24h rain volume as 9.8 mm (14 bucket tips of 0.7 mm 
each).
But weewx shows just 7.9 mm of rain (12 bucket tips with weewx/te923 driver 
bucket volume correction 0.7 -> ~0.65 mm).

Seems that 2 of the bucket tips are lost by weewx/te923 driver.

The today weewx rain history is visible on the attached image.
Please, see attached txt file with almanac read from the station using 
wee_device --history.
Only the changes of the "rain" value are included.
At the end of the file is copy of the result of wee_device --current call.

The "rain" field changed from 265 to 279 tips in last 24 hours.
But weewx image shows just 12 tips.

My weather system is backed-up and there's no drop or loss in the weather 
data.

Any suggestions?

Thank you
Pavel

-- 
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/311a1c57-c654-471d-9217-2a8f13f6ba74%40googlegroups.com.
dateTime: 1566161340
forecast: 6
 h_1: 55
   h_1_state: ok
 h_2: 61
   h_2_state: ok
 h_3: 58
   h_3_state: ok
 h_4: 39
   h_4_state: ok
 h_5: 58
   h_5_state: ok
h_in: 54
  h_in_state: ok
rain: 265
  rain_state: ok

 dateTime: 1566172140
forecast: 6
 h_1: 74
   h_1_state: ok
 h_2: 61
   h_2_state: ok
 h_3: 58
   h_3_state: ok
 h_4: 48
   h_4_state: ok
 h_5: 58
   h_5_state: ok
h_in: 52
  h_in_state: ok
rain: 267
  rain_state: ok

dateTime: 1566173940
forecast: 6
 h_1: 79
   h_1_state: ok
 h_2: 61
   h_2_state: ok
 h_3: 58
   h_3_state: ok
 h_4: 53
   h_4_state: ok
 h_5: 58
   h_5_state: ok
h_in: 53
  h_in_state: ok
rain: 268
  rain_state: ok

dateTime: 1566175740
forecast: 6
 h_1: 80
   h_1_state: ok
 h_2: 62
   h_2_state: ok
 h_3: 59
   h_3_state: ok
 h_4: 53
   h_4_state: ok
 h_5: 58
   h_5_state: ok
h_in: 53
  h_in_state: ok
rain: 271
  rain_state: ok

dateTime: 1566182940
forecast: 6
 h_1: 82
   h_1_state: ok
 h_2: 64
   h_2_state: ok
 h_3: 60
   h_3_state: ok
 h_4: 56
   h_4_state: ok
 h_5: 59
   h_5_state: ok
h_in: 54
  h_in_state: ok
rain: 272
  rain_state: ok

dateTime: 1566186540
forecast: 6
 h_1: 85
   h_1_state: ok
 h_2: 63
   h_2_state: ok
 h_3: 60
   h_3_state: ok
 h_4: 58
   h_4_state: ok
 h_5: 59
   h_5_state: ok
h_in: 55
  h_in_state: ok
rain: 273
  rain_state: ok

dateTime: 1566193740
forecast: 5
 h_1: 85
   h_1_state: ok
 h_2: 64
   h_2_state: ok
 h_3: 61
   h_3_state: ok
 h_4: 61
   h_4_state: ok
 h_5: 61
   h_5_state: ok
h_in: 56
  h_in_state: ok
rain: 274
  rain_state: ok

dateTime: 1566195540
forecast: 5
 h_1: 85
   h_1_state: ok
 h_2: 64
   h_2_state: ok
 h_3: 61
   h_3_state: ok
 h_4: 62
   h_4_state: ok
 h_5: 61
   h_5_state: ok
h_in: 56
  h_in_state: ok
rain: 275
  rain_state: ok

dateTime: 1566204540
forecast: 5
 h_1: 83
   h_1_state: ok
 h_2: 64
   h_2_state: ok
 h_3: 62
   h_3_state: ok
 h_4: 66
   h_4_state: ok
 h_5: 61
   h_5_state: ok
h_in: 57
  h_in_state: ok
rain: 276
  rain_state: ok

dateTime: 1566235140
forecast: 5
 h_1: 76
   h_1_state: ok
 h_2: 66
   h_2_state: ok
 h_3: 60
   h_3_state: ok
 h_4: 49
   h_4_state: ok
 h_5: 60
   h_5_state: ok
h_in: 58
  h_in_state: ok
rain: 279
  rain_state: ok

sudo wee_device --current
Using configuration file /etc/weewx/weewx.conf
Using TE923 driver version 0.24 (weewx.drivers.te923)
Querying the station for current weather data...
dateTime: 1566245057
forecast: 6
 h_1: 84
   h_1_state: ok
 h_2: 65
   h_2_state: ok
 h_3: 60
   h_3_state: ok
 h_4: 56
   h_4_stat

Re: [weewx-user] Aggregation generates empty plots in daily images (customized Seasons skin)

2019-07-07 Thread mph


[image: daytemphilow_line_gap_0.2.png]
Thanks for the advice.

Changing line_gap_fraction to 0.2 did the trick. I've tested another values 
down to 0.03.
The 0.04 is the smallest value, when the graph is plotted right.

I've noticed in this image a small gap at the start and the end of the data 
lines (left and right side).
None of my other images does have this.

But as a workarround the line_gap_fraction trick is reasonable good for me.
Although the trick helped, I did the manager.py test. Resulting output is 
in attachment.

Thank you a lot for your help
Pavel 


-- 
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/42b71920-100c-45a1-98cf-095b486311b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
pi@rpi-meteo:~ $ sudo wee_reports
Using configuration file /etc/weewx/weewx.conf
Generating for all time
timespan=[2019-07-07 06:00:00 CEST (1562472000) -> 2019-07-08 09:00:00 CEST 
(1562569200)]; sql_type=outTemp; aggregate_type=min; aggregate_interval=3600
start_vec= [1562472000, 1562475600, 1562479200, 1562482800, 1562486400, 
156249, 1562493600, 1562497200, 1562500800, 1562504400, 1562508000, 
1562511600, 1562515200, 1562518800, 1562522400, 1562526000, 1562529600, 
1562533200, 1562536800, 1562540400, 1562544000, 1562547600, 1562551200, 
1562554800, 1562558400]
stop_vec= [1562475600, 1562479200, 1562482800, 1562486400, 156249, 
1562493600, 1562497200, 1562500800, 1562504400, 1562508000, 1562511600, 
1562515200, 1562518800, 1562522400, 1562526000, 1562529600, 1562533200, 
1562536800, 1562540400, 1562544000, 1562547600, 1562551200, 1562554800, 
1562558400, 1562562000]
data_vec= [67.5, 68.97176470588235, 71.52631578947367, 67.540002, 
69.5475, 68.20941176470589, 66.64736842105265, 66.44842105263157, 66.15, 67.14, 
68.44235294117645, 70.250006, 71.450002, 69.080003, 
66.62842105263158, 64.470003, 62.8100024, 60.21, 
58.78588235294116, 57.77, 55.78, 53.748, 51.84, 
51.8039995, 52.559997]
timespan=[2019-07-07 06:00:00 CEST (1562472000) -> 2019-07-08 09:00:00 CEST 
(1562569200)]; sql_type=outTemp; aggregate_type=max; aggregate_interval=3600
start_vec= [1562472000, 1562475600, 1562479200, 1562482800, 1562486400, 
156249, 1562493600, 1562497200, 1562500800, 1562504400, 1562508000, 
1562511600, 1562515200, 1562518800, 1562522400, 1562526000, 1562529600, 
1562533200, 1562536800, 1562540400, 1562544000, 1562547600, 1562551200, 
1562554800, 1562558400]
stop_vec= [1562475600, 1562479200, 1562482800, 1562486400, 156249, 
1562493600, 1562497200, 1562500800, 1562504400, 1562508000, 1562511600, 
1562515200, 1562518800, 1562522400, 1562526000, 1562529600, 1562533200, 
1562536800, 1562540400, 1562544000, 1562547600, 1562551200, 1562554800, 
1562558400, 1562562000]
data_vec= [68.90210526315792, 75.14, 75.712499, 70.222501, 
71.820001, 71.27, 68.03, 67.5, 67.19, 
68.230002, 70.02, 71.96, 72.1042105263158, 71.27, 
68.9021052631579, 66.42, 64.21, 62.64, 59.9400026, 58.64823529411763, 
57.779998, 55.980001, 53.52352941176472, 52.459998, 
53.274]


Re: [weewx-user] Aggregation generates empty plots in daily images (customized Seasons skin)

2019-07-07 Thread mph
I've installed the sqlite3.

Result is in the attachment.

-- 
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/a49793f4-703c-4c9f-b01a-7f4229fcd2cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
1562454300|2019-07-07 01:05:00|70.38
1562454600|2019-07-07 01:10:00|70.2952941176471
1562454900|2019-07-07 01:15:00|70.16
1562455200|2019-07-07 01:20:00|69.93
1562455500|2019-07-07 01:25:00|69.6070588235294
1562455800|2019-07-07 01:30:00|69.41
1562456100|2019-07-07 01:35:00|69.264
1562456400|2019-07-07 01:40:00|69.04
1562456700|2019-07-07 01:45:00|68.8235294117647
1562457000|2019-07-07 01:50:00|68.59
1562457300|2019-07-07 01:55:00|68.36
1562457600|2019-07-07 02:00:00|68.2105263157895
1562457900|2019-07-07 02:05:00|67.92
1562458200|2019-07-07 02:10:00|67.77
1562458500|2019-07-07 02:15:00|67.5
1562458800|2019-07-07 02:20:00|67.5
1562459100|2019-07-07 02:25:00|67.5
1562459400|2019-07-07 02:30:00|67.4258823529412
1562459700|2019-07-07 02:35:00|67.32
156246|2019-07-07 02:40:00|67.33
1562460300|2019-07-07 02:45:00|67.5
1562460600|2019-07-07 02:50:00|67.42
1562460900|2019-07-07 02:55:00|67.4364705882353
1562461200|2019-07-07 03:00:00|67.5
1562461500|2019-07-07 03:05:00|67.5
1562461800|2019-07-07 03:10:00|67.5
1562462100|2019-07-07 03:15:00|67.5
1562462400|2019-07-07 03:20:00|67.5
1562462700|2019-07-07 03:25:00|67.37625
1562463000|2019-07-07 03:30:00|67.17
1562463300|2019-07-07 03:35:00|67.14
1562463600|2019-07-07 03:40:00|67.14
1562463900|2019-07-07 03:45:00|67.14
1562464200|2019-07-07 03:50:00|67.14
1562464500|2019-07-07 03:55:00|67.18
1562464800|2019-07-07 04:00:00|67.32
1562465100|2019-07-07 04:05:00|67.32
1562465400|2019-07-07 04:10:00|67.32
1562465700|2019-07-07 04:15:00|67.32
1562466000|2019-07-07 04:20:00|67.33
1562466300|2019-07-07 04:25:00|67.5
1562466600|2019-07-07 04:30:00|67.5
1562466900|2019-07-07 04:35:00|67.5
1562467200|2019-07-07 04:40:00|67.5
1562467500|2019-07-07 04:45:00|67.5
1562467800|2019-07-07 04:50:00|67.44375
1562468100|2019-07-07 04:55:00|67.5
1562468400|2019-07-07 05:00:00|67.491
1562468700|2019-07-07 05:05:00|67.39
1562469000|2019-07-07 05:10:00|67.48875
1562469300|2019-07-07 05:15:00|67.43
1562469600|2019-07-07 05:20:00|67.5
1562469900|2019-07-07 05:25:00|67.4526315789474
1562470200|2019-07-07 05:30:00|67.3875
1562470500|2019-07-07 05:35:00|67.39
1562470800|2019-07-07 05:40:00|67.33
1562471100|2019-07-07 05:45:00|67.5
1562471400|2019-07-07 05:50:00|67.5
1562471700|2019-07-07 05:55:00|67.4576470588235
1562472000|2019-07-07 06:00:00|67.47
1562472300|2019-07-07 06:05:00|67.5
1562472600|2019-07-07 06:10:00|67.5
1562472900|2019-07-07 06:15:00|67.54
1562473200|2019-07-07 06:20:00|67.6326315789474
1562473500|2019-07-07 06:25:00|67.86
1562473800|2019-07-07 06:30:00|68.0873684210526
1562474100|2019-07-07 06:35:00|68.22
1562474400|2019-07-07 06:40:00|68.22
1562474700|2019-07-07 06:45:00|68.2729411764706
1562475000|2019-07-07 06:50:00|68.5
1562475300|2019-07-07 06:55:00|68.76
1562475600|2019-07-07 07:00:00|68.9021052631579
1562475900|2019-07-07 07:05:00|68.9717647058824
1562476200|2019-07-07 07:10:00|69.28
1562476500|2019-07-07 07:15:00|69.8611764705882
1562476800|2019-07-07 07:20:00|70.5789473684211
1562477100|2019-07-07 07:25:00|71.1
1562477400|2019-07-07 07:30:00|71.17
1562477700|2019-07-07 07:35:00|71.64
1562478000|2019-07-07 07:40:00|71.64
1562478300|2019-07-07 07:45:00|71.85
1562478600|2019-07-07 07:50:00|73.0482352941177
1562478900|2019-07-07 07:55:00|74.592
1562479200|2019-07-07 08:00:00|75.14
1562479500|2019-07-07 08:05:00|75.7125
1562479800|2019-07-07 08:10:00|75.06
1562480100|2019-07-07 08:15:00|74.83
1562480400|2019-07-07 08:20:00|74.6
1562480700|2019-07-07 08:25:00|74.205
1562481000|2019-07-07 08:30:00|74.0747368421053
1562481300|2019-07-07 08:35:00|73.9482352941177
1562481600|2019-07-07 08:40:00|73.6411764705882
1562481900|2019-07-07 08:45:00|73.18
1562482200|2019-07-07 08:50:00|72.7623529411765
1562482500|2019-07-07 08:55:00|72.2223529411765
1562482800|2019-07-07 09:00:00|71.5263157894737
1562483100|2019-07-07 09:05:00|70.2225
1562483400|2019-07-07 09:10:00|69.6917647058824
1562483700|2019-07-07 09:15:00|69.0670588235295
1562484000|2019-07-07 09:20:00|68.7917647058823
1562484300|2019-07-07 09:25:00|68.46
1562484600|2019-07-07 09:30:00|68.088
1562484900|2019-07-07 09:35:00|67.54
1562485200|2019-07-07 09:40:00|67.76
1562485500|2019-07-07 09:45:00|67.9764705882353
1562485800|2019-07-07 09:50:00|68.13
1562486100|2019-07-07 09:55:00|68.5694117647059
1562486400|2019-07-07 10:00:00|68.99
1562486700|2019-07-07 10:05:00|69.5475
1562487000|2019-07-07 10:10:00|69.75
1562487300|2019-07-07 10:15:00|70.1470588235294
1562487600|2019-07-07 10:20:00|70.3482352941177
1562487900|2019-07-07 10:25:00|70.38
1562488200|20