Re: [weewx-user] Re: table archive_day_barometer already exists

2018-12-14 Thread Colin Larsen
Thanks Dave, appreciate the share, I'll give it a try as well.

Cheers
Colin

On Sat, 15 Dec 2018, 11:51  Dave,
>
> Thanks for doing this and sharing it. I plan to try it out over the
> weekend. I'll let you know how it works in my setup!
> phil
>
> On Friday, December 14, 2018 at 5:46:26 PM UTC-5, Dave Harper wrote:
>>
>> Phil (and anyone else interested),
>>
>> The script is now written and I have spent most of the day testing it.
>> It has currently been running for about three hours now and seems to be
>> running correctly.  I'm attaching the script and a set of instructions on
>> how to configure and run it.  The script creates and maintains a "last
>> known good" copy of the weewx.sdb database at whatever interval the user
>> specifies.  It also attempts to be as robust as possible, notifying the
>> user (via email) of any exception conditions rather than simply "failing
>> silently".  If you (or anyone else) runs it, I'd be interested in getting
>> feedback as to any issues discovered.
>>
>> Dave
>>
> --
> 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 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] Second crash after 11 days

2018-12-14 Thread steeple ian
Steve,

Try installing Webmin. It is an open source Control Panel style
application. It makes the creation of crons an absolute doddle.

Ian

On Mon, Nov 19, 2018 at 11:59 PM Steve2Q  wrote:

> Vince..having lots of problems creating a cron. I have done it before, so
> that's my issue. I decided to just run the script manually and it runs, but
> I have to log on as root in order to run it. Anyway, not really a Weewx
> issue, so I will research it further. I will run the command daily until I
> get another system crash.
>
> Steve
>
> --
> 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 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] Re: table archive_day_barometer already exists

2018-12-14 Thread kutzenco
Dave,

Thanks for doing this and sharing it. I plan to try it out over the 
weekend. I'll let you know how it works in my setup!
phil

On Friday, December 14, 2018 at 5:46:26 PM UTC-5, Dave Harper wrote:
>
> Phil (and anyone else interested),
>
> The script is now written and I have spent most of the day testing it.  It 
> has currently been running for about three hours now and seems to be 
> running correctly.  I'm attaching the script and a set of instructions on 
> how to configure and run it.  The script creates and maintains a "last 
> known good" copy of the weewx.sdb database at whatever interval the user 
> specifies.  It also attempts to be as robust as possible, notifying the 
> user (via email) of any exception conditions rather than simply "failing 
> silently".  If you (or anyone else) runs it, I'd be interested in getting 
> feedback as to any issues discovered.
>
> Dave
>

-- 
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] Re: table archive_day_barometer already exists

2018-12-14 Thread Dave Harper
Phil (and anyone else interested),

The script is now written and I have spent most of the day testing it.  It 
has currently been running for about three hours now and seems to be 
running correctly.  I'm attaching the script and a set of instructions on 
how to configure and run it.  The script creates and maintains a "last 
known good" copy of the weewx.sdb database at whatever interval the user 
specifies.  It also attempts to be as robust as possible, notifying the 
user (via email) of any exception conditions rather than simply "failing 
silently".  If you (or anyone else) runs it, I'd be interested in getting 
feedback as to any issues discovered.

Dave

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


Instructions.pdf
Description: Adobe PDF document
#! /usr/bin/env python3


#  #
#  sdbCheck.py #
#  #
# The primary purpose of this script is to create and maintain a "last known   #
# good" copy of the weeWX database.  To do this, it makes a copy of the weeWX  #
# database in the script starting directory (waiting, if necessary, until the  #
# database is not being updated).  The integrity of the copy is checked using  #
# sqlite3 and, if it is good, it replaces the previous copy in the ./Backup#
# directory.  If a problem is found an email is sent to the user.  A small log #
# file is also created indicating the results of the run.  #
#  #
# The script is intended to be run periodically by the operating system using  #
# whatever support the OS provides (cron, Task Scheduler, etc.).  It is also   #
# intended to run as "safely" as possible without user intervention, so the#
# first thing the script does is to verify that the previous run happened when #
# it was supposed to and that it completed correctly.  If not, an email is #
# sent to the user.# 
#  #
# There are a number of script options that can be configured by the user, #
# such as email address, period of weeWX updates, etc.  These are listed below #
# and must be set prior to operation.  To assist in verifying that they are#
# set correctly, the script can be manually started on the command line with   #
# anything as a parameter.  When the script is started, it checks the length   #
# of sys.argv and, if it is more than 1, it will perform a configuration check #
# and then exit after printing the results on the screen and sending a test#
# email.   #
#  #
# For support issues, please contact d...@dlharper.net.  Feel free to modify   #
# and / or redistribute this script.  If you add a useful feature, please let  #
# me know. #
#  #




