Re: [weewx-user] Watchdog example to warn when station is not reporting for any reason

2019-05-02 Thread Leon Shaner
Mikael,

I would say watchdogsecs=720 is more than conservative.  It is just to catch a 
case where loss of comms happens very close to the cron execution and another 
cron event fires just before your first record is posted after a reboot.  Even 
that seems unlikely because the cron interval aligns with the reboot and you 
should have a record within 2 mins after that.  So 720 will always be fine, but 
even 600 should almost always be fine.  I'd have to think a lot harder for a 
definite case where exactly 600 would cause a problem.  Rare to never, most 
likely.

As for mailx it would get pretty complicated if I had to add support for lots 
of different mail utilities, none of which agree on the arguments or how to 
pass the body.
It's kinda the point of mailx, to abstract away from whatever is happening 
underneath.

Easier for me to just to recommend:

$ sudo apt-get install mailutils

=D

See if that's enough for you and I can add it to the readme.  =D
I can put a check for it in the script, too.  =D

About the USB auto mount, I expect there is a media manager package tied to the 
graphical login on the RPI.   If you are running without the graphical login, 
there may be other options.  I will do some research and contact you off alias.

Regards,
\Leon
--
Leon Shaner :: Dearborn, Michigan (iPhone)




Regards,
Leon
--
Leon Shaner :: Dearborn, Michigan (iPhone)
https://twitter.com/AEtherZcythe
> On May 2, 2019, at 3:56 PM, pliggen...@gmail.com wrote:
> 
> Hi Leon, 
> 
> Ok, good to hear that it was a left-over and that you updated it!
> 
> I did a reboot of the system and found that it took aprox. 2min to get the 
> first "added" message from weewx, so I set the watchdogsecs to 720. Would 
> that be ok? What could happen if the time is set to early och to late? 
> 
> I had toogled them both to 1 at the same time.
> 
> Here's the part of var/log/weewx.log when it occured:
> 
> tor  2 maj 2019 15:45:06 CEST Missing records:
> tor  2 maj 2019 15:45:06 CEST 2019-05-02 12:37:05 CEST (1556793425); 29.224"; 
>  47.1F;  65%; 3.8 mph; 135 deg; 5.4 mph gust;  36.0F;  N/A  rain  
> ...published.
> tor  2 maj 2019 15:45:06 CEST 2019-05-02 12:47:05 CEST (1556794025); 29.231"; 
>  46.6F;  63%; 6.0 mph; 225 deg; 7.6 mph gust;  34.7F; 0.00" rain  
> ...published.
> tor  2 maj 2019 15:45:06 CEST 2019-05-02 13:16:53 CEST (1556795813); 29.231"; 
>  48.2F;  57%;10.7 mph;  45 deg;14.5 mph gust;  33.7F;  N/A  rain  
> ...published.
> tor  2 maj 2019 15:45:06 CEST 2019-05-02 13:36:47 CEST (1556797007); 29.240"; 
>  48.2F;  51%; 8.3 mph; 315 deg; 9.8 mph gust;  30.9F;  N/A  rain  
> ...published.
> tor  2 maj 2019 15:45:06 CEST 2019-05-02 13:46:47 CEST (1556797607); 29.241"; 
>  48.0F;  51%; 5.4 mph; 225 deg; 7.6 mph gust;  30.8F; 0.00" rain  
> ...published.
> tor  2 maj 2019 15:45:06 CEST 2019-05-02 14:17:05 CEST (1556799425); 29.251"; 
>  49.3F;  45%; 3.8 mph;   0 deg; 6.0 mph gust;  28.8F;  N/A  rain  
> ...published.
> tor  2 maj 2019 15:45:06 CEST 2019-05-02 14:37:05 CEST (1556800625); 29.249"; 
>  50.0F;  44%; 3.1 mph; 270 deg; 6.9 mph gust;  29.0F;  N/A  rain  
> ...published.
> tor  2 maj 2019 15:45:06 CEST 2019-05-02 14:47:05 CEST (1556801225); 29.248"; 
>  49.3F;  43%; 6.0 mph;   0 deg; 8.3 mph gust;  27.7F; 0.00" rain  
> ...published.
> tor  2 maj 2019 15:45:06 CEST 2019-05-02 15:17:00 CEST (1556803020); 29.244"; 
>  51.3F;  41%; 2.2 mph; 315 deg; 3.8 mph gust;  28.4F;  N/A  rain  
> ...published.
> tor  2 maj 2019 15:45:06 CEST 2019-05-02 15:40:00 CEST (1556804400); 29.247"; 
>  51.5F;  40%; 5.4 mph; 267 deg;10.7 mph gust;  28.0F; 0.00" rain  
> ...published.
> tor  2 maj 2019 16:12:01 CEST WeeWX: Watchdog warning notification sent to 
> ...@xx.xxx
> tor  2 maj 2019 16:12:01 CEST WeeWX: Watchdog Restart event timestamp: 
> (1556806321)
> tor  2 maj 2019 16:12:01 CEST WeeWX: Watchdog Stop message: Stopping weewx 
> (via systemctl): weewx.service.
> tor  2 maj 2019 16:12:01 CEST WeeWX: Watchdog Start message: Restarting weewx 
> (via systemctl): weewx.service.
> tor  2 maj 2019 16:31:01 CEST WeeWX: Watchdog warning notification sent to 
> ...@xx.xxx
> tor  2 maj 2019 16:31:01 CEST WeeWX: Watchdog Restart was NOT attempted (last 
> restart was too recent).
> tor  2 maj 2019 16:31:01 CEST WeeWX: Watchdog REBOOT event timestamp: 
> (1556807461)
> tor  2 maj 2019 16:31:01 CEST WeeWX: Watchdog REBOOT notification sent to 
> ...@xx.xxx and REBOOT initiated.
> tor  2 maj 2019 16:39:01 CEST WeeWX: Watchdog warning notification sent to 
> ...@xx.xxx
> tor  2 maj 2019 16:39:01 CEST WeeWX: Watchdog Restart event timestamp: 
> (1556807941)
> tor  2 maj 2019 16:39:01 CEST WeeWX: Watchdog Stop message: Stopping weewx 
> (via systemctl): weewx.service.
> tor  2 maj 2019 16:39:01 CEST WeeWX: Watchdog Start message: Restarting weewx 
> (via systemctl): weewx.service.
> tor  2 maj 2019 17:12:02 CEST WeeWX: Watchdog warning notification sent to 
> ...@xx.xxx
> tor  2 maj 2019 17:12:02 CEST 

