Re: [weewx-user] Trying to use variable outside of the main weather record in the alarm.py example

2020-08-25 Thread Rahul Bedi
It appears that I might have to actually read the last record from the
purpleair DB as the default record passed to the new_archive_record()
handler in alarm.py is referring to the main weather station record only.

Any tips on how to do the equivalent the following from the skin template
within the alarm.py code:

"$current($data_binding='aqi_binding').aqi_pm2_5"

Thx.

- Rahul

On Tue, Aug 25, 2020 at 8:28 PM Rahul Bedi  wrote:

> The expression I am trying to eval is:
>
> "(pm2_5_cf_1 > 0)"
>
> and the error is get is:
>
> "weewxd: alarm: name 'pm2_5_cf_1' is not defined"
>
> When I print it, here is what the record contains:
>
> Record:
> {'heatindex': 82.0, 'altimeter': 27.113450189583336, 'outHumidity': 56.4,
> 'humidex': 90.06778137338245, 'ET': None, 'rainBatteryStatus': 0.0,
> 'rainFault': 0.0, 'uvFault': 0.0, 'rainRate': 0.0, 'outTempBatteryStatus':
> 0.0, 'rain24': 0.0, 'inHeatindex': 28.343, 'inDewpoint':
> 62.24454757159945, 'hourRain': 0.0, 'inTemp': 82.20137931034483,
> 'barometer': 30.003354552125, 'windchill': None, 'dewpoint':
> 63.195132514044566, 'windrun': 0.44117464302136283, 'rain': 0.0,
> 'maxSolarRad': None, 'pressure': 27.113450189583336, 'windGustDir': 247.5,
> 'rainTotal': 20.6502, 'clockUnsynchronized': 0.0, 'forecastIcon': 2.0,
> 'usUnits': 1, 'appTemp': 81.67662896111341, 'windBatteryStatus': 0.0,
> 'interval': 5, 'dateTime': 1598108100, 'windDir': 257.4427276349679,
> 'outTemp': 80.131999, 'windSpeed': 5.294095716256354, 'inHumidity':
> 51.0, 'outTempFault': 0.0, 'windGust': 17.000758074738712,
> 'uvBatteryStatus': 0.0, 'windFault': 0.0, 'cloudbase': 6765.2880649898725}
>
> None of the purple air fields are in it. Purpleair service does use a
> different binding and database to store its values, so not sure if that has
> some bearing.
>
> - Rahul
>
> On Tue, Aug 25, 2020 at 8:15 PM Tom Keffer  wrote:
>
>> I guess I don't understand. If the Purple Air fields are not in the
>> record, where are they?
>>
>> On Tue, Aug 25, 2020 at 7:11 AM Rahul Bedi 
>> wrote:
>>
>>> Hi,
>>>
>>> I am trying to use the "examples/alarm.py" example in weewx 4.1.1 to
>>> send me an email but instead of using the main weather record fields in the
>>> expression eg. rainRate etc.. I would like to use fields from the purpleair
>>> service but the expression is unable to eval them as they don't exist in
>>> the record being passed to the "new_archive_record()" function.
>>>
>>> Any idea how I could refer to those ?
>>>
>>> Thanks.
>>>
>>> - Rahul
>>>
>>> --
>>> 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/5c2eca8a-00e1-4499-8936-f77856931b89n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/weewx-user/5c2eca8a-00e1-4499-8936-f77856931b89n%40googlegroups.com?utm_medium=email_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/_8gBsgz9Qmc/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/CAPq0zEDjk91EAUt-zi%3DnfVccFA6vbpzMMy8b4dzsPRPbVcetwg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/weewx-user/CAPq0zEDjk91EAUt-zi%3DnfVccFA6vbpzMMy8b4dzsPRPbVcetwg%40mail.gmail.com?utm_medium=email_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/CAJCGUpqeAXNiqtM0pYTw1fyDXCTdY3c8YnRqEAz9CsBhABA%3DgQ%40mail.gmail.com.


Re: [weewx-user] Trying to use variable outside of the main weather record in the alarm.py example

2020-08-25 Thread Rahul Bedi
The expression I am trying to eval is:

"(pm2_5_cf_1 > 0)"

and the error is get is:

"weewxd: alarm: name 'pm2_5_cf_1' is not defined"

When I print it, here is what the record contains:

Record:
{'heatindex': 82.0, 'altimeter': 27.113450189583336, 'outHumidity': 56.4,
'humidex': 90.06778137338245, 'ET': None, 'rainBatteryStatus': 0.0,
'rainFault': 0.0, 'uvFault': 0.0, 'rainRate': 0.0, 'outTempBatteryStatus':
0.0, 'rain24': 0.0, 'inHeatindex': 28.343, 'inDewpoint':
62.24454757159945, 'hourRain': 0.0, 'inTemp': 82.20137931034483,
'barometer': 30.003354552125, 'windchill': None, 'dewpoint':
63.195132514044566, 'windrun': 0.44117464302136283, 'rain': 0.0,
'maxSolarRad': None, 'pressure': 27.113450189583336, 'windGustDir': 247.5,
'rainTotal': 20.6502, 'clockUnsynchronized': 0.0, 'forecastIcon': 2.0,
'usUnits': 1, 'appTemp': 81.67662896111341, 'windBatteryStatus': 0.0,
'interval': 5, 'dateTime': 1598108100, 'windDir': 257.4427276349679,
'outTemp': 80.131999, 'windSpeed': 5.294095716256354, 'inHumidity':
51.0, 'outTempFault': 0.0, 'windGust': 17.000758074738712,
'uvBatteryStatus': 0.0, 'windFault': 0.0, 'cloudbase': 6765.2880649898725}

None of the purple air fields are in it. Purpleair service does use a
different binding and database to store its values, so not sure if that has
some bearing.

- Rahul

On Tue, Aug 25, 2020 at 8:15 PM Tom Keffer  wrote:

> I guess I don't understand. If the Purple Air fields are not in the
> record, where are they?
>
> On Tue, Aug 25, 2020 at 7:11 AM Rahul Bedi 
> wrote:
>
>> Hi,
>>
>> I am trying to use the "examples/alarm.py" example in weewx 4.1.1 to send
>> me an email but instead of using the main weather record fields in the
>> expression eg. rainRate etc.. I would like to use fields from the purpleair
>> service but the expression is unable to eval them as they don't exist in
>> the record being passed to the "new_archive_record()" function.
>>
>> Any idea how I could refer to those ?
>>
>> Thanks.
>>
>> - Rahul
>>
>> --
>> 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/5c2eca8a-00e1-4499-8936-f77856931b89n%40googlegroups.com
>> <https://groups.google.com/d/msgid/weewx-user/5c2eca8a-00e1-4499-8936-f77856931b89n%40googlegroups.com?utm_medium=email_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/_8gBsgz9Qmc/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAPq0zEDjk91EAUt-zi%3DnfVccFA6vbpzMMy8b4dzsPRPbVcetwg%40mail.gmail.com
> <https://groups.google.com/d/msgid/weewx-user/CAPq0zEDjk91EAUt-zi%3DnfVccFA6vbpzMMy8b4dzsPRPbVcetwg%40mail.gmail.com?utm_medium=email_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/CAJCGUprOAqnEV4cn5rBDmF1qHxME6-gq7TqGxLmKjiZLqFouRw%40mail.gmail.com.


[weewx-user] Trying to use variable outside of the main weather record in the alarm.py example

2020-08-25 Thread Rahul Bedi
Hi,

I am trying to use the "examples/alarm.py" example in weewx 4.1.1 to send 
me an email but instead of using the main weather record fields in the 
expression eg. rainRate etc.. I would like to use fields from the purpleair 
service but the expression is unable to eval them as they don't exist in 
the record being passed to the "new_archive_record()" function.