# Import the modules that will be used throughout this script. #


import sys
import os
import os.path
import time
from datetime import datetime
import shutil
from shutil import copyfile



# The following options can be used to tailor the script to a specific #
# environment. #


WEEWX_DIR = ""  # location of the weewx.sdb file
WEEWX_UPDATE = -1  # number of seconds between weewx.sdb updates
SCRIPT_UPDATE = -1   # number of seconds between runs of this script
INSTALL_DIR = ""   # full path to where this script is installed
EMAIL_ADDR = ""# login address on email host
EMAIL_PASSWD = ""# email host login password
EMAIL_HOST = "" # email host
EMAIL_PORT = -1

Re: [weewx-user] Second crash after 11 days

2018-12-14 Thread Steve2Q
Vince..I disabled the gauges (under [Engine][[Services]] and will look at 
the output from top as it runs this way. If it doesn't break down after at 
least a month, I guess I will just forget about the Steel Gauges (but I do 
like the appearance). I wonder if it because I have such a short update 
time (2 seconds) which equals my Loop output. Anyway, it is not working now 
and time will tell.

Steve

-- 
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] Second crash after 11 days

2018-12-14 Thread vince
On Thursday, December 13, 2018 at 6:50:26 PM UTC-8, Steve2Q wrote:
>
> Vince and Gary..I forgot that I do have one other program running...Real 
> Time Gauges. Maybe that is the problem. Would just disabling RTG under 
> [Engine] [[Services]] be sufficient to have "plain vanilla", or should I do 
> a total reinstall?


I continue to blame the gauges.

Again, if you aren't willing to go pure-unaltered-nothing-extra weewx to 
stabilize your system, I can't be willing to spend more time trying to 
debug this one.  
 

-- 
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] Re: Belchertown skin for weewx now available!

2018-12-14 Thread steepleian
Phil
I am away from home for a few days and can’t access my syslog. However I 
suspect a Pi issue here. I normally run on a low end spec Intel Nuc with 
Raspbian Desktop. Transferred to a Pi 3B+ temporarily to do some maintainence 
work on the Nuc. Never experienced this issue until the Pi this time around.
Ian

-- 
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] Re: outTemp - Caught unrecoverable exception in engine

2018-12-14 Thread Roberto Botero
Well after restarting the raspberry a couple of times it seems I'm up and 
running.  My webpage still has those wrong outTemp values in the weekly 
summary which I thought I had cleaned in the database but current and NOAA 
tables are correct.
Thank you everyone for your help!

Roberto