[weewx-user] Rsync and skins and servers

2019-05-02 Thread Bruce Butkus
Hi All, 
I have my WeeWx running well on my Pi. The Pi is running a server that 
hosts the pages and I can access from anywhere on my lan. Awesome! 
I also have a Synology server, that can host webpages, and is setup to 
receive incoming traffic on port 80. It also has Rsync capability. So in 
theory, I should be able to start the rsync skin, and copy the html_root 
folder of whatever 'skin' i set in the root folder to copy to my /web/ so 
that I can host it. 
however Im not having any luck getting the working. 
I have a passwordless user on my synology server, set the rsync skin server 
to the ip of the synology server, user name, and html_root to my /weewx/ 
directory, but when it runs that 'skin' it hangs. 
meaning weewx still continues to acquire data, but the reports never run 
again. 
Is there an easier way to do this? I have the weather34 skin running on the 
synology server now, and it easily grabs the realtime.txt from the Pi on 
its webserver, is there a way to just code a page to just call the files on 
the pis server instead? 

-- 
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] Watchdog example to warn when station is not reporting for any reason

2019-05-02 Thread pliggen . is
Hi Leon, 

Ok, good to hear that it was a left-over and that you updated it!

I did a reboot of the system and found that it took aprox. 2min to get the 
first "added" message from weewx, so I set the watchdogsecs to 720. Would 
that be ok? What could happen if the time is set to early och to late? 

I had toogled them both to 1 at the same time.

Here's the part of var/log/weewx.log when it occured:

tor  2 maj 2019 15:45:06 CEST Missing records:
tor  2 maj 2019 15:45:06 CEST 2019-05-02 12:37:05 CEST (1556793425); 
29.224";  47.1F;  65%; 3.8 mph; 135 deg; 5.4 mph gust;  36.0F;  N/A  rain  
...published.
tor  2 maj 2019 15:45:06 CEST 2019-05-02 12:47:05 CEST (1556794025); 
29.231";  46.6F;  63%; 6.0 mph; 225 deg; 7.6 mph gust;  34.7F; 0.00" rain  
...published.
tor  2 maj 2019 15:45:06 CEST 2019-05-02 13:16:53 CEST (1556795813); 
29.231";  48.2F;  57%;10.7 mph;  45 deg;14.5 mph gust;  33.7F;  N/A  rain  
...published.
tor  2 maj 2019 15:45:06 CEST 2019-05-02 13:36:47 CEST (1556797007); 
29.240";  48.2F;  51%; 8.3 mph; 315 deg; 9.8 mph gust;  30.9F;  N/A  rain  
...published.
tor  2 maj 2019 15:45:06 CEST 2019-05-02 13:46:47 CEST (1556797607); 
29.241";  48.0F;  51%; 5.4 mph; 225 deg; 7.6 mph gust;  30.8F; 0.00" rain  
...published.
tor  2 maj 2019 15:45:06 CEST 2019-05-02 14:17:05 CEST (1556799425); 
29.251";  49.3F;  45%; 3.8 mph;   0 deg; 6.0 mph gust;  28.8F;  N/A  rain  
...published.
tor  2 maj 2019 15:45:06 CEST 2019-05-02 14:37:05 CEST (1556800625); 
29.249";  50.0F;  44%; 3.1 mph; 270 deg; 6.9 mph gust;  29.0F;  N/A  rain  
...published.
tor  2 maj 2019 15:45:06 CEST 2019-05-02 14:47:05 CEST (1556801225); 
29.248";  49.3F;  43%; 6.0 mph;   0 deg; 8.3 mph gust;  27.7F; 0.00" rain  
...published.
tor  2 maj 2019 15:45:06 CEST 2019-05-02 15:17:00 CEST (1556803020); 
29.244";  51.3F;  41%; 2.2 mph; 315 deg; 3.8 mph gust;  28.4F;  N/A  rain  
...published.
tor  2 maj 2019 15:45:06 CEST 2019-05-02 15:40:00 CEST (1556804400); 
29.247";  51.5F;  40%; 5.4 mph; 267 deg;10.7 mph gust;  28.0F; 0.00" rain  
...published.
tor  2 maj 2019 16:12:01 CEST WeeWX: Watchdog warning notification sent to 
...@xx.xxx
tor  2 maj 2019 16:12:01 CEST WeeWX: Watchdog Restart event timestamp: 
(1556806321)
tor  2 maj 2019 16:12:01 CEST WeeWX: Watchdog Stop message: Stopping weewx 
(via systemctl): weewx.service.
tor  2 maj 2019 16:12:01 CEST WeeWX: Watchdog Start message: Restarting 
weewx (via systemctl): weewx.service.
tor  2 maj 2019 16:31:01 CEST WeeWX: Watchdog warning notification sent to 
...@xx.xxx
tor  2 maj 2019 16:31:01 CEST WeeWX: Watchdog Restart was NOT attempted 
(last restart was too recent).
tor  2 maj 2019 16:31:01 CEST WeeWX: Watchdog REBOOT event timestamp: 
(1556807461)
tor  2 maj 2019 16:31:01 CEST WeeWX: Watchdog REBOOT notification sent to 
...@xx.xxx and REBOOT initiated.
tor  2 maj 2019 16:39:01 CEST WeeWX: Watchdog warning notification sent to 
...@xx.xxx
tor  2 maj 2019 16:39:01 CEST WeeWX: Watchdog Restart event timestamp: 
(1556807941)
tor  2 maj 2019 16:39:01 CEST WeeWX: Watchdog Stop message: Stopping weewx 
(via systemctl): weewx.service.
tor  2 maj 2019 16:39:01 CEST WeeWX: Watchdog Start message: Restarting 
weewx (via systemctl): weewx.service.
tor  2 maj 2019 17:12:02 CEST WeeWX: Watchdog warning notification sent to 
...@xx.xxx
tor  2 maj 2019 17:12:02 CEST WeeWX: Watchdog Restart event timestamp: 
(1556809922)
tor  2 maj 2019 17:12:02 CEST WeeWX: Watchdog Stop message: Stopping weewx 
(via systemctl): weewx.service.
tor  2 maj 2019 17:12:02 CEST WeeWX: Watchdog Start message: Restarting 
weewx (via systemctl): weewx.service.

Hope that helps!
And let me know if you need som more info or log from my system, and I'll 
try to help out :)

I have the new script running now and will update how it goes.

Is it possible to send the email from watchdog some other way and not with 
mailx? 
In constantines script i got the mail sent, but not in your script, oh well 
I get a mail that says:
"/var/www/html/scripts/Watchdog/weewx_watchdog2: rad 101: mailx: kommandot 
finns inte (no such command)
/var/www/html/scripts/Watchdog/weewx_watchdog2: rad 120: mailx: kommandot 
finns inte (no such command) 
So maybe the mail works but there something else wrong? :/

Btw, one off topic question, could you explain to me how I can make my 
USB-stick auto-mount when the system makes a auto reboot?
I usually run this command "sudo mount /dev/sda3 /backup", but when the 
reboot is unattended this is not mounted until I run the command. 

BR Mikael / noob =D









Den torsdag 2 maj 2019 kl. 17:55:04 UTC+2 skrev Leon Shaner:
>
> Hey, Mikael,
>
> Nice catch.  That message about 1556807461 seconds is a left-over from 
> the earlier version.  It is not only redundant, but also incorrect, due to 
> what amounts to re-use of an earlier variable.  :S   I have removed it.
>
> https://github.com/UberEclectic/weewx/tree/watchdog/examples/watchdog
>
> Your weewx.conf archive interval 

Re: [weewx-user] Sudden crash of weewx 3.9.1 "non positive value for interval"

2019-05-02 Thread Thomas Keffer
This is a known problem with the WMR200 driver (see issue #375
).

Either make the patch shown in this post
,
or replace your copy of wmr200.py with the current version

.

On Thu, May 2, 2019 at 11:12 AM Invisible Man 
wrote:

> Hello,
>
> Ive had a crash this morning with weewx version 3.9.1. It has been running
> for weeks, so I don't know exactly what happened (the log talks about a non
> positive value for an interval which obviously should never  happen), I'm
> copying the logs below if that's any help to anybody.
>
> Thanks!
>
>
> May  2 08:22:09 localhost weewx[7950]: wmr200: MainThread: I USB polling
> thread expired
> May  2 08:22:09 localhost weewx[7950]: wmr200: Thread-7: I Watchdog
> received shutdown
> May  2 08:22:09 localhost weewx[7950]: wmr200: Thread-7: I Watchdog
> thread exiting
> May  2 08:22:09 localhost weewx[7950]: wmr200: MainThread: I Watchdog
> thread expired
> May  2 08:22:09 localhost weewx[7950]: wmr200: MainThread: I Received
> packet count live:7383\
> 03 archive:506 control:47742
> May  2 08:22:09 localhost weewx[7950]: wmr200: MainThread: I Received
> bytes:1696 sent bytes:\
> 48
> May  2 08:22:09 localhost weewx[7950]: wmr200: MainThread: I Packet
> archive queue len:0 live\
>  queue len:9
>
>
> May  2 08:22:09 localhost weewx[7950]: wmr200: MainThread: I Driver
> gracefully exitingMay  2 08:22:09 localhost weewx[7950]: engine: Caught
> unrecoverable exception in engine:
> May  2 08:22:09 localhost weewx[7950]:   Non-positive value for
> record field 'interv\
> al': 0
> May  2 08:22:09 localhost weewx[7950]:   Traceback (most recent
> call last):
> May  2 08:22:09 localhost weewx[7950]: File
> "/usr/share/weewx/weewx/engine.py", \
> line 890, in main
> May  2 08:22:09 localhost weewx[7950]:   engine.run()
> May  2 08:22:09 localhost weewx[7950]: File
> "/usr/share/weewx/weewx/engine.py", \
> line 160, in run
> May  2 08:22:09 localhost weewx[7950]:   self.dispatchEvent(
> weewx.Event(weewx.ST\
> ARTUP))
> May  2 08:22:09 localhost weewx[7950]: File
> "/usr/share/weewx/weewx/engine.py", \
> line 224, in dispatchEvent
> May  2 08:22:09 localhost weewx[7950]:   callback(event)
> May  2 08:22:09 localhost weewx[7950]: File
> "/usr/share/weewx/weewx/engine.py", \
> line 520, in startup
> May  2 08:22:09 localhost weewx[7950]:   self._catchup(self.
> engine.console.genSt\
> artupRecords)
> May  2 08:22:09 localhost weewx[7950]: File
> "/usr/share/weewx/weewx/engine.py", \
> line 635, in _catchup
> May  2 08:22:09 localhost weewx[7950]:   origin='hardware'))
> May  2 08:22:09 localhost weewx[7950]: File
> "/usr/share/weewx/weewx/engine.py", \
> line 224, in dispatchEvent
> May  2 08:22:09 localhost weewx[7950]:   callback(event)
> May  2 08:22:09 localhost weewx[7950]: File
> "/usr/share/weewx/weewx/engine.py", \
> line 601, in new_archive_record
> May  2 08:22:09 localhost weewx[7950]:   dbmanager.addRecord(
> event.record, accum\
>
> ulator=self.old_accumulator)May  2 08:22:09 localhost weewx[7950]:
> File "/usr/share/weewx/weewx/manager.py",\
>  line 246, in addRecord
> May  2 08:22:09 localhost weewx[7950]:   self._addSingleRecord
> (record, cursor, l\
> og_level)
> May  2 08:22:09 localhost weewx[7950]: File
> "/usr/share/weewx/weewx/manager.py",\
>  line 1212, in _addSingleRecord
> May  2 08:22:09 localhost weewx[7950]:   _weight = self.
> _calc_weight(record)
> May  2 08:22:09 localhost weewx[7950]: File
> "/usr/share/weewx/weewx/manager.py",\
>  line 1582, in _calc_weight
> May  2 08:22:09 localhost weewx[7950]:   raise 
> ValueError("Non-positive
> value fo\
> r record field 'interval': %s" % (record['interval'], ))
> May  2 08:22:09 localhost weewx[7950]:   ValueError: Non-positive
> value for record f\
> ield 'interval': 0
> May  2 08:22:09 localhost weewx[7950]:   Exiting.
>
>
>
> --
> 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] Sudden crash of weewx 3.9.1 "non positive value for interval"

2019-05-02 Thread Invisible Man
Hello,

Ive had a crash this morning with weewx version 3.9.1. It has been running 
for weeks, so I don't know exactly what happened (the log talks about a non 
positive value for an interval which obviously should never  happen), I'm 
copying the logs below if that's any help to anybody.

Thanks!