Any idea how I could refer to those ?

Thanks.

- Rahul

-- 
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/5c2eca8a-00e1-4499-8936-f77856931b89n%40googlegroups.com.


Re: [weewx-user] Re: aqi_backfill gives error

2020-07-11 Thread Rahul Bedi
Sorry for the late reply. I tried running the latest rev with weewx shut
and here is where I wound up before it hung.

pi@PrideWeatherStation:/usr/share/weewx $ sudo ./aqi_backfill --start_time
1478193919 --end_time 1592548226 /etc/weewx/weewx.conf
Starting backfill from 1478193919 2016-11-03 22:55:19
No handlers could be found for logger "weewx.manager"
processed 30 days... 1480785900 2016-12-03 22:55:00
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
  File "/usr/share/weewx/weewx/drivers/wmr200.py", line 1229, in run
_ = self.usb_device.read_device()
  File "/usr/share/weewx/weewx/drivers/wmr200.py", line 259, in read_device
raise weewx.WeeWxIOError(msg)
WeeWxIOError: read_device() USB Error Reason:[Errno 110] Operation timed out

processed 60 days... 1483377900 2017-01-02 22:55:00
processed 90 days... 1485970200 2017-02-01 23:00:00
processed 120 days... 1488562200 2017-03-03 23:00:00
processed 150 days... 1491154200 2017-04-02 23:00:00
processed 180 days... 1493746200 2017-05-02 23:00:00
processed 210 days... 1496338800 2017-06-01 23:10:00
processed 240 days... 1498930800 2017-07-01 23:10:00
processed 270 days... 1501557600 2017-08-01 08:50:00
processed 300 days... 1504149600 2017-08-31 08:50:00
processed 330 days... 1506741600 2017-09-30 08:50:00
processed 360 days... 1509333600 2017-10-30 08:50:00
processed 390 days... 1511930700 2017-11-29 10:15:00
processed 420 days... 1514522700 2017-12-29 10:15:00
processed 450 days... 1517115900 2018-01-28 10:35:00
processed 480 days... 1519707900 2018-02-27 10:35:00
processed 510 days... 1522300200 2018-03-29 10:40:00
processed 540 days... 1525530600 2018-05-05 20:00:00
processed 570 days... 1528123800 2018-06-04 20:20:00
processed 600 days... 1530717900 2018-07-04 20:55:00
processed 630 days... 1533359100 2018-08-04 10:35:00
processed 660 days... 1535996400 2018-09-03 23:10:00
processed 690 days... 1538488800 2018-10-02 19:30:00
processed 810 days... 1548349800 2019-01-24 22:40:00
processed 900 days... 1555643400 2019-04-19 08:40:00
processed 1050 days... 1568389800 2019-09-13 21:20:00

On Sat, Jul 4, 2020 at 12:12 PM jonathan koren 
wrote:

>
> It creates a weewx engine.StdEngine to get handles to the databases to
> query. So no, it does not talk to any devices, but the device is getting
> opened as part of the engine startup,
>
> I have not seen anything like this with the Vantage driver. Have you tried
> shutting down weewx before running aqi_backfill?
>
>
> On Thursday, July 2, 2020 at 9:28:14 PM UTC-7, Rahul Bedi wrote:
>>
>> Yes. Works with no issues outside of the script.
>>
>> It's not clear to me as to why this script is even trying to talk to the
>> weather station. Shouldn't it be just be moving data from one database to
>> the other ?
>>
>>
>> On Fri, 3 Jul, 2020, 9:45 am jonathan koren, 
>> wrote:
>>
>>> It appears that weewx can't talk to whatever device is on your USB. Are
>>> you sure you have the WMR 200 configured correctly? Is it plugged in?
>>>
>>> These errors aren't even happening in the AQI code.
>>>
>>> On Wednesday, July 1, 2020 at 11:36:39 PM UTC-7, Rahul Bedi wrote:
>>>>
>>>> Tried and gives the following message and it hangs:
>>>>
>>>> pi@PrideWeatherStation:/var/lib/weewx $ sudo
>>>> /usr/share/weewx/aqi_backfill --start_time 1592634016 --end_time 1593670517
>>>> /etc/weewx/weewx.conf
>>>> Starting backfill from 1592634016 2020-06-20 11:50:16
>>>> No handlers could be found for logger "weewx.drivers.wmr200"
>>>> Exception in thread Thread-2:
>>>> Traceback (most recent call last):
>>>>   File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
>>>> self.run()
>>>>   File "/usr/share/weewx/weewx/drivers/wmr200.py", line 1229, in run
>>>> _ = self.usb_device.read_device()
>>>>   File "/usr/share/weewx/weewx/drivers/wmr200.py", line 259, in
>>>> read_device
>>>> raise weewx.WeeWxIOError(msg)
>>>> WeeWxIOError: read_device() USB Error Reason:[Errno 110] Operation
>>>> timed out
>>>>
>>>> On Thu, Jul 2, 2020 at 11:33 AM jonathan koren <
>>>> spam-...@robotmonkeys.net> wrote:
>>>>
>>>>> There's a new weewx-aqi release (1.3)
>>>>> https://github.com/jonathankoren/weewx-aqi/releases/tag/v1.3 so make
>>>>> sure you get that. It has some changes that effect aqi_backfill, including
>>>>> the fix for this.
>>>>>
>>>>&g

Re: [weewx-user] Re: aqi_backfill gives error

2020-07-02 Thread Rahul Bedi
Yes. Works with no issues outside of the script.

It's not clear to me as to why this script is even trying to talk to the
weather station. Shouldn't it be just be moving data from one database to
the other ?


On Fri, 3 Jul, 2020, 9:45 am jonathan koren, 
wrote:

> It appears that weewx can't talk to whatever device is on your USB. Are
> you sure you have the WMR 200 configured correctly? Is it plugged in?
>
> These errors aren't even happening in the AQI code.
>
> On Wednesday, July 1, 2020 at 11:36:39 PM UTC-7, Rahul Bedi wrote:
>>
>> Tried and gives the following message and it hangs:
>>
>> pi@PrideWeatherStation:/var/lib/weewx $ sudo
>> /usr/share/weewx/aqi_backfill --start_time 1592634016 --end_time 1593670517
>> /etc/weewx/weewx.conf
>> Starting backfill from 1592634016 2020-06-20 11:50:16
>> No handlers could be found for logger "weewx.drivers.wmr200"
>> Exception in thread Thread-2:
>> Traceback (most recent call last):
>>   File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
>> self.run()
>>   File "/usr/share/weewx/weewx/drivers/wmr200.py", line 1229, in run
>> _ = self.usb_device.read_device()
>>   File "/usr/share/weewx/weewx/drivers/wmr200.py", line 259, in
>> read_device
>> raise weewx.WeeWxIOError(msg)
>> WeeWxIOError: read_device() USB Error Reason:[Errno 110] Operation timed
>> out
>>
>> On Thu, Jul 2, 2020 at 11:33 AM jonathan koren 
>> wrote:
>>
>>> There's a new weewx-aqi release (1.3)
>>> https://github.com/jonathankoren/weewx-aqi/releases/tag/v1.3 so make
>>> sure you get that. It has some changes that effect aqi_backfill, including
>>> the fix for this.
>>>
>>> Be aware, aqi_backfill  pretty temperamental.
>>>
>>>
>>> On Wednesday, July 1, 2020 at 3:57:10 AM UTC-7, Rahul Bedi wrote:
>>>>
>>>> Hi,
>>>>
>>>> I tried running the "aqi_backfill" script which is part of the aqi
>>>> extension on a weewx 4.1.1 install and get the following error.
>>>>
>>>> Looks like way to pull the config seems to have changes since the time
>>>> this script was written.
>>>>
>>>> Any ideas?
>>>>
>>>> - Rahul
>>>>
>>>>
>>>> pi@PrideWeatherStation:/usr/share/weewx $ sudo ./aqi_backfill
>>>> weewx.conf
>>>> Traceback (most recent call last):
>>>>   File "./aqi_backfill", line 34, in 
>>>> config = weewx.engine.getConfiguration(args.config_file)
>>>> AttributeError: 'module' object has no attribute 'getConfiguration'
>>>>
>>>>
>>>>
>>>> pi@PrideWeatherStation:/usr/share/weewx $ sudo ./aqi_backfill
>>>> /etc/weewx/weewx.conf
>>>> Traceback (most recent call last):
>>>>   File "./aqi_backfill", line 34, in 
>>>> config = weewx.engine.getConfiguration(args.config_file)
>>>> AttributeError: 'module' object has no attribute 'getConfiguration'
>>>>
>>>> --
>>> 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/K6drNzzE5vs/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> weewx...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/weewx-user/cc941830-184c-4006-9aff-65071baa3d29o%40googlegroups.com
>>> <https://groups.google.com/d/msgid/weewx-user/cc941830-184c-4006-9aff-65071baa3d29o%40googlegroups.com?utm_medium=email_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/K6drNzzE5vs/unsubscribe.
> To unsubscribe from this group and all its topics, 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/de4581a0-cfe4-4e4c-b13c-eeba41e209a1o%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/de4581a0-cfe4-4e4c-b13c-eeba41e209a1o%40googlegroups.com?utm_medium=email_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/CAJCGUpofdVR%2B4ZXv82o1Gwr6DKYV6%2Bc4w1VibSsTfQ34p_Xq9w%40mail.gmail.com.