On Friday, December 14, 2018 at 8:54:40 AM UTC, Roberto Botero wrote:
>
> Tom, Gary
>
> Thank you!  Gary, following your instructions weewx is downloading data 
> from the station and publishing to WOW, OWM and WU but something else is 
> still not correct:
>
> Dec 14 08:52:53 RPi-Weatherstation weewx[1428]: vantage: LOOP try #3; 
> error: Expected to read 99 chars; got 0 instead
> Dec 14 08:52:53 RPi-Weatherstation weewx[1428]: vantage: Requesting 200 
> LOOP packets.
> Dec 14 08:52:54 RPi-Weatherstation weewx[1428]: vantage: Retry  #0 failed
> Dec 14 08:52:54 RPi-Weatherstation weewx[1428]: vantage: Rude wake up of 
> console successful
> Dec 14 08:52:59 RPi-Weatherstation weewx[1428]: vantage: LOOP try #4; 
> error: Expected to read 99 chars; got 0 instead
> Dec 14 08:52:59 RPi-Weatherstation weewx[1428]: vantage: LOOP max tries 
> (4) exceeded.
> Dec 14 08:52:59 RPi-Weatherstation weewx[1428]: engine: Main loop exiting. 
> Shutting engine down.
> Dec 14 08:52:59 RPi-Weatherstation weewx[1428]: restx: Shut down OWM 
> thread.
> Dec 14 08:52:59 RPi-Weatherstation weewx[1428]: restx: Shut down WOW 
> thread.
> Dec 14 08:52:59 RPi-Weatherstation weewx[1428]: restx: Shut down 
> Wunderground-PWS thread.
> Dec 14 08:52:59 RPi-Weatherstation weewx[1428]: restx: Shut down 
> StationRegistry thread.
> Dec 14 08:52:59 RPi-Weatherstation weewx[1428]: engine: Caught 
> WeeWxIOError: Max tries exceeded while getting LOOP data.
> Dec 14 08:52:59 RPi-Weatherstation weewx[1428]:   Waiting 60 
> seconds then retrying...
>
> I tried running all historic reports using wee_reports and it did but 
> produced this error in the log:
>
> root@RPi-Weatherstation:/home/weewx# ./bin/wee_reports weewx.conf
> Using configuration file weewx.conf
> Generating for all time
> Traceback (most recent call last):
>   File "/home/weewx/bin/weewx/reportengine.py", line 239, in run
> obj.start()
>   File "/home/weewx/bin/weewx/reportengine.py", line 273, in start
> self.run()
>   File "/home/weewx/bin/weewx/cheetahgenerator.py", line 158, in run
> ngen = self.generate(gen_dict[section_name], self.gen_ts)
>   File "/home/weewx/bin/weewx/cheetahgenerator.py", line 232, in generate
> ngen += self.generate(section[subsection], gen_ts)
>   File "/home/weewx/bin/weewx/cheetahgenerator.py", line 232, in generate
> ngen += self.generate(section[subsection], gen_ts)
>   File "/home/weewx/bin/weewx/cheetahgenerator.py", line 320, in generate
> default_binding)
>   File "/home/weewx/bin/weewx/cheetahgenerator.py", line 372, in 
> _getSearchList
> searchList += obj.get_extension_list(timespan, db_lookup)
>   File "/home/weewx/bin/user/wdSearchX3.py", line 1030, in 
> get_extension_list
> avwind120_vh = ValueHelper((avwind120_vt[0][0], avwind120_vt[1], 
> avwind120_vt[2]),
> IndexError: list index out of range
>
>
>
>
> On Friday, December 14, 2018 at 1:54:53 AM UTC, gjr80 wrote:
>>
>> Indeed weeWX-WD is not checking the packet before calculating derived 
>> obs. The fix is to download and install weewxwd3.py v1.04. I don't have 
>> a packaged v1.04 extension yet so you can just update weewxwd3.py as 
>> follows:
>>
>> 1. move the existing weewxwd3.py aside:
>>
>> $ sudo mv /home/weewx/bin/user/weewxwd3.py /home/weewx/bin/user/
>> weewxwd3_1_03.py
>>
>> 2. download weewxwd3.py v1.04:
>>
>> $ sudo wget -P /home/weewx/bin/user https://
>> raw.githubusercontent.com/gjr80/weewx-weewx-wd/master/bin/user/weewxwd3.py
>>
>> 3. restart weeWX
>>
>> 4. monitor the log to ensure there are no further problems.
>>
>> It's worth noting the issue was nothing to do with your database 
>> contents, rather weeWX was running in catchup mode to pull any unarchived 
>> records from your console and archive them. These archive records were 
>> missing weeWX field outTemp. This is somewhat unusual as Vantage 
>> stations include all obs in each archive record and therefore you would 
>> normally expect to see outTemp in every archive record. You might want 
>> to keep an eye on your station or run weeWX directly 
>>  to ensure 
>> everything is working as it should.
>>
>> Gary
>>
>> On Friday, 14 December 2018 11:23:29 UTC+10, Thomas Keffer wrote:
>>>
>>> This appears to be a flaw in the weewx-wd extension. It does not check 
>>> for missing values before attempting to calculate humidex.
>>>
>>> You'll have to check with the author of the extension. 
>>>
>>> -tk
>>>
>>> On Thu, Dec 13, 2018 at 9:24 AM Roberto Botero  
>>> wrote:
>>>
 Well after cleaning columns outTemp, dewpoint, windchill, heatindex in 
 the archive table of weewx.sdb, --droping the dailies and rebuilding them, 
 I still 

Re: [weewx-user] Re: outTemp - Caught unrecoverable exception in engine

2018-12-14 Thread Roberto Botero
Tom, Gary

Thank you!  Gary, following your instructions weewx is downloading data 
from the station and publishing to WOW, OWM and WU but something else is 
still not correct:

Dec 14 08:52:53 RPi-Weatherstation weewx[1428]: vantage: LOOP try #3; 
error: Expected to read 99 chars; got 0 instead
Dec 14 08:52:53 RPi-Weatherstation weewx[1428]: vantage: Requesting 200 
LOOP packets.
Dec 14 08:52:54 RPi-Weatherstation weewx[1428]: vantage: Retry  #0 failed
Dec 14 08:52:54 RPi-Weatherstation weewx[1428]: vantage: Rude wake up of 
console successful
Dec 14 08:52:59 RPi-Weatherstation weewx[1428]: vantage: LOOP try #4; 
error: Expected to read 99 chars; got 0 instead
Dec 14 08:52:59 RPi-Weatherstation weewx[1428]: vantage: LOOP max tries (4) 
exceeded.
Dec 14 08:52:59 RPi-Weatherstation weewx[1428]: engine: Main loop exiting. 
Shutting engine down.
Dec 14 08:52:59 RPi-Weatherstation weewx[1428]: restx: Shut down OWM thread.
Dec 14 08:52:59 RPi-Weatherstation weewx[1428]: restx: Shut down WOW thread.
Dec 14 08:52:59 RPi-Weatherstation weewx[1428]: restx: Shut down 
Wunderground-PWS thread.
Dec 14 08:52:59 RPi-Weatherstation weewx[1428]: restx: Shut down 
StationRegistry thread.
Dec 14 08:52:59 RPi-Weatherstation weewx[1428]: engine: Caught 
WeeWxIOError: Max tries exceeded while getting LOOP data.
Dec 14 08:52:59 RPi-Weatherstation weewx[1428]:   Waiting 60 
seconds then retrying...

I tried running all historic reports using wee_reports and it did but 
produced this error in the log:

root@RPi-Weatherstation:/home/weewx# ./bin/wee_reports weewx.conf
Using configuration file weewx.conf
Generating for all time
Traceback (most recent call last):
  File "/home/weewx/bin/weewx/reportengine.py", line 239, in run
obj.start()
  File "/home/weewx/bin/weewx/reportengine.py", line 273, in start
self.run()
  File "/home/weewx/bin/weewx/cheetahgenerator.py", line 158, in run
ngen = self.generate(gen_dict[section_name], self.gen_ts)
  File "/home/weewx/bin/weewx/cheetahgenerator.py", line 232, in generate
ngen += self.generate(section[subsection], gen_ts)
  File "/home/weewx/bin/weewx/cheetahgenerator.py", line 232, in generate
ngen += self.generate(section[subsection], gen_ts)
  File "/home/weewx/bin/weewx/cheetahgenerator.py", line 320, in generate
default_binding)
  File "/home/weewx/bin/weewx/cheetahgenerator.py", line 372, in 