May  2 08:22:09 localhost weewx[7950]: wmr200: MainThread: I USB polling 
thread expired
May  2 08:22:09 localhost weewx[7950]: wmr200: Thread-7: I Watchdog 
received shutdown
May  2 08:22:09 localhost weewx[7950]: wmr200: Thread-7: I Watchdog thread 
exiting
May  2 08:22:09 localhost weewx[7950]: wmr200: MainThread: I Watchdog 
thread expired
May  2 08:22:09 localhost weewx[7950]: wmr200: MainThread: I Received 
packet count live:7383\
03 archive:506 control:47742
May  2 08:22:09 localhost weewx[7950]: wmr200: MainThread: I Received bytes:
1696 sent bytes:\
48
May  2 08:22:09 localhost weewx[7950]: wmr200: MainThread: I Packet archive 
queue len:0 live\
 queue len:9


May  2 08:22:09 localhost weewx[7950]: wmr200: MainThread: I Driver 
gracefully exitingMay  2 08:22:09 localhost weewx[7950]: engine: Caught 
unrecoverable exception in engine:
May  2 08:22:09 localhost weewx[7950]:   Non-positive value for 
record field 'interv\
al': 0
May  2 08:22:09 localhost weewx[7950]:   Traceback (most recent 
call last):
May  2 08:22:09 localhost weewx[7950]: File 
"/usr/share/weewx/weewx/engine.py", \
line 890, in main
May  2 08:22:09 localhost weewx[7950]:   engine.run()
May  2 08:22:09 localhost weewx[7950]: File 
"/usr/share/weewx/weewx/engine.py", \
line 160, in run
May  2 08:22:09 localhost weewx[7950]:   self.dispatchEvent(
weewx.Event(weewx.ST\
ARTUP))
May  2 08:22:09 localhost weewx[7950]: File 
"/usr/share/weewx/weewx/engine.py", \
line 224, in dispatchEvent
May  2 08:22:09 localhost weewx[7950]:   callback(event)
May  2 08:22:09 localhost weewx[7950]: File 
"/usr/share/weewx/weewx/engine.py", \
line 520, in startup
May  2 08:22:09 localhost weewx[7950]:   self._catchup(self.
engine.console.genSt\
artupRecords)
May  2 08:22:09 localhost weewx[7950]: File 
"/usr/share/weewx/weewx/engine.py", \
line 635, in _catchup
May  2 08:22:09 localhost weewx[7950]:   origin='hardware'))
May  2 08:22:09 localhost weewx[7950]: File 
"/usr/share/weewx/weewx/engine.py", \
line 224, in dispatchEvent
May  2 08:22:09 localhost weewx[7950]:   callback(event)
May  2 08:22:09 localhost weewx[7950]: File 
"/usr/share/weewx/weewx/engine.py", \
line 601, in new_archive_record
May  2 08:22:09 localhost weewx[7950]:   dbmanager.addRecord(
event.record, accum\

ulator=self.old_accumulator)May  2 08:22:09 localhost weewx[7950]:  
   File "/usr/share/weewx/weewx/manager.py",\
 line 246, in addRecord
May  2 08:22:09 localhost weewx[7950]:   self._addSingleRecord(
record, cursor, l\
og_level)
May  2 08:22:09 localhost weewx[7950]: File 
"/usr/share/weewx/weewx/manager.py",\
 line 1212, in _addSingleRecord
May  2 08:22:09 localhost weewx[7950]:   _weight = self.
_calc_weight(record)
May  2 08:22:09 localhost weewx[7950]: File 
"/usr/share/weewx/weewx/manager.py",\
 line 1582, in _calc_weight
May  2 08:22:09 localhost weewx[7950]:   raise 
ValueError("Non-positive 
value fo\
r record field 'interval': %s" % (record['interval'], ))
May  2 08:22:09 localhost weewx[7950]:   ValueError: Non-positive 
value for record f\
ield 'interval': 0
May  2 08:22:09 localhost weewx[7950]:   Exiting.



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


SOLVED - Re: [weewx-user] Re: Dirty shutdown of my Fitlet, can't pull records from VantagePro2 data logger

2019-05-02 Thread John Canfield
Finally. I've fiddled around so much with this my head is spinning. 
weather.janeandjohn.org is current again. Hooray!

The short story:

- *the original Davis VP2 console is good*
- *the original Davis USB logger is good*
- did an upgrade to the latest weewx release
- I performed a sudo wee_database --update which caught my webpage up to 
April 30, 2019
- restarted weewx and rebooted several times while trying database commands 
(wee_database --drop-daily, sudo wee_database --to=2019-05-02, sudo 
wee_device --set-interval=1)
- the magic seemed to be sudo wee_device --set-interval=1 which Tom said in 
another thread cleared the data logger (and I rebooted again)

So apparently if the database gets screwed up as in not current with the 
logger, you (at least me) can go off on a tangent chasing an interface 
problem

John (WB5THT)

On Wednesday, May 1, 2019 at 2:34:32 PM UTC-5, John Canfield wrote:
>
> *This is driving me CRAZY!*
>
> I thought I found the problem with a UPS monitor daemon running (I had 
> unplugged the USB cable from the CyberPower box) - I stopped the process 
> and set it to not start at boot. Then it looked like weewx was talking to 
> the console but we had some kind of database problem since I've been down 
> for several days. It was updating my web page with old data. Now I'm 
> getting errors like it can't talk to the logger. I did manage to do a 
> logger text dump but after fiddling around that won't work now. I'm really 
> frustrated and it's time to leave it alone and come back later.
>
> Sigh.
>
> On Wednesday, May 1, 2019 at 12:23:23 PM UTC-5, vince wrote:
>>
>> On Wednesday, May 1, 2019 at 10:21:15 AM UTC-7, John Canfield wrote:
>>>
>>> The enigma for me then is why does weewx report the console woke up? A 
>>> USB problem is the first thing I thought of as well but the Fitlet does 
>>> report when ttyUSB0 is attached to a new port. G.
>>>
>>> Thanks Vince, I need all of the help I can get even though I'm not a 
>>> weewx newbie - I was one of Tom's beta testers with one of his first 
>>> releases.
>>>
>>>
>>>
>> I think the minicom approach of trying to connect to the console 
>> 'without' weewx is a good one, it's just that the device might not match 
>> the one you're trying to use.
>>
>> Try disconnecting the usb then reconnecting it, then use 'dmesg' to see 
>> what device it allocated.
>>
>

-- 
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] Watchdog example to warn when station is not reporting for any reason