Re: [weewx-user] Re: aqi_backfill gives error

2020-07-02 Thread Rahul Bedi
Tried and gives the following message and it hangs:

pi@PrideWeatherStation:/var/lib/weewx $ sudo /usr/share/weewx/aqi_backfill
--start_time 1592634016 --end_time 1593670517 /etc/weewx/weewx.conf
Starting backfill from 1592634016 2020-06-20 11:50:16
No handlers could be found for logger "weewx.drivers.wmr200"
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
  File "/usr/share/weewx/weewx/drivers/wmr200.py", line 1229, in run
_ = self.usb_device.read_device()
  File "/usr/share/weewx/weewx/drivers/wmr200.py", line 259, in read_device
raise weewx.WeeWxIOError(msg)
WeeWxIOError: read_device() USB Error Reason:[Errno 110] Operation timed out

On Thu, Jul 2, 2020 at 11:33 AM jonathan koren 
wrote:

> There's a new weewx-aqi release (1.3)
> https://github.com/jonathankoren/weewx-aqi/releases/tag/v1.3 so make sure
> you get that. It has some changes that effect aqi_backfill, including the
> fix for this.
>
> Be aware, aqi_backfill  pretty temperamental.
>
>
> On Wednesday, July 1, 2020 at 3:57:10 AM UTC-7, Rahul Bedi wrote:
>>
>> Hi,
>>
>> I tried running the "aqi_backfill" script which is part of the aqi
>> extension on a weewx 4.1.1 install and get the following error.
>>
>> Looks like way to pull the config seems to have changes since the time
>> this script was written.
>>
>> Any ideas?
>>
>> - Rahul
>>
>>
>> pi@PrideWeatherStation:/usr/share/weewx $ sudo ./aqi_backfill weewx.conf
>> Traceback (most recent call last):
>>   File "./aqi_backfill", line 34, in 
>> config = weewx.engine.getConfiguration(args.config_file)
>> AttributeError: 'module' object has no attribute 'getConfiguration'
>>
>>
>>
>> pi@PrideWeatherStation:/usr/share/weewx $ sudo ./aqi_backfill
>> /etc/weewx/weewx.conf
>> Traceback (most recent call last):
>>   File "./aqi_backfill", line 34, in 
>> config = weewx.engine.getConfiguration(args.config_file)
>> AttributeError: 'module' object has no attribute 'getConfiguration'
>>
>> --
> 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/K6drNzzE5vs/unsubscribe.
> To unsubscribe from this group and all its topics, 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/cc941830-184c-4006-9aff-65071baa3d29o%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/cc941830-184c-4006-9aff-65071baa3d29o%40googlegroups.com?utm_medium=email_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/CAJCGUprAkKSg-pyOQnuaRBYL7TwAAVWOQTLWyzx%2BfkxKBPW-JQ%40mail.gmail.com.


[weewx-user] aqi_backfill gives error

2020-07-01 Thread Rahul Bedi
Hi,

I tried running the "aqi_backfill" script which is part of the aqi 
extension on a weewx 4.1.1 install and get the following error.

Looks like way to pull the config seems to have changes since the time this 
script was written.

Any ideas?

- Rahul


pi@PrideWeatherStation:/usr/share/weewx $ sudo ./aqi_backfill weewx.conf
Traceback (most recent call last):
  File "./aqi_backfill", line 34, in 
config = weewx.engine.getConfiguration(args.config_file)
AttributeError: 'module' object has no attribute 'getConfiguration'



pi@PrideWeatherStation:/usr/share/weewx $ sudo ./aqi_backfill 
/etc/weewx/weewx.conf
Traceback (most recent call last):
  File "./aqi_backfill", line 34, in 
config = weewx.engine.getConfiguration(args.config_file)
AttributeError: 'module' object has no attribute 'getConfiguration'

-- 
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/1a24a46a-c69f-47d9-90da-c8e0222a2e09o%40googlegroups.com.


Re: [weewx-user] Re: Issue with NOAA Template when trying to add additional fields

2020-06-30 Thread Rahul Bedi
BTW if I was to manually replace $day with a variable that is, say, the
first day of the month ? How would I do that ?

I am trying to remove the loop and replace that with 31 lines that will be
one for each possible date.

Thx.

- Rahul

On Tue, Jun 30, 2020 at 7:28 PM Rahul Bedi  wrote:

> Thanks Tom and Gary. The only other way I can think of is to do the kludgy
> way of removing the loop altogether and doing it 31 times for the month :(.
> Not pretty but had to do that in hilo.inc
>
> - Rahul
>
> On Tue, Jun 30, 2020 at 7:14 PM Tom Keffer  wrote:
>
>> Yes, this is a limitation in the iterators: they cannot use a data
>> binding. There's probably a workaround, but I'd have to think about it a
>> bit.
>>
>> In the meantime, I've put up issue #580
>> <https://github.com/weewx/weewx/issues/580> to track.
>>
>> Probably related to issue #384
>> <https://github.com/weewx/weewx/issues/384> as well.
>>
>> -tk
>>
>> On Tue, Jun 30, 2020 at 6:16 AM Rahul Bedi  wrote:
>>
>>> Tried. I get a similar error:
>>>
>>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>>> weewx.cheetahgenerator: Generate failed with exception '>> 'exceptions.TypeError'>'
>>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>>> weewx.cheetahgenerator:  Ignoring template
>>> /etc/weewx/skins/Seasons/NOAA/NOAA--MM.txt.tmpl
>>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>>> weewx.cheetahgenerator:  Reason: 'TimespanBinder' object is not callable
>>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>>> weewx.cheetahgenerator:   Traceback (most recent call last):
>>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>>> weewx.cheetahgenerator: File
>>> "/usr/share/weewx/weewx/cheetahgenerator.py", line 322, in generate
>>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>>> weewx.cheetahgenerator:   unicode_string =
>>> compiled_template.respond()
>>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>>> weewx.cheetahgenerator: File
>>> "cheetah__etc_weewx_skins_Seasons_NOAA_NOAA__MM_txt_tmpl_1593522919_43_84946.py",
>>> line 479, in respond
>>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>>> weewx.cheetahgenerator: File
>>> "cheetah__etc_weewx_skins_Seasons_NOAA_NOAA__MM_txt_tmpl_1593522919_43_84946.py",
>>> line 252, in __errorCatcher27
>>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>>> weewx.cheetahgenerator: File "", line 1, in 
>>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>>> weewx.cheetahgenerator:   TypeError: 'TimespanBinder' object is not
>>> callable
>>>
>>> On Tue, Jun 30, 2020 at 6:10 PM gjr80  wrote:
>>>
>>>> Hi,
>>>>
>>>> Try using:
>>>>
>>>> $day($data_binding='purpleair_binding').pm2_5_atm.maxtime.format($Time)
>>>> $day($data_binding='purpleair_binding').pm2_5_atm.max.nolabel($Count,
>>>> $NONE)
>>>>
>>>> Gary
>>>>
>>>>
>>>> On Tuesday, 30 June 2020 22:32:23 UTC+10, Rahul Bedi wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I have been trying to update the NOAA template to incorporate the air
>>>>> quality data in the monthly report, but when I added the two entries (in
>>>>> red)  in the file  NOAA--MM.txt.tmpl, I an error (attached at the 
>>>>> end).
>>>>> Interestingly the same two entries, in the hilo.inc file in the
>>>>> Seasons skin work fine.
>>>>>
>>>>> Even more interestingly, the same two entries placed just before the
>>>>> "MONTHLY ..." line, work just fine.
>>>>>
>>>>> Any idea about what am I doing wrong ?
>>>>>
>>>>> Thanks.
>>>>>
>>>>> - Rahul
>>>>>
>>>>>
>>>>> #errorCatcher Echo
>>>>> #set $YM="%Y %m"
>>>>> #set $D=" %d"
>>>>> #set $M=" %b"
>>>>> #set $Time=" %H:%M"
>>>>> #set $NODAY=" N/A"
>>>>> #set $Temp="%6.1f"
>>>>> #set $Wind="%6.1f"
>>>>> #set $Dir="%6.0f"
>>>>> #set $Count="%6d"
>>>>> #set $NONE=&

Re: [weewx-user] Re: Issue with NOAA Template when trying to add additional fields

2020-06-30 Thread Rahul Bedi
Thanks Tom and Gary. The only other way I can think of is to do the kludgy
way of removing the loop altogether and doing it 31 times for the month :(.
Not pretty but had to do that in hilo.inc

- Rahul

On Tue, Jun 30, 2020 at 7:14 PM Tom Keffer  wrote:

> Yes, this is a limitation in the iterators: they cannot use a data
> binding. There's probably a workaround, but I'd have to think about it a
> bit.
>
> In the meantime, I've put up issue #580
> <https://github.com/weewx/weewx/issues/580> to track.
>
> Probably related to issue #384 <https://github.com/weewx/weewx/issues/384>
> as well.
>
> -tk
>
> On Tue, Jun 30, 2020 at 6:16 AM Rahul Bedi  wrote:
>
>> Tried. I get a similar error:
>>
>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>> weewx.cheetahgenerator: Generate failed with exception '> 'exceptions.TypeError'>'
>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>> weewx.cheetahgenerator:  Ignoring template
>> /etc/weewx/skins/Seasons/NOAA/NOAA--MM.txt.tmpl
>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>> weewx.cheetahgenerator:  Reason: 'TimespanBinder' object is not callable
>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>> weewx.cheetahgenerator:   Traceback (most recent call last):
>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>> weewx.cheetahgenerator: File
>> "/usr/share/weewx/weewx/cheetahgenerator.py", line 322, in generate
>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>> weewx.cheetahgenerator:   unicode_string =
>> compiled_template.respond()
>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>> weewx.cheetahgenerator: File
>> "cheetah__etc_weewx_skins_Seasons_NOAA_NOAA__MM_txt_tmpl_1593522919_43_84946.py",
>> line 479, in respond
>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>> weewx.cheetahgenerator: File
>> "cheetah__etc_weewx_skins_Seasons_NOAA_NOAA__MM_txt_tmpl_1593522919_43_84946.py",
>> line 252, in __errorCatcher27
>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>> weewx.cheetahgenerator: File "", line 1, in 
>> Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
>> weewx.cheetahgenerator:   TypeError: 'TimespanBinder' object is not
>> callable
>>
>> On Tue, Jun 30, 2020 at 6:10 PM gjr80  wrote:
>>
>>> Hi,
>>>
>>> Try using:
>>>
>>> $day($data_binding='purpleair_binding').pm2_5_atm.maxtime.format($Time)
>>> $day($data_binding='purpleair_binding').pm2_5_atm.max.nolabel($Count,
>>> $NONE)
>>>
>>> Gary
>>>
>>>
>>> On Tuesday, 30 June 2020 22:32:23 UTC+10, Rahul Bedi wrote:
>>>>
>>>> Hi,
>>>>
>>>> I have been trying to update the NOAA template to incorporate the air
>>>> quality data in the monthly report, but when I added the two entries (in
>>>> red)  in the file  NOAA--MM.txt.tmpl, I an error (attached at the end).
>>>> Interestingly the same two entries, in the hilo.inc file in the Seasons
>>>> skin work fine.
>>>>
>>>> Even more interestingly, the same two entries placed just before the
>>>> "MONTHLY ..." line, work just fine.
>>>>
>>>> Any idea about what am I doing wrong ?
>>>>
>>>> Thanks.
>>>>
>>>> - Rahul
>>>>
>>>>
>>>> #errorCatcher Echo
>>>> #set $YM="%Y %m"
>>>> #set $D=" %d"
>>>> #set $M=" %b"
>>>> #set $Time=" %H:%M"
>>>> #set $NODAY=" N/A"
>>>> #set $Temp="%6.1f"
>>>> #set $Wind="%6.1f"
>>>> #set $Dir="%6.0f"
>>>> #set $Count="%6d"
>>>> #set $NONE="   N/A"
>>>> #if $unit.unit_type_dict.group_rain == "mm"
>>>> #set $Rain="%6.1f"
>>>> #else
>>>> #set $Rain="%6.2f"
>>>> #end if
>>>>
>>>>
>>>>MONTHLY CLIMATOLOGICAL SUMMARY for $month_name
>>>> $year_name
>>>>
>>>>
>>>> NAME: $station.location
>>>> ELEV: $station.altitudeLAT:
>>>> $station.latitude[0]-$station.latitude[1] $station.latitude[2]LONG:
>>>> $station.longitude[0]-$station.longitude[1] $station.longitude[2]
>>>>
>>>>
>>>>

Re: [weewx-user] Re: Issue with NOAA Template when trying to add additional fields

2020-06-30 Thread Rahul Bedi
Tried. I get a similar error:

Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
weewx.cheetahgenerator: Generate failed with exception ''
Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
weewx.cheetahgenerator:  Ignoring template
/etc/weewx/skins/Seasons/NOAA/NOAA--MM.txt.tmpl
Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
weewx.cheetahgenerator:  Reason: 'TimespanBinder' object is not callable
Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
weewx.cheetahgenerator:   Traceback (most recent call last):
Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
weewx.cheetahgenerator: File
"/usr/share/weewx/weewx/cheetahgenerator.py", line 322, in generate
Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
weewx.cheetahgenerator:   unicode_string =
compiled_template.respond()
Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
weewx.cheetahgenerator: File
"cheetah__etc_weewx_skins_Seasons_NOAA_NOAA__MM_txt_tmpl_1593522919_43_84946.py",
line 479, in respond
Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
weewx.cheetahgenerator: File
"cheetah__etc_weewx_skins_Seasons_NOAA_NOAA__MM_txt_tmpl_1593522919_43_84946.py",
line 252, in __errorCatcher27
Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
weewx.cheetahgenerator: File "", line 1, in 
Jun 30 18:45:19 PrideWeatherStation weewx[23078] ERROR
weewx.cheetahgenerator:   TypeError: 'TimespanBinder' object is not
callable

On Tue, Jun 30, 2020 at 6:10 PM gjr80  wrote:

> Hi,
>
> Try using:
>
> $day($data_binding='purpleair_binding').pm2_5_atm.maxtime.format($Time)
> $day($data_binding='purpleair_binding').pm2_5_atm.max.nolabel($Count,$NONE
> )
>
> Gary
>
>
> On Tuesday, 30 June 2020 22:32:23 UTC+10, Rahul Bedi wrote:
>>
>> Hi,
>>
>> I have been trying to update the NOAA template to incorporate the air
>> quality data in the monthly report, but when I added the two entries (in
>> red)  in the file  NOAA--MM.txt.tmpl, I an error (attached at the end).
>> Interestingly the same two entries, in the hilo.inc file in the Seasons
>> skin work fine.
>>
>> Even more interestingly, the same two entries placed just before the
>> "MONTHLY ..." line, work just fine.
>>
>> Any idea about what am I doing wrong ?
>>
>> Thanks.
>>
>> - Rahul
>>
>>
>> #errorCatcher Echo
>> #set $YM="%Y %m"
>> #set $D=" %d"
>> #set $M=" %b"
>> #set $Time=" %H:%M"
>> #set $NODAY=" N/A"
>> #set $Temp="%6.1f"
>> #set $Wind="%6.1f"
>> #set $Dir="%6.0f"
>> #set $Count="%6d"
>> #set $NONE="   N/A"
>> #if $unit.unit_type_dict.group_rain == "mm"
>> #set $Rain="%6.1f"
>> #else
>> #set $Rain="%6.2f"
>> #end if
>>
>>
>>MONTHLY CLIMATOLOGICAL SUMMARY for $month_name
>> $year_name
>>
>>
>> NAME: $station.location
>> ELEV: $station.altitudeLAT: $station.latitude[0]-$station.latitude[1]
>> $station.latitude[2]LONG: $station.longitude[0]-$station.longitude[1]
>> $station.longitude[2]
>>
>>
>>TEMPERATURE ($unit.label.outTemp.strip()), RAIN
>> ($unit.label.rain.strip()), WIND SPEED ($unit.label.windSpeed.strip())
>>
>>  HEAT   COOL AVG
>>   MEAN   DEGDEG  WIND
>>DOM
>> DAY   TEMP   HIGH   TIMELOW   TIME   DAYS   DAYS   RAIN  SPEED
>>  HIGH   TIMEDIR
>>
>> ---
>> #for $day in $month.days
>> #if $day.barometer.count.raw
>> $day.dateTime.format($D) $day.outTemp.avg.nolabel($Temp,$NONE)
>> $day.outTemp.max.nolabel($Temp,$NONE) $day.outTemp.maxtime.format($Time)
>> $day.outTemp.min.nolabel($Temp,$NONE) $day.outTemp.mintime.format($Time)
>> $day.heatdeg.sum.nolabel($Temp,$NONE) $day.cooldeg.sum.nolabel($Temp,$NONE)
>> $day.rain.sum.nolabel($Rain,$NONE) $day.wind.avg.nolabel($Wind,$NONE)
>> $day.wind.max.nolabel($Wind,$NONE) $day.wind.maxtime.format($Time)
>> $day.wind.vecdir.nolabel($Dir,$NONE) 
>> $day('purpleair_binding').pm2_5_atm.maxtime.format($Time)
>> $day('purpleair_binding').pm2_5_atm.max.nolabel($Count,$NONE)
>> #else
>> $day.dateTime.format($D)
>> #end if
>> #end for
>>
>> ---
>> $month.outTemp.avg.nolabel($Te

[weewx-user] Issue with NOAA Template when trying to add additional fields

2020-06-30 Thread Rahul Bedi
Hi,

I have been trying to update the NOAA template to incorporate the air 
quality data in the monthly report, but when I added the two entries (in 
red)  in the file  NOAA--MM.txt.tmpl, I an error (attached at the end).
Interestingly the same two entries, in the hilo.inc file in the Seasons 
skin work fine.

Even more interestingly, the same two entries placed just before the 
"MONTHLY ..." line, work just fine.

Any idea about what am I doing wrong ?

Thanks.

- Rahul


#errorCatcher Echo
#set $YM="%Y %m"
#set $D=" %d"
#set $M=" %b"
#set $Time=" %H:%M"
#set $NODAY=" N/A"
#set $Temp="%6.1f"
#set $Wind="%6.1f"
#set $Dir="%6.0f"
#set $Count="%6d"
#set $NONE="   N/A"
#if $unit.unit_type_dict.group_rain == "mm"
#set $Rain="%6.1f"
#else
#set $Rain="%6.2f"
#end if


   MONTHLY CLIMATOLOGICAL SUMMARY for $month_name $year_name


NAME: $station.location
ELEV: $station.altitudeLAT: $station.latitude[0]-$station.latitude[1] 
$station.latitude[2]LONG: $station.longitude[0]-$station.longitude[1] 
$station.longitude[2]


   TEMPERATURE ($unit.label.outTemp.strip()), RAIN 
($unit.label.rain.strip()), WIND SPEED ($unit.label.windSpeed.strip())

 HEAT   COOL AVG
  MEAN   DEGDEG  WIND  
 DOM
DAY   TEMP   HIGH   TIMELOW   TIME   DAYS   DAYS   RAIN  SPEED   HIGH  
 TIMEDIR
---
#for $day in $month.days
#if $day.barometer.count.raw
$day.dateTime.format($D) $day.outTemp.avg.nolabel($Temp,$NONE) 
$day.outTemp.max.nolabel($Temp,$NONE) $day.outTemp.maxtime.format($Time) 
$day.outTemp.min.nolabel($Temp,$NONE) $day.outTemp.mintime.format($Time) 
$day.heatdeg.sum.nolabel($Temp,$NONE) $day.cooldeg.sum.nolabel($Temp,$NONE) 
$day.rain.sum.nolabel($Rain,$NONE) $day.wind.avg.nolabel($Wind,$NONE) 
$day.wind.max.nolabel($Wind,$NONE) $day.wind.maxtime.format($Time) 
$day.wind.vecdir.nolabel($Dir,$NONE) 
$day('purpleair_binding').pm2_5_atm.maxtime.format($Time) 
$day('purpleair_binding').pm2_5_atm.max.nolabel($Count,$NONE)
#else
$day.dateTime.format($D)
#end if
#end for
---
$month.outTemp.avg.nolabel($Temp,$NONE) 
$month.outTemp.max.nolabel($Temp,$NONE)
$month.outTemp.maxtime.format($D) $month.outTemp.min.nolabel($Temp,$NONE)  
  $month.outTemp.mintime.format($D) $month.heatdeg.sum.nolabel($Temp,$NONE) 
$month.cooldeg.sum.nolabel($Temp,$NONE) 
$month.rain.sum.nolabel($Rain,$NONE) $month.wind.avg.nolabel($Wind,$NONE) 
$month.wind.max.nolabel($Wind,$NONE)$month.wind.maxtime.format($D) 
$month.wind.vecdir.nolabel($Dir)



Error log:

Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
weewx.cheetahgenerator: Generate failed with exception ''
Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
weewx.cheetahgenerator:  Ignoring template 
/etc/weewx/skins/Seasons/NOAA/NOAA--MM.txt.tmpl
Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
weewx.cheetahgenerator:  Reason: 'TimespanBinder' object is not callable
Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
weewx.cheetahgenerator:   Traceback (most recent call last):
Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
weewx.cheetahgenerator: File 
"/usr/share/weewx/weewx/cheetahgenerator.py", line 322, in generate
Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
weewx.cheetahgenerator:   unicode_string = 
compiled_template.respond()
Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
weewx.cheetahgenerator: File 
"cheetah__etc_weewx_skins_Seasons_NOAA_NOAA__MM_txt_tmpl_1593519917_36_48096.py",
 
line 525, in respond
Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
weewx.cheetahgenerator: File 
"cheetah__etc_weewx_skins_Seasons_NOAA_NOAA__MM_txt_tmpl_1593519917_36_48096.py",
 
line 336, in __errorCatcher39
Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
weewx.cheetahgenerator: File "", line 1, in 
Jun 30 17:55:19 PrideWeatherStation weewx[23078] ERROR 
weewx.cheetahgenerator:   TypeError: 'TimespanBinder' object is not 
callable
Jun 30 17:55:26 PrideWeatherStation weewx[23078] INFO weewx.reportengine: 
Copied 0 files to /var/www/html/weewx
Jun 30 17:55:27 PrideWeatherStation weewx[23078] INFO 
weewx.cheetahgenerator: Generated 1 files for report wxobs in 0.57 seconds
Jun 30 17:55:27 PrideWeatherStation weewx[23078] INFO weewx.reportengine: 
Copied 0 files to /var/www/html/weewx/wxobs
Jun 30 17:55:27 PrideWeatherStation weewx[23078] INFO user.stackedwindrose: 
Generated 2 images for StackedWindRose in 0.41 seconds



-- 
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 

Re: [weewx-user] Generating graph with multi colored background bands or multiple colors in the graph line

2020-06-29 Thread Rahul Bedi
Thanks.

Is there a way to incorporate the generated graph into a Seasons template ?

- Rahul

On Mon, Jun 29, 2020 at 1:12 PM gjr80  wrote:

> Hi,
>
> No, unfortunately the WeeWX image generator cannot do that. You might be
> able to achieve such an effect using a 3rd party charting package such as
> Highcharts.
>
> Gary
>
> --
> 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/c3FLmNFDBw0/unsubscribe.
> To unsubscribe from this group and all its topics, 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/4b131290-4c6b-4054-af90-ca932cddd896o%40googlegroups.com
> .
>

-- 
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/CAJCGUpoPoZkRSBcnPBOjB4xvRBAFLzYtXx-yNKricDONK0F2nw%40mail.gmail.com.


[weewx-user] Generating graph with multi colored background bands or multiple colors in the graph line

2020-06-29 Thread Rahul Bedi
Hi,

I am have integrated the AQI and PurpleAir extensions on my weather station 
and am now trying tweak the graphs generated.

Is there a way to have the Weewx imagegenerator to do one of the following:

1. Generate a graph with the background with horizontal bands of different 
color based on the value of the y-axis labels ? Eg. 0-50 Green; 51-100: 
Light green; 101-150: pink etc.

or

2. Generate a graph where the line segments change color depending on the 
y-axis value. So basically one line but having different colored segments 
depending on the rang of Y-axis values.

Thanks.

- Rahul

-- 
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/953d6d7b-de8d-4c67-b262-a10f3152b01ao%40googlegroups.com.


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 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 like WMR200 is certainly an interesting WS. Is there a way to guard
>> against such erroneous records ?
>>
>> Thanks.
>>
>> - Rahul
>>
>> On Sat, Sep 15, 2018 at 6:20 PM Thomas Keffer  wrote:
>>
>>> Implemented in commit ea9fe13
>>> <https://github.com/weewx/weewx/commit/ea9fe134a242ddd0ea1df9e1c4aa4ddea1542ff6>
>>>
>>> -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 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 allows negative
>>>> intervals.
>>>>
>>>> -tk
>>>>
>>>>
>>>>
>>>> On Fri, Sep 14, 2018 at 3:53 PM Chris Manton  wrote:
>>>>
>>>>> 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
>>>>> diff --git a/bin/weewx/drivers/wmr200.py b/bin/weewx/drivers/wmr200.py
>>>>> index eaab5a14..62b743e0 100644
>>>>> --- a/bin/weewx/drivers/wmr200.py
>>>>> +++ b/bin/weewx/drivers/wmr200.py
>>>>> @@ -1943,7 +1943,13 @@ class WMR200(weewx.drivers.AbstractDevice):
>>>>>  timestamp_packet_interval = timestamp_packet_current \
>>>>>  - timestamp_packet_previous
>>>>>
>>>>> -if pkt.timestamp_record() > (timestamp_packet_previous
>>>>> +if timestamp_packet_interval < 0:
>>>>> +loginf(('genStartup() Discarding received archive'
>>>>> +' record that presented out-of-order'
>>>>> +' current_threshold:%s previous_timestamp:%s')
>>>>> +%
>>>>> (weeutil.weeutil.timestamp_to_string(pkt.timestamp_record())
>>>>> +
>>>>>  weeutil.weeutil.timestamp_to_string(timestamp_packet_previous)))
>>>>> +elif pkt.timestamp_record() >
>>>>> (timestamp_packet_previous
>>>>>   +
>>>>> self._archive_threshold):
>>>>>  loginf(('genStartup() Discarding received archive'
>>>>>  ' record exceeding archive interval
>>>>> cnt:%d'
>>>>>
>>>>> On Friday, September 14, 2018 at 6:07:48 AM UTC-7, Thomas Keffer wrote:
>>>>>>
>>>>>> 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 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

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
like WMR200 is certainly an interesting WS. Is there a way to guard against
such erroneous records ?

Thanks.

- Rahul

On Sat, Sep 15, 2018 at 6:20 PM Thomas Keffer  wrote:

> Implemented in commit ea9fe13
> <https://github.com/weewx/weewx/commit/ea9fe134a242ddd0ea1df9e1c4aa4ddea1542ff6>
>
> -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 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 allows negative
>> intervals.
>>
>> -tk
>>
>>
>>
>> On Fri, Sep 14, 2018 at 3:53 PM Chris Manton  wrote:
>>
>>> 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
>>> diff --git a/bin/weewx/drivers/wmr200.py b/bin/weewx/drivers/wmr200.py
>>> index eaab5a14..62b743e0 100644
>>> --- a/bin/weewx/drivers/wmr200.py
>>> +++ b/bin/weewx/drivers/wmr200.py
>>> @@ -1943,7 +1943,13 @@ class WMR200(weewx.drivers.AbstractDevice):
>>>  timestamp_packet_interval = timestamp_packet_current \
>>>  - timestamp_packet_previous
>>>
>>> -if pkt.timestamp_record() > (timestamp_packet_previous
>>> +if timestamp_packet_interval < 0:
>>> +loginf(('genStartup() Discarding received archive'
>>> +' record that presented out-of-order'
>>> +' current_threshold:%s previous_timestamp:%s')
>>> +%
>>> (weeutil.weeutil.timestamp_to_string(pkt.timestamp_record())
>>> +
>>>  weeutil.weeutil.timestamp_to_string(timestamp_packet_previous)))
>>> +elif pkt.timestamp_record() > (timestamp_packet_previous
>>>   + self._archive_threshold):
>>>  loginf(('genStartup() Discarding received archive'
>>>  ' record exceeding archive interval cnt:%d'
>>>
>>> On Friday, September 14, 2018 at 6:07:48 AM UTC-7, Thomas Keffer wrote:
>>>>
>>>> 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 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 Thomas Keffer 
>>>>> wrote:
>>>>>
>>>>>> 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 /var/lib/weewx/weewx.sdb*
>>>>>> sqlite> *SELECT datetime(dateTime, 'unixepoch','localtime'),
>>>>>> interval FROM archive WHERE interval<0;*
>>>>>>
>>>>>> -tk
>>

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 Thomas Keffer  wrote:

> 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 /var/lib/weewx/weewx.sdb*
> sqlite> *SELECT datetime(dateTime, 'unixepoch','localtime'), interval
> FROM archive WHERE interval<0;*
>
> -tk
>
> On Fri, Sep 14, 2018 at 5:06 AM Rahul Bedi  wrote:
>
>> 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 00:00:00|2797065.0|86400
>> 2018-08-10 00:00:00|2693187.0|86400
>> 2018-08-11 00:00:00|2981601.0|86400
>> 2018-08-12 00:00:00|3869136.0|86400
>> 2018-08-13 00:00:00|3632787.0|86400
>> 2018-08-14 00:00:00|2651829.0|86400
>> 2018-08-15 00:00:00|2104410.0|86400
>> 2018-08-16 00:00:00|3682674.0|86400
>> 2018-08-17 00:00:00|342.0|86400
>> 2018-08-18 00:00:00|3855531.0|86400
>> 2018-08-19 00:00:00|3875121.0|86400
>> 2018-08-20 00:00:00|3915861.0|86400
>> 2018-08-21 00:00:00|3523719.0|86400
>> 2018-08-22 00:00:00|1637909.95179334|85620
>> 2018-08-23 00:00:00|506702.215048778|25380
>> 2018-08-24 00:00:00|523285.18735593|101340
>> 2018-08-25 00:00:00|2047231.90482286|92280
>> 2018-08-26 00:00:00|2207680.59885907|85800
>> 2018-08-27 00:00:00|2112653.43729687|78000
>> 2018-08-28 00:00:00|1927695.38113441|85200
>> 2018-08-29 00:00:00|1696867.80614767|76740
>> 2018-08-30 00:00:00|1892572.6564943|85500
>> 2018-08-31 00:00:00|1669207.56530998|86100
>> 2018-09-01 00:00:00|1882876.90336366|85080
>> 2018-09-02 00:00:00|1552040.97205686|86100
>> 2018-09-03 00:00:00|1550916.37957731|86100
>> 2018-09-04 00:00:00|1093704.34743737|85740
>> 2018-09-05 00:00:00|1688380.4274756|86100
>> 2018-09-06 00:00:00|2349485.94738889|86100
>> 2018-09-07 00:00:00|2676307.36370007|85560
>> 2018-09-08 00:00:00|2198034.86178985|86100
>> 2018-09-09 00:00:00|-7107216.29856356|-302280
>> 2018-09-10 00:00:00|288713.672694377|85560
>> 2018-09-11 00:00:00|351094.880509644|85860
>> 2018-09-12 00:00:00|441249.222795585|85500
>> 2018-09-13 00:00:00|60033.1634844758|85620
>> 2018-09-14 00:00:00|21222.2555021576|62820
>>
>> I am guessing that the negative values above may be the culprit. How are
>> these populated in the archive_day_wind table or should I just edit these
>> values out ?
>>
>> - Rahul
>>
>>
>> On Fri, Sep 14, 2018 at 5:19 PM Thomas Keffer  wrote:
>>
>>> 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> *SELECT datetime(dateTime, 'unixepoch','localtime'),
>>> wsquaresum, sumtime FROM archive_day_wind WHERE dateTime > 1533081600;*
>>>
>>> This will show all values from (roughly) 1-August (about 45 values). If
>>> the bad value is before that, we'll have to use a different strategy,
>>> rather than go looking for a needle in a haystack.
>>>
>>> -tk
>>>
>>> On Thu, Sep 13, 2018 at 11:35 PM Rahul Bedi 
>>> wrote:
>>>
>>>> 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 $archive_data
>>>> <   $archive.wind.rms.formatted
>>>> <   #end for
>>>> < 
>>>>
>>>> $ diff hilo.inc hilo.14092018.inc
>>>>
>>>> 132a

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 00:00:00|2797065.0|86400
2018-08-10 00:00:00|2693187.0|86400
2018-08-11 00:00:00|2981601.0|86400
2018-08-12 00:00:00|3869136.0|86400
2018-08-13 00:00:00|3632787.0|86400
2018-08-14 00:00:00|2651829.0|86400
2018-08-15 00:00:00|2104410.0|86400
2018-08-16 00:00:00|3682674.0|86400
2018-08-17 00:00:00|342.0|86400
2018-08-18 00:00:00|3855531.0|86400
2018-08-19 00:00:00|3875121.0|86400
2018-08-20 00:00:00|3915861.0|86400
2018-08-21 00:00:00|3523719.0|86400
2018-08-22 00:00:00|1637909.95179334|85620
2018-08-23 00:00:00|506702.215048778|25380
2018-08-24 00:00:00|523285.18735593|101340
2018-08-25 00:00:00|2047231.90482286|92280
2018-08-26 00:00:00|2207680.59885907|85800
2018-08-27 00:00:00|2112653.43729687|78000
2018-08-28 00:00:00|1927695.38113441|85200
2018-08-29 00:00:00|1696867.80614767|76740
2018-08-30 00:00:00|1892572.6564943|85500
2018-08-31 00:00:00|1669207.56530998|86100
2018-09-01 00:00:00|1882876.90336366|85080
2018-09-02 00:00:00|1552040.97205686|86100
2018-09-03 00:00:00|1550916.37957731|86100
2018-09-04 00:00:00|1093704.34743737|85740
2018-09-05 00:00:00|1688380.4274756|86100
2018-09-06 00:00:00|2349485.94738889|86100
2018-09-07 00:00:00|2676307.36370007|85560
2018-09-08 00:00:00|2198034.86178985|86100
2018-09-09 00:00:00|-7107216.29856356|-302280
2018-09-10 00:00:00|288713.672694377|85560
2018-09-11 00:00:00|351094.880509644|85860
2018-09-12 00:00:00|441249.222795585|85500
2018-09-13 00:00:00|60033.1634844758|85620
2018-09-14 00:00:00|21222.2555021576|62820

I am guessing that the negative values above may be the culprit. How are
these populated in the archive_day_wind table or should I just edit these
values out ?

- Rahul


On Fri, Sep 14, 2018 at 5:19 PM Thomas Keffer  wrote:

> 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> *SELECT datetime(dateTime, 'unixepoch','localtime'), wsquaresum,
> sumtime FROM archive_day_wind WHERE dateTime > 1533081600;*
>
> This will show all values from (roughly) 1-August (about 45 values). If
> the bad value is before that, we'll have to use a different strategy,
> rather than go looking for a needle in a haystack.
>
> -tk
>
> On Thu, Sep 13, 2018 at 11:35 PM Rahul Bedi 
> wrote:
>
>> 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 $archive_data
>> <   $archive.wind.rms.formatted
>> <   #end for
>> < 
>>
>> $ diff hilo.inc hilo.14092018.inc
>>
>> 132a133,140
>> >   
>> > $obs.label.wind_rms
>> > #for $archive in $archive_data
>> > 
>> >   $archive[1].wind.rms.formatted
>> > #end for
>> > $unit.label.wind
>> >   
>>
>> Apart from this any file referring to rms were exactly the same as the
>> original install. Attaching skin.conf with this message.
>>
>> As expected the problem is gone but rms is not getting reported. Which
>> means the issue still stays.
>>
>> Could you help me with what fields in the archive are referred to by rms
>> ? I can try to manually check for any value discrepancy.
>>
>> Thanks.
>>
>> - Rahul
>>
>>
>> On Fri, Sep 14, 2018 at 9:14 AM Rahul Bedi 
>> wrote:
>>
>>> 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 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.
>>>> T

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 $archive_data
<   $archive.wind.rms.formatted
<   #end for
< 

$ diff hilo.inc hilo.14092018.inc

132a133,140
>   
> $obs.label.wind_rms
> #for $archive in $archive_data
> 
>   $archive[1].wind.rms.formatted
> #end for
> $unit.label.wind
>   

Apart from this any file referring to rms were exactly the same as the
original install. Attaching skin.conf with this message.

As expected the problem is gone but rms is not getting reported. Which
means the issue still stays.

Could you help me with what fields in the archive are referred to by rms ?
I can try to manually check for any value discrepancy.

Thanks.

- Rahul


On Fri, Sep 14, 2018 at 9:14 AM Rahul Bedi  wrote:

> 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 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 tag in one of the seasons
>> .tmpl or .inc files. The seasons skin only uses the .rms tag with the
>> WeeWX wind field. As Tom indicated .rms only works against the wind
>> field, if your changes have used the .rms tag against another field then
>> this could be the cause. I suggest you go through all of your changes to
>> the seasons skin files and see what fields are being used with the .rms
>> tag. Until we know for sure, and given you seem to have made changes to the
>> skin, we will likely be chasing our tails.
>>
>> Gary
>>
>> --
>> 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/LWmSpcVfdmo/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> weewx-user+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


skin.conf
Description: Binary data


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 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 tag in one of the seasons .tmpl
> or .inc files. The seasons skin only uses the .rms tag with the WeeWX wind
> field. As Tom indicated .rms only works against the wind field, if your
> changes have used the .rms tag against another field then this could be
> the cause. I suggest you go through all of your changes to the seasons skin
> files and see what fields are being used with the .rms tag. Until we know
> for sure, and given you seem to have made changes to the skin, we will
> likely be chasing our tails.
>
> Gary
>
> --
> 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/LWmSpcVfdmo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


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:

> 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
>> 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" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to weewx-user+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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/LWmSpcVfdmo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


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 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 a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/weewx-user/LWmSpcVfdmo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[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 
2018-09-13 21:25:00 IST (1536854100) to daily summary in 'weewx.sdb'
Sep 13 21:25:30 PrideWeatherStation weewx[1608]: cheetahgenerator: Generate 
failed with exception ''
Sep 13 21:25:30 PrideWeatherStation weewx[1608]: cheetahgenerator:  
Ignoring template /etc/weewx/skins/Seasons/index.html.tmpl
Sep 13 21:25:30 PrideWeatherStation weewx[1608]: cheetahgenerator:  
Reason: math domain error
Sep 13 21:25:30 PrideWeatherStation weewx[1608]:   Traceback (most 
recent call last):
Sep 13 21:25:30 PrideWeatherStation weewx[1608]: File 
"/usr/share/weewx/weewx/cheetahgenerator.py", line 330, in generate
Sep 13 21:25:30 PrideWeatherStation weewx[1608]:   print >> _file, 
compiled_template
Sep 13 21:25:30 PrideWeatherStation weewx[1608]: File 
"/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in 
__str__
Sep 13 21:25:30 PrideWeatherStation weewx[1608]:   rc = 
getattr(self, mainMethName)()
Sep 13 21:25:30 PrideWeatherStation weewx[1608]: File 
"_etc_weewx_skins_Seasons_index_html_tmpl.py", line 208, in respond
Sep 13 21:25:30 PrideWeatherStation weewx[1608]: File 
"/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1615, in 
_handleCheetahInclude
Sep 13 21:25:30 PrideWeatherStation weewx[1608]:   
self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
Sep 13 21:25:30 PrideWeatherStation weewx[1608]: File 
"_etc_weewx_skins_Seasons_hilo_inc.py", line 414, in respond
Sep 13 21:25:30 PrideWeatherStation weewx[1608]: File 
"/usr/share/weewx/weewx/tags.py", line 329, in __getattr__
Sep 13 21:25:30 PrideWeatherStation weewx[1608]:   return 
self._do_query(aggregate_type)
Sep 13 21:25:30 PrideWeatherStation weewx[1608]: File 
"/usr/share/weewx/weewx/tags.py", line 343, in _do_query
Sep 13 21:25:30 PrideWeatherStation weewx[1608]:   val=val, 
**self.option_dict)
Sep 13 21:25:30 PrideWeatherStation weewx[1608]: File 
"/usr/share/weewx/weewx/wxmanager.py", line 60, in getAggregate
Sep 13 21:25:30 PrideWeatherStation weewx[1608]:   return 
weewx.manager.DaySummaryManager.getAggregate(self, timespan, obs_type, 
aggregateType, **option_dict)
Sep 13 21:25:30 PrideWeatherStation weewx[1608]: File 
"/usr/share/weewx/weewx/manager.py", line 1314, in getAggregate
Sep 13 21:25:30 PrideWeatherStation weewx[1608]:   _result = 
math.sqrt(_row[0]/_row[1]) if _row[1] else None
Sep 13 21:25:30 PrideWeatherStation weewx[1608]:   ValueError: math 
domain error
Sep 13 21:25:32 PrideWeatherStation weewx[1608]: cheetahgenerator: Generate 
failed with exception ''
Sep 13 21:25:32 PrideWeatherStation weewx[1608]: cheetahgenerator:  
Ignoring template /etc/weewx/skins/Seasons/statistics.html.tmpl
Sep 13 21:25:32 PrideWeatherStation weewx[1608]: cheetahgenerator:  
Reason: math domain error
Sep 13 21:25:32 PrideWeatherStation weewx[1608]:   Traceback (most 
recent call last):
Sep 13 21:25:32 PrideWeatherStation weewx[1608]: File 
"/usr/share/weewx/weewx/cheetahgenerator.py", line 330, in generate
Sep 13 21:25:32 PrideWeatherStation weewx[1608]:   print >> _file, 
compiled_template
Sep 13 21:25:32 PrideWeatherStation weewx[1608]: File 
"/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in 
__str__
Sep 13 21:25:32 PrideWeatherStation weewx[1608]:   rc = 
getattr(self, mainMethName)()
Sep 13 21:25:32 PrideWeatherStation weewx[1608]: File 
"_etc_weewx_skins_Seasons_statistics_html_tmpl.py", line 143, in respond
Sep 13 21:25:32 PrideWeatherStation weewx[1608]: File 
"/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1615, in 
_handleCheetahInclude
Sep 13 21:25:32 PrideWeatherStation weewx[1608]:   
self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
Sep 13 21:25:32 PrideWeatherStation weewx[1608]: File 
"_etc_weewx_skins_Seasons_statistics_inc.py", line 1043, in respond
Sep 13 21:25:32 PrideWeatherStation weewx[1608]: File 
"_etc_weewx_skins_Seasons_statistics_inc.py", line 427, in __errorCatcher52
Sep 13 21:25:32 PrideWeatherStation weewx[1608]: File "", 
line 1, in 
Sep 13 21:25:32 PrideWeatherStation weewx[1608]: File 
"/usr/share/weewx/weewx/tags.py", line 329, in __getattr__
Sep 13 21:25:32 PrideWeatherStation weewx[1608]:   return 
self._do_query(aggregate_type)
Sep 13 21:25:32 PrideWeatherStation weewx[1608]: File 
"/usr/share/weewx/weewx/tags.py", line 343, in _do_query
Sep 13 21:25:32 PrideWeatherStation weewx[1608]:   val=val, 
**self.option_dict)
Sep 13 21:25:32 PrideWeatherStation weewx[1608]: File