_getSearchList
searchList += obj.get_extension_list(timespan, db_lookup)
  File "/home/weewx/bin/user/wdSearchX3.py", line 1030, in 
get_extension_list
avwind120_vh = ValueHelper((avwind120_vt[0][0], avwind120_vt[1], 
avwind120_vt[2]),
IndexError: list index out of range




On Friday, December 14, 2018 at 1:54:53 AM UTC, gjr80 wrote:
>
> Indeed weeWX-WD is not checking the packet before calculating derived obs. 
> The fix is to download and install weewxwd3.py v1.04. I don't have a 
> packaged v1.04 extension yet so you can just update weewxwd3.py as 
> follows:
>
> 1. move the existing weewxwd3.py aside:
>
> $ sudo mv /home/weewx/bin/user/weewxwd3.py /home/weewx/bin/user/
> weewxwd3_1_03.py
>
> 2. download weewxwd3.py v1.04:
>
> $ sudo wget -P /home/weewx/bin/user https://
> raw.githubusercontent.com/gjr80/weewx-weewx-wd/master/bin/user/weewxwd3.py
>
> 3. restart weeWX
>
> 4. monitor the log to ensure there are no further problems.
>
> It's worth noting the issue was nothing to do with your database contents, 
> rather weeWX was running in catchup mode to pull any unarchived records 
> from your console and archive them. These archive records were missing 
> weeWX field outTemp. This is somewhat unusual as Vantage stations include 
> all obs in each archive record and therefore you would normally expect to 
> see outTemp in every archive record. You might want to keep an eye on 
> your station or run weeWX directly 
>  to ensure 
> everything is working as it should.
>
> Gary
>
> On Friday, 14 December 2018 11:23:29 UTC+10, Thomas Keffer wrote:
>>
>> This appears to be a flaw in the weewx-wd extension. It does not check 
>> for missing values before attempting to calculate humidex.
>>
>> You'll have to check with the author of the extension. 
>>
>> -tk
>>
>> On Thu, Dec 13, 2018 at 9:24 AM Roberto Botero  
>> wrote:
>>
>>> Well after cleaning columns outTemp, dewpoint, windchill, heatindex in 
>>> the archive table of weewx.sdb, --droping the dailies and rebuilding them, 
>>> I still get the same error message when I restart weewx.  I am going to 
>>> have to wipe out my sdcard and boot from a backup I did last week.  
>>> Fortunately for me the logger in my Vantage Vue has data going back to the 
>>> day before the backup.  What worries me is that the same corrupted data 
>>> will be in the logger.  If I set more stringent stdQC parameters, will the 
>>> import avoid the problems I am having?
>>>
>>> Dec 13 17:19:28 RPi-Weatherstation weewx[20968]: vantage: Retrieving 25 
>>> page(s); starting index=