2019-05-02 Thread Leon Shaner
Hey, Mikael,

Nice catch.  That message about 1556807461 seconds is a left-over from the 
earlier version.  It is not only redundant, but also incorrect, due to what 
amounts to re-use of an earlier variable.  :S   I have removed it.

https://github.com/UberEclectic/weewx/tree/watchdog/examples/watchdog

Your weewx.conf archive interval of 600 seconds is not really a problem, it's 
up to you what to put there, but in that case you probably want to increase my 
watchdogsecs by a factor that approximates how long it takes your system to 
boot and for weewx to post the first record.  My RPI boots in under a minute, 
so if yours is similar, even watchdogsecs=660 should suffice.

Hmm.  Maybe longer.  Please check your syslog and see if you can approximate 
how long after a reboot it takes before this type of message to appear from 
weewx:

weewx[9809]: manager: Added record 2019-05-02 06:24:00 EDT (1556792640) to 
database

To your next questions...
It isn't 100% clear to me which way you have the toggles set.
Did you ultimately enable both remediation actions steps, before seeing the 
erroneous message?

doweewxrestart=1
dohostreboot=1

Even that erroneous message shouldn't have appeared unless you have 
dohostreboot=1 but you are mentioning mainly that you tried the 
doweewxrestart=1  first.  Not sure if you mean that after trying the restart 
option you then went on to also try the dohostreboot=1 and saw the erroneous 
message?

Just want to be sure, because the logic is the most important thing, and I did 
test that extensively.  =D

I didn't notice the erroneous message because it only goes to syslog and I was 
mainly watching the more interesting log in the case of weewx_watchdog, which 
is at /var/log/weewx.log.  Would be helpful to see that log if there are any 
other issues.

Cheers! =D
\Leon
--
Leon Shaner :: Dearborn, Michigan (iPad Pro)



Regards,
Leon
--
Leon Shaner :: Dearborn, Michigan (iPad Pro)
> On May 2, 2019, at 10:56 AM, pliggen...@gmail.com wrote:
> 
> Hi Leon,
> 
> Just installed the updated script now.
> 
> Seems to be running fine dispite on thing that occured, see part of log here:
> 
> May  2 16:21:08 raspberrypi weewx[2209]: cheetahgenerator: Generated 10 files 
> for report Sofaskin-FW2205-master in 6.93 seconds
> May  2 16:21:10 raspberrypi weewx[2209]: imagegenerator: Generated 9 images 
> for Sofaskin-FW2205-master in 1.03 seconds
> May  2 16:21:10 raspberrypi weewx[2209]: copygenerator: copied 8 files to 
> /var/www/html/weewx/Sofaskin-FW2205-master
> May  2 16:21:10 raspberrypi weewx[2209]: GaugeGenerator: Generated 6 images 
> for Bootstrap in 0.55 seconds
> May  2 16:21:10 raspberrypi weewx[2209]: historygenerator.pyc: Generated 9 
> tables in 0.18 seconds
> May  2 16:21:13 raspberrypi weewx[2209]: cheetahgenerator: Generated 10 files 
> for report Bootstrap in 2.86 seconds
> May  2 16:21:13 raspberrypi weewx[2209]: copygenerator: copied 3 files to 
> /var/www/html/weewx/Bootstrap
> May  2 16:21:17 raspberrypi weewx[2209]: cheetahgenerator: Generated 6 files 
> for report Bjurdammen in 4.13 seconds
> May  2 16:21:17 raspberrypi weewx[2209]: copygenerator: copied 3 files to 
> /var/www/html/weewx/Bjurdammen
> May  2 16:21:19 raspberrypi weewx[2209]: cheetahgenerator: Generated 6 files 
> for report SeasonsReport in 1.46 seconds
> May  2 16:21:19 raspberrypi weewx[2209]: copygenerator: copied 3 files to 
> /var/www/html/weewx
> May  2 16:22:28 raspberrypi vncserver-x11[438]: Connections: rejecting 
> blacklisted connection: 217.61.106.100
> May  2 16:27:01 raspberrypi CRON[2616]: (root) CMD 
> (/var/www/html/scripts/Watchdog/weewx_watchdog2)
> May  2 16:29:14 raspberrypi crontab[2636]: (root) BEGIN EDIT (root)
> May  2 16:29:24 raspberrypi crontab[2636]: (root) REPLACE (root)
> May  2 16:29:24 raspberrypi crontab[2636]: (root) END EDIT (root)
> May  2 16:29:41 raspberrypi systemd[1]: Stopping LSB: weewx weather system...
> May  2 16:29:41 raspberrypi weewx[2209]: engine: Main loop exiting. Shutting 
> engine down.
> May  2 16:29:41 raspberrypi weewx[2209]: engine: Shutting down StdReport 
> thread
> May  2 16:29:41 raspberrypi weewx[2209]: engine: Terminating weewx version 
> 3.9.1
> May  2 16:29:46 raspberrypi weewx[2683]: Stopping weewx weather system: 
> weewx..
> May  2 16:29:46 raspberrypi systemd[1]: Stopped LSB: weewx weather system.
> May  2 16:30:01 raspberrypi cron[304]: (root) RELOAD (crontabs/root)
> May  2 16:30:01 raspberrypi CRON[2727]: (pliggen) CMD (/usr/bin/php7.0 
> /var/www/html/weewx/smhi_warnings_bjurdammen.php > /dev/null 2>&1)
> May  2 16:31:01 raspberrypi CRON[2741]: (root) CMD 
> (/var/www/html/scripts/Watchdog/weewx_watchdog2)
> May  2 16:31:01 raspberrypi root[2748]: weewx_watchdog: 661 seconds have 
> passed since weewx logged any records!
> May  2 16:31:01 raspberrypi root[2759]: weewx_watchdog: 1556807461 seconds 
> have passed since weewx logged any records!  Rebooting!
> May  2 16:31:17 raspberrypi systemd-modules-load[85]: Inserted module 
> 

Re: [weewx-user] Re: Barometric pressure correction the right way

2019-05-02 Thread Louis De Lange
I do not recall where I came across the fact that it is temperature 
compensated. At some point I thought perhaps the indoor sensor was trying 
to provide a barometer reading and I placed it outside in a sheltered area, 
and imported it into weewx as barometer and still it was all over the 
place.  Recently I build a constant temperature box and placed the sensor 
inside, and for the first time it followed my local airport altimeter 
exactly.  

  Conclusion - garbage.

I ended up building a BYOD station which I am very happy with

On Wednesday, 1 May 2019 12:00:25 UTC-7, V. Kelly Bellis wrote:
>
> @Louis De Lange, thanks for mentioning this. By any chance, do you recall 
> where you read that FineOffset was using indoortemp for pressure 
> calculations?
>
> On Sunday, January 14, 2018 at 2:35:33 PM UTC-5, Louis De Lange wrote:
>>
>> As a previous owner of a Fine Offset station I can confirm that I noticed 
>> this same behavior.  Living in Canada where our homes are heated, I could 
>> clearly see the altimeter reading (my station did not support barometer 
>> correction to sea level) seesaw with the furnace operating and shutting 
>> down.  
>>
>> *Reading up on the issue it appeared that the Fine Offset hardware was 
>> doing a temperature correction internal to the indoor unit*, but that 
>> quick changes to the indoor temperature threw the reading off.  There is no 
>> way that you can correct for that with calibration - it is a flaw in the 
>> hardware.  
>>
>

-- 
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] Watchdog example to warn when station is not reporting for any reason

2019-05-02 Thread pliggen . is
Hi Leon,

Just installed the updated script now.

Seems to be running fine dispite on thing that occured, see part of log 
here:

May  2 16:21:08 raspberrypi weewx[2209]: cheetahgenerator: Generated 10 
files for report Sofaskin-FW2205-master in 6.93 seconds
May  2 16:21:10 raspberrypi weewx[2209]: imagegenerator: Generated 9 images 
for Sofaskin-FW2205-master in 1.03 seconds
May  2 16:21:10 raspberrypi weewx[2209]: copygenerator: copied 8 files to 
/var/www/html/weewx/Sofaskin-FW2205-master
May  2 16:21:10 raspberrypi weewx[2209]: GaugeGenerator: Generated 6 images 
for Bootstrap in 0.55 seconds
May  2 16:21:10 raspberrypi weewx[2209]: historygenerator.pyc: Generated 9 
tables in 0.18 seconds
May  2 16:21:13 raspberrypi weewx[2209]: cheetahgenerator: Generated 10 
files for report Bootstrap in 2.86 seconds
May  2 16:21:13 raspberrypi weewx[2209]: copygenerator: copied 3 files to 
/var/www/html/weewx/Bootstrap
May  2 16:21:17 raspberrypi weewx[2209]: cheetahgenerator: Generated 6 
files for report Bjurdammen in 4.13 seconds
May  2 16:21:17 raspberrypi weewx[2209]: copygenerator: copied 3 files to 
/var/www/html/weewx/Bjurdammen
May  2 16:21:19 raspberrypi weewx[2209]: cheetahgenerator: Generated 6 
files for report SeasonsReport in 1.46 seconds
May  2 16:21:19 raspberrypi weewx[2209]: copygenerator: copied 3 files to 
/var/www/html/weewx
May  2 16:22:28 raspberrypi vncserver-x11[438]: Connections: rejecting 
blacklisted connection: 217.61.106.100
May  2 16:27:01 raspberrypi CRON[2616]: (root) CMD 
(/var/www/html/scripts/Watchdog/weewx_watchdog2)
May  2 16:29:14 raspberrypi crontab[2636]: (root) BEGIN EDIT (root)
May  2 16:29:24 raspberrypi crontab[2636]: (root) REPLACE (root)
May  2 16:29:24 raspberrypi crontab[2636]: (root) END EDIT (root)
May  2 16:29:41 raspberrypi systemd[1]: Stopping LSB: weewx weather 
system...
May  2 16:29:41 raspberrypi weewx[2209]: engine: Main loop exiting. 
Shutting engine down.
May  2 16:29:41 raspberrypi weewx[2209]: engine: Shutting down StdReport 
thread
May  2 16:29:41 raspberrypi weewx[2209]: engine: Terminating weewx version 
3.9.1
May  2 16:29:46 raspberrypi weewx[2683]: Stopping weewx weather system: 
weewx..
May  2 16:29:46 raspberrypi systemd[1]: Stopped LSB: weewx weather system.
May  2 16:30:01 raspberrypi cron[304]: (root) RELOAD (crontabs/root)
May  2 16:30:01 raspberrypi CRON[2727]: (pliggen) CMD (/usr/bin/php7.0 
/var/www/html/weewx/smhi_warnings_bjurdammen.php > /dev/null 2>&1)
May  2 16:31:01 raspberrypi CRON[2741]: (root) CMD 
(/var/www/html/scripts/Watchdog/weewx_watchdog2)
May  2 16:31:01 raspberrypi root[2748]: weewx_watchdog: 661 seconds have 
passed since weewx logged any records!
May  2 16:31:01 raspberrypi root[2759]: weewx_watchdog: 1556807461 seconds 
have passed since weewx logged any records!  Rebooting!
May  2 16:31:17 raspberrypi systemd-modules-load[85]: Inserted module 
'i2c_dev'
May  2 16:31:17 raspberrypi fake-hwclock[88]: tor  2 maj 2019 14:31:15 UTC

I stopped weewx via service weewx stop.
Then I had the script to run by cronjob. 
It first tried to restart and wrote that 661 seconds have passed since 
weewx logged any records, and that is correct, I have it set to 
archive_interval = 600 in weewx.conf. Or should I change this time?
the the script wrote that 1556807461 seconds have passed since weewx logged 
any records! Rebooting! 
Is this correct behavior? Because weewx logged 660 seconds erlier...

Thanks for the update and I will continue to try it and hope to have it 
running :)

BR Mikael
Den torsdag 2 maj 2019 kl. 06:35:20 UTC+2 skrev Leon Shaner:
>
> Hi, Mikael,
>
> I've added the simple toggles at the top of the script to control 
> remediation actions.
> The script will always notify, but the restart weewx and reboot host 
> actions are completely optional and controlled simply by the variables at 
> the top of the script.
>
> If both *restart weewx* and *reboot host* actions are enabled, these 
> become nested in that first the restart weewx will be tried one time and if 
> after watchdogsecs the station is still not reporting, then the host reboot 
> will occur.  You can enable one or the other or both.
>
> I also added logic to check if the host was rebooted within 2x watchdog 
> secs to avoid reboot loops.   I strongly recommend not lowering the 
> watchdogsecs below 600 (10 minutes).
>
> It's important to note that my approach isn't actually checking whether 
> the weewx process is running, rather, the loss of communications checking 
> is based on whether weewx has written any records to the database lately. 
>
> You'll find the update over here:
>
> https://github.com/UberEclectic/weewx/tree/watchdog/examples/watchdog
>
> BTW, if you use my script don't run another kind of weewx restarter 
> script, or they will step on each other.  (Or at least be sure to disable 
> the weewx restart toggle in mine).
>
> Regards,
> Leon
> --
> Leon Shaner :: Dearborn, Michigan (iPad Pro)
>
> On May 1, 2019, at 2:24 PM, plig...@gmail.com