[weewx-user] MQTT extension
Hi, I've just installed the MQTT extension ( https://github.com/weewx/weewx/wiki/mqtt) to get my readings into my home automation system (Home Assistant) and it works perfect! But I have a question about the topics sent. But I would like to have the total amount of rain the last 7 days. Not rain this week, but accumulated amount for the last 168 hours. So I could get a notice that maybe it is time to take out the garden hose... In the available topics I find: rainRate rain rainTotal rain24 dayRain hourRain I figured out that rain24 must be the amount accumulated the last 24 hours. The rest is still a guess. (For some reason it has stopped rain the one time I want some rain) I found another thread here about custom topics ( https://groups.google.com/d/msg/weewx-user/NBG_-D-Hghw/Nx6426vtBgAJ) and there the author of the extension answered that it is not possible to use aggregation templates for this extension. It can only publish LOOP-packages or archive records. I have not stated anything to bind to in my settings, so it should be the default, which should be archive records. About two years ago I wrote my own (not very nice one) "extension" to send archive records to my previous automation system (Domoticz). And the only three records about rain I could find then was: rainRate rain rainTotal And if I look in the documentation of weewx ( http://www.weewx.com/docs/customizing.htm#archive_types) I can only find: rainRate rain So my question is; where is rain24, dayRain and hourRain picked up? And is there any way to publish a topic for lets say: rain7days? -- 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: logrotate
I guess you are right about that it not should cause any harm. I just thought it was some misstake and it should be weewx that should restart instead. But any way. In Ubuntu it works fine with rotating without restarting either rsyslog or weewx. Mine has rotate the logs now 3 times without problems. Den onsdag 13 december 2017 kl. 17:17:45 UTC+1 skrev Andrew Milner: > > looks as though centos once had a problem > https://www.centos.org/forums/viewtopic.php?t=32715 > > guess the stop and start may not be necessary nowadays - but they should > not cause any harm either > > > > On Wednesday, 13 December 2017 16:58:01 UTC+2, Daniel Jönsson wrote: > >> Sorry, I meant syslog, as I also wrote in the first post. >> >> >> Den onsdag 13 december 2017 kl. 15:36:53 UTC+1 skrev Andrew Milner: >>> >>> My logrotate stops and starts syslog at postrotate, it does not restart >>> logrotate. >>> >>> /var/log/weewx.log { >>> weekly >>> missingok >>> rotate 52 >>> compress >>> delaycompress >>> notifempty >>> # debian uses root:adm >>> # create 644 root adm >>> # ubuntu uses syslog:adm >>> # create 644 syslog adm >>> sharedscripts >>> postrotate >>> # standard way of invoking rc scripts >>> /etc/init.d/rsyslog stop >>> /etc/init.d/rsyslog start >>> >>> >>> On Wednesday, 13 December 2017 15:56:42 UTC+2, Daniel Jönsson wrote: >>> >>>> I understand. I am only familiar with Debian/Ubuntu so I can not help >>>> you with that. >>>> And to me it seemed strange. Some times you restart/reload the >>>> service/demaon, but I have never seen that a logrotate is restarting >>>> logrotate... >>>> >>>> >>>> >>>> Den onsdag 13 december 2017 kl. 12:42:38 UTC+1 skrev mwall: >>>>> >>>>> On Wednesday, December 13, 2017 at 4:36:01 AM UTC-5, Daniel Jönsson >>>>> wrote: >>>>>> >>>>>> In this logrotate example you are restarting rsyslog postrotate!! Why? >>>>>> >>>>> >>>>> restarting rsyslog is probably not necessary for the most recent >>>>> operating systems. >>>>> >>>>> i found that on some systems, logrotate did not manage open file >>>>> handles properly. when logrotate rotated the weewx log file, (r)syslog >>>>> would continue to write to the log that had been rotated. >>>>> >>>>> do you know of a way to ensure proper logrotate behavior that works on >>>>> all operating systems and all operating system versions? >>>>> >>>>> m >>>>> >>>> -- 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: logrotate
Sorry, I meant syslog, as I also wrote in the first post. Den onsdag 13 december 2017 kl. 15:36:53 UTC+1 skrev Andrew Milner: > > My logrotate stops and starts syslog at postrotate, it does not restart > logrotate. > > /var/log/weewx.log { > weekly > missingok > rotate 52 > compress > delaycompress > notifempty > # debian uses root:adm > # create 644 root adm > # ubuntu uses syslog:adm > # create 644 syslog adm > sharedscripts > postrotate > # standard way of invoking rc scripts > /etc/init.d/rsyslog stop > /etc/init.d/rsyslog start > > > On Wednesday, 13 December 2017 15:56:42 UTC+2, Daniel Jönsson wrote: > >> I understand. I am only familiar with Debian/Ubuntu so I can not help you >> with that. >> And to me it seemed strange. Some times you restart/reload the >> service/demaon, but I have never seen that a logrotate is restarting >> logrotate... >> >> >> >> Den onsdag 13 december 2017 kl. 12:42:38 UTC+1 skrev mwall: >>> >>> On Wednesday, December 13, 2017 at 4:36:01 AM UTC-5, Daniel Jönsson >>> wrote: >>>> >>>> In this logrotate example you are restarting rsyslog postrotate!! Why? >>>> >>> >>> restarting rsyslog is probably not necessary for the most recent >>> operating systems. >>> >>> i found that on some systems, logrotate did not manage open file handles >>> properly. when logrotate rotated the weewx log file, (r)syslog would >>> continue to write to the log that had been rotated. >>> >>> do you know of a way to ensure proper logrotate behavior that works on >>> all operating systems and all operating system versions? >>> >>> m >>> >> -- 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: logrotate
I understand. I am only familiar with Debian/Ubuntu so I can not help you with that. And to me it seemed strange. Some times you restart/reload the service/demaon, but I have never seen that a logrotate is restarting logrotate... Den onsdag 13 december 2017 kl. 12:42:38 UTC+1 skrev mwall: > > On Wednesday, December 13, 2017 at 4:36:01 AM UTC-5, Daniel Jönsson wrote: >> >> In this logrotate example you are restarting rsyslog postrotate!! Why? >> > > restarting rsyslog is probably not necessary for the most recent operating > systems. > > i found that on some systems, logrotate did not manage open file handles > properly. when logrotate rotated the weewx log file, (r)syslog would > continue to write to the log that had been rotated. > > do you know of a way to ensure proper logrotate behavior that works on all > operating systems and all operating system versions? > > m > -- 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: Limiting weewx logging only to error/fail
No. To make shore processes are running you use a monitoring tool. For example Monit. The problem with one process flooding the syslog, is that errors not declared in monitoring tools, are missed because you cant find them by reading the log. And for shore no other programs/servers/process I have ever had running on the server behaves this way (except Home Assistant, which is also written i Python). For examepl now (since I changed the conf for rsyslog 10 hours ago) in my syslog I have 120 lines. All are from weewx and looks like this: Dec 6 11:50:50 server weewx[30571]: manager: added record 2017-12-06 11:47:01 CET (1512557221) to database 'weewx' Dec 6 11:50:50 server weewx[30571]: manager: added record 2017-12-06 11:47:01 CET (1512557221) to daily summary in 'weewx' Exept ONE line that says: Dec 6 11:46:50 server weewx[30571]: fousb: get_observations failed: ignoring suspected bogus data from 0xbe40 (delay=5 interval=5) This one I want to be in sys log. And the only reason I saw this is because I was looking for an example of important messages getting lost. I would never have seen this if I was reading through the log next week. Then there would be 1 000 lines of successful reading, and 1 line of an error. Den torsdag 7 december 2017 kl. 04:41:25 UTC+1 skrev Andrew Milner: > > Just a thought for you to think about. You may find it helpful to retain > the 'record added' log information just to make it easier to see if weewx > is running normally or if it has stopped (as in the case of an obscure bug > that did not cause an error message) - although I accept that that could be > determined from examination of the database. > > > On Wednesday, 6 December 2017 21:29:25 UTC+2, Daniel Jönsson wrote: > >> Something strange here with Google groups. Sorry if double posting now, >> but my messages are dispersing.. >> >> I have now made changes to rsyslog config, to only log messages with >> level 5 and above, and weewx is still flooding my syslog with the following >> two lines every 5 minutes: >> >> Dec 6 19:51:03 server weewx[30571]: manager: added record 2017-12-06 >> 19:51:00 CET (1512586260) to database 'weewx' >> Dec 6 19:51:03 server weewx[30571]: manager: added record 2017-12-06 >> 19:51:00 CET (1512586260) to daily summary in 'weewx' >> >> >> How could this be considered "normal but significant condition" as per RFC >> 5424? I would vote for that to be level 6 (info) >> >> >> And here is my weewx.conf: >> # WEEWX CONFIGURATION FILE >> # >> # Copyright (c) 2009-2015 Tom Keffer <tke...@gmail.com> >> # See the file LICENSE.txt for your rights. >> >> >> ## >> >> # This section is for general configuration information. >> >> # Set to 1 for extra debug info, otherwise comment it out or set to zero >> debug = 0 >> >> # Root directory of the weewx data file hierarchy for this station >> WEEWX_ROOT = / >> >> # How long to wait before timing out a socket (FTP, HTTP) connection >> socket_timeout = 20 >> >> # Do not modify this. It is used when installing and updating weewx. >> version = 3.6.1 >> >> >> ## >> >> # This section is for information about the station. >> >> [Station] >> >> # Description of the station location >> location = "Munka Ljungby, Sweden" >> >> # Latitude and longitude in decimal degrees >> latitude = 56.261 >> longitude = 12.988 >> >> # Altitude of the station, with unit it is in. This is downloaded from >> # from the station if the hardware supports it. >> altitude = 53, meter >> >> # Set to type of station hardware. There must be a corresponding >> stanza >> # in this file with a 'driver' parameter indicating the driver to be >> used. >> station_type = FineOffsetUSB >> >> # If you have a website, you may specify an URL >> #station_url = http://www.example.com >> >> # The start of the rain year (1=January; 10=October, etc.). This is >> # downloaded from the station if the hardware supports it. >> rain_year_start = 1 >> >> # Start of week (0=Monday, 6=Sunday) >> week_start = 0 >> >> >> ## >> >> [FineOffsetUSB] >> # This section is for the Fine Offset series of weather stations. >> >
[weewx-user] Re: Limiting weewx logging only to error/fail
Sorry for late answer. Been away for work. All this I see in syslog: Dec 6 10:40:28 server weewx[30571]: fousb: synchronising to the weather station (quality=1) Dec 6 10:41:14 server weewx[30571]: manager: added record 2017-12-06 10:37:01 CET (1512553021) to database 'weewx' Dec 6 10:41:14 server weewx[30571]: manager: added record 2017-12-06 10:37:01 CET (1512553021) to daily summary in 'weewx' Dec 6 10:41:15 server weewx[30571]: GaugeGenerator: Generated 6 images for HTMLPages in 0.19 seconds Dec 6 10:41:15 server weewx[30571]: translategenerator.pyc: Language is swedish Dec 6 10:41:15 server weewx[30571]: historygenerator.pyc: Generated 6 tables in 0.33 seconds Dec 6 10:41:16 server weewx[30571]: cheetahgenerator: Generated 10 files for report HTMLPages in 1.68 seconds Dec 6 10:41:16 server weewx[30571]: reportengine: copied 0 files to /var/www/weewx/Bootstrap Dec 6 10:41:16 server weewx[30571]: translategenerator.pyc: Language is swedish Dec 6 10:41:17 server weewx[30571]: genimages: Generated 6 images for BigImages in 0.80 seconds Dec 6 10:41:17 server weewx[30571]: translategenerator.pyc: Language is swedish Dec 6 10:41:17 server weewx[30571]: genimages: Generated 6 images for SmallImages in 0.33 seconds Den fredag 24 november 2017 kl. 01:08:09 UTC+1 skrev mwall: > > On Wednesday, November 22, 2017 at 3:02:53 AM UTC-5, Daniel Jönsson wrote: >> >> >> This was exactly how I understood it to be when I read up on the commit >> on github, and this is what I have been trying to do. But it does not >> effect the logging. >> I am running version 3.6.1, and if I understand it correct this was >> implemented in 3.6.0, so it should work but isn't. >> >> I have tried to put it under [StdReport] and all reports their under, >> and under [StdRESTful]. No matter where I put it, it does >> absolutely nothing to lessen the output to syslog. >> > > could you post some log output and highlight the messages that you think > should not be emitted? > > also post a sanitized copy of the weewx.conf > > m > -- 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: Limiting weewx logging only to error/fail
Thank you for quick reply. This was exactly how I understood it to be when I read up on the commit on github, and this is what I have been trying to do. But it does not effect the logging. I am running version 3.6.1, and if I understand it correct this was implemented in 3.6.0, so it should work but isn't. I have tried to put it under [StdReport] and all reports their under, and under [StdRESTful]. No matter where I put it, it does absolutely nothing to lessen the output to syslog. Den tisdag 21 november 2017 kl. 23:13:45 UTC+1 skrev mwall: > > > > On Tuesday, November 21, 2017 at 4:36:10 PM UTC-5, Daniel Jönsson wrote: >> >> I cant seem to get it to work. And I cant find it in the user guide ( >> http://www.weewx.com/docs/usersguide.htm) were to put it. >> I would also very much like to only have errors in my log. >>> >>> >>> > commit 6b461c9 > <https://github.com/weewx/weewx/commit/6b461c98b15c880c6b1bfc74879edba74b37e218> > applies > to reports > > use it like this: > > [StdReport] > log_success = False > log_failure = True > > then optionally specialize for individual reports. for example, to log > success for StandardReport but not for others: > > [StdReport] > log_success = False > log_failure = True > ... > [[StandardReport]] > log_success = True > ... > [[AnotherReport]] > ... > > this pattern should also work for uploaders: > > [StdRESTful] > log_succes = False > log_failure = True > > we probably should do it for the archive service as well, which would > probably indicate that one should be able to specify log_success and > log_failure at the root of weewx.conf then override for each service as > necessary. > > m > -- 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: Limiting weewx logging only to error/fail
I cant seem to get it to work. And I cant find it in the user guide (http://www.weewx.com/docs/usersguide.htm) were to put it. I would also very much like to only have errors in my log. Den torsdag 14 april 2016 kl. 00:42:38 UTC+2 skrev mwall: > > On Wednesday, April 13, 2016 at 12:00:49 PM UTC-4, vince wrote: >> >> Great stuff - is there any plan/way to have a global log_success or >> global log_failure that the sections can supersede perhaps, rather than >> requiring setting log_success=false in a bunch of places ? >> > > there is now :) > > https://github.com/weewx/weewx/issues/116 > -- 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: Can't start weewx automatically in Ubuntu 16.04
Today I updated some packages on the server. Some of them was systemd updates. And after that I get different errors when trying to start weewx with systemd.And it differs from time to time. I tried three times now to start and all three times I got a different error. Still there is no problem starting the demon from command line. Either as root or with sudo as user. Can it be something with systemd? For the moment I am only trying to start with the Upstart (that I used in 14.04 and was working) script using systemd. I will try writing a service in systemd but, but it did not help when I tried earlier. Any one have any suggestion of a correct systemd file? Here is three different syslog from when trying to start with systemd today: Nov 11 10:59:34 server systemd[1]: Started Accounts Service. Nov 11 11:01:20 server systemd[1]: Started weewx weather system. Nov 11 11:01:20 server weewx[30410]: engine: Initializing weewx version 3.6. 1 Nov 11 11:01:20 server weewx[30410]: engine: Using Python 2.7.12 (default, Jul 1 2016, 15:12:24) #012[GCC 5.4.0 20160609] Nov 11 11:01:20 server weewx[30410]: engine: Platform Linux-4.4.0-47-generic -x86_64-with-Ubuntu-16.04-xenial Nov 11 11:01:20 server weewx[30410]: engine: pid file is /var/run/weewx.pid Nov 11 11:01:20 server weewx[30415]: engine: Using configuration file /etc/ weewx/weewx.conf Nov 11 11:01:20 server weewx[30415]: engine: Initializing engine Nov 11 11:01:20 server weewx[30415]: engine: Loading station type FineOffsetUSB (weewx.drivers.fousb) Nov 11 11:01:20 server weewx[30415]: engine: Received signal TERM (15). Nov 11 11:01:20 server weewx[30415]: engine: File "/usr/bin/weewxd", line 64, in Nov 11 11:01:20 server weewx[30415]: engine: weewx.engine.main(options, args) Nov 11 11:01:20 server weewx[30415]: engine: File "/usr/share/weewx/weewx/engine.py", line 847, in main Nov 11 11:01:20 server weewx[30415]: engine: engine = engine_class( config_dict) Nov 11 11:01:20 server weewx[30415]: engine: File "/usr/share/weewx/weewx/engine.py", line 70, in __init__ Nov 11 11:01:20 server weewx[30415]: engine: self.setupStation( config_dict) Nov 11 11:01:20 server weewx[30415]: engine: File "/usr/share/weewx/weewx/engine.py", line 94, in setupStation Nov 11 11:01:20 server weewx[30415]: engine: __import__(driver) Nov 11 11:01:20 server weewx[30415]: engine: File "/usr/share/weewx/weewx/drivers/fousb.py", line 211, in Nov 11 11:01:20 server weewx[30415]: engine: """ Nov 11 11:01:20 server weewx[30415]: engine: Terminating weewx version 3.6.1 Nov 11 11:05:09 server systemd[1]: Started weewx weather system. Nov 11 11:05:09 server weewx[31222]: engine: Initializing weewx version 3.6. 1 Nov 11 11:05:09 server weewx[31222]: engine: Using Python 2.7.12 (default, Jul 1 2016, 15:12:24) #012[GCC 5.4.0 20160609] Nov 11 11:05:09 server weewx[31222]: engine: Platform Linux-4.4.0-47-generic -x86_64-with-Ubuntu-16.04-xenial Nov 11 11:05:09 server weewx[31222]: engine: pid file is /var/run/weewx.pid Nov 11 11:05:09 server weewx[31227]: engine: Using configuration file /etc/ weewx/weewx.conf Nov 11 11:05:09 server weewx[31227]: engine: Initializing engine Nov 11 11:05:09 server weewx[31227]: engine: Loading station type FineOffsetUSB (weewx.drivers.fousb) Nov 11 11:05:09 server weewx[31227]: engine: Received signal TERM (15). Nov 11 11:05:09 server weewx[31227]: engine: File "/usr/bin/weewxd", line 64, in Nov 11 11:05:09 server weewx[31227]: engine: weewx.engine.main(options, args) Nov 11 11:05:09 server weewx[31227]: engine: File "/usr/share/weewx/weewx/engine.py", line 847, in main Nov 11 11:05:09 server weewx[31227]: engine: engine = engine_class( config_dict) Nov 11 11:05:09 server weewx[31227]: engine: File "/usr/share/weewx/weewx/engine.py", line 70, in __init__ Nov 11 11:05:09 server weewx[31227]: engine: self.setupStation( config_dict) Nov 11 11:05:09 server weewx[31227]: engine: File "/usr/share/weewx/weewx/engine.py", line 94, in setupStation Nov 11 11:05:09 server weewx[31227]: engine: __import__(driver) Nov 11 11:05:09 server weewx[31227]: engine: File "/usr/share/weewx/weewx/drivers/fousb.py", line 217, in Nov 11 11:05:09 server weewx[31227]: engine: import usb Nov 11 11:05:09 server weewx[31227]: engine: File "/usr/lib/python2.7/dist-packages/usb/__init__.py", line 41, in Nov 11 11:05:09 server weewx[31227]: engine: """ Nov 11 11:05:09 server weewx[31227]: engine: Terminating weewx version 3.6.1 Nov 11 11:07:22 server systemd[1]: Started weewx weather system. Nov 11 11:07:22 server weewx[31894]: engine: Initializing weewx version 3.6. 1 Nov 11 11:07:22 server weewx[31894]: engine: Using Python 2.7.12 (default, Jul 1 2016, 15:12:24) #012[GCC 5.4.0 20160609] Nov 11 11:07:22 server weewx[31894]: engine: Platform Linux-4.4.0-47-generic -x86_64-with-Ubuntu-16.04-xenial Nov 11 11:07:22 server weewx[31894]: engine: pid file is /var/run/weewx.pid Nov 11 11:07:22 server
[weewx-user] Re: Can't start weewx automatically in Ubuntu 16.04
It looks like I have two libusb 0.1.12-28 and 1.0.20-1. pyusb is 1.0.0~b2-2 And yes. Locale is sv_SE.UTF-8 It has been working flawless on this machine for more than a year. This error started when I did a upgrade from Ubuntu 14.04 to 16.04. -- 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: Can't start weewx automatically in Ubuntu 16.04
The log above is when trying to start the demon with the Upstart script (through systemd). If I start a terminal and switch to root and then try start the demon with the exact same exec then it works, and I get this in my log: Nov 8 16:32:49 server weewx[9408]: engine: Initializing weewx version 3.6.1 Nov 8 16:32:49 server weewx[9408]: engine: Using Python 2.7.12 (default, Jul 1 2016, 15:12:24) #012[GCC 5.4.0 20160609] Nov 8 16:32:49 server weewx[9408]: engine: Platform Linux-4.4.0-45-generic-x86_64-with-Ubuntu-16.04-xenial Nov 8 16:32:49 server weewx[9408]: engine: pid file is /var/run/weewx.pid Nov 8 16:32:49 server weewx[9412]: engine: Using configuration file /etc/weewx/weewx.conf Nov 8 16:32:49 server weewx[9412]: engine: Initializing engine Nov 8 16:32:49 server weewx[9412]: engine: Loading station type FineOffsetUSB (weewx.drivers.fousb) Nov 8 16:32:49 server weewx[9412]: fousb: driver version is 1.9 Nov 8 16:32:49 server weewx[9412]: fousb: polling mode is PERIODIC Nov 8 16:32:49 server weewx[9412]: fousb: polling interval is 60 Nov 8 16:32:49 server weewx[9412]: fousb: found station on USB bus= device= Nov 8 16:32:49 server weewx[9412]: engine: Loading service weewx.engine.StdTimeSynch Nov 8 16:32:49 server weewx[9412]: engine: Finished loading service weewx.engine.StdTimeSynch Nov 8 16:32:49 server weewx[9412]: engine: Loading service weewx.engine.StdConvert Nov 8 16:32:49 server weewx[9412]: engine: StdConvert target unit is 0x1 Nov 8 16:32:49 server weewx[9412]: engine: Finished loading service weewx.engine.StdConvert Nov 8 16:32:49 server weewx[9412]: engine: Loading service weewx.engine.StdCalibrate Nov 8 16:32:49 server weewx[9412]: engine: Finished loading service weewx.engine.StdCalibrate Nov 8 16:32:49 server weewx[9412]: engine: Loading service weewx.engine.StdQC Nov 8 16:32:49 server weewx[9412]: engine: Finished loading service weewx.engine.StdQC Nov 8 16:32:49 server weewx[9412]: engine: Loading service weewx.wxservices.StdWXCalculate Nov 8 16:32:49 server weewx[9412]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardware Nov 8 16:32:49 server weewx[9412]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS Nov 8 16:32:49 server weewx[9412]: engine: Finished loading service weewx.wxservices.StdWXCalculate Nov 8 16:32:49 server weewx[9412]: engine: Loading service weewx.engine.StdArchive Nov 8 16:32:49 server weewx[9412]: engine: Archive will use data binding wx_binding Nov 8 16:32:49 server weewx[9412]: engine: Record generation will be attempted in 'hardware' Nov 8 16:32:50 server weewx[9412]: engine: Using archive interval of 300 seconds (specified by hardware) Nov 8 16:32:50 server weewx[9412]: engine: Use LOOP data in hi/low calculations: 1 Nov 8 16:32:50 server weewx[9412]: engine: Using binding 'wx_binding' to database 'weewx' Nov 8 16:32:50 server weewx[9412]: manager: Starting backfill of daily summaries Nov 8 16:32:50 server weewx[9412]: manager: Daily summaries up to date Nov 8 16:32:50 server weewx[9412]: engine: Finished loading service weewx.engine.StdArchive Nov 8 16:32:50 server weewx[9412]: engine: Loading service weewx.restx.StdStationRegistry Nov 8 16:32:50 server weewx[9412]: restx: StationRegistry: Registration not requested. Nov 8 16:32:50 server weewx[9412]: engine: Finished loading service weewx.restx.StdStationRegistry Nov 8 16:32:50 server weewx[9412]: engine: Loading service weewx.restx.StdWunderground Nov 8 16:32:50 server weewx[9412]: restx: Wunderground: Posting not enabled. Nov 8 16:32:50 server weewx[9412]: engine: Finished loading service weewx.restx.StdWunderground Nov 8 16:32:50 server weewx[9412]: engine: Loading service weewx.restx.StdPWSweather Nov 8 16:32:50 server weewx[9412]: restx: PWSweather: Posting not enabled. Nov 8 16:32:50 server weewx[9412]: engine: Finished loading service weewx.restx.StdPWSweather Nov 8 16:32:50 server weewx[9412]: engine: Loading service weewx.restx.StdCWOP Nov 8 16:32:50 server weewx[9412]: restx: CWOP: Posting not enabled. Nov 8 16:32:50 server weewx[9412]: engine: Finished loading service weewx.restx.StdCWOP Nov 8 16:32:50 server weewx[9412]: engine: Loading service weewx.restx.StdWOW Nov 8 16:32:50 server weewx[9412]: restx: WOW: Posting not enabled. Nov 8 16:32:50 server weewx[9412]: engine: Finished loading service weewx.restx.StdWOW Nov 8 16:32:50 server weewx[9412]: engine: Loading service weewx.restx.StdAWEKAS Nov 8 16:32:50 server weewx[9412]: restx: AWEKAS: Posting not enabled. Nov 8 16:32:50 server
[weewx-user] Re: Can't start weewx automatically in Ubuntu 16.04
OK. Here is the result: Nov 8 16:23:17 server systemd[1]: Started weewx weather system. Nov 8 16:23:17 server weewx[8224]: engine: Initializing weewx version 3.6.1 Nov 8 16:23:17 server weewx[8224]: engine: Using Python 2.7.12 (default, Jul 1 2016, 15:12:24) #012[GCC 5.4.0 20160609] Nov 8 16:23:17 server weewx[8224]: engine: Platform Linux-4.4.0-45-generic-x86_64-with-Ubuntu-16.04-xenial Nov 8 16:23:17 server weewx[8224]: engine: pid file is /var/run/weewx.pid Nov 8 16:23:17 server weewx[8229]: engine: Using configuration file /etc/weewx/weewx.conf Nov 8 16:23:17 server weewx[8229]: engine: Initializing engine Nov 8 16:23:17 server weewx[8229]: engine: Loading station type FineOffsetUSB (weewx.drivers.fousb) Nov 8 16:23:17 server weewx[8229]: fousb: driver version is 1.9 Nov 8 16:23:17 server weewx[8229]: fousb: polling mode is PERIODIC Nov 8 16:23:17 server weewx[8229]: fousb: polling interval is 60 Nov 8 16:23:17 server weewx[8229]: engine: Received signal TERM (15). Nov 8 16:23:17 server weewx[8229]: engine: File "/usr/bin/weewxd", line 64, in Nov 8 16:23:17 server weewx[8229]: engine: weewx.engine.main(options, args) Nov 8 16:23:17 server weewx[8229]: engine: File "/usr/share/weewx/weewx/engine.py", line 847, in main Nov 8 16:23:17 server weewx[8229]: engine: engine = engine_class(config_dict) Nov 8 16:23:17 server weewx[8229]: engine: File "/usr/share/weewx/weewx/engine.py", line 70, in __init__ Nov 8 16:23:17 server weewx[8229]: engine: self.setupStation(config_dict) Nov 8 16:23:17 server weewx[8229]: engine: File "/usr/share/weewx/weewx/engine.py", line 105, in setupStation Nov 8 16:23:17 server weewx[8229]: engine: self.console = loader_function(config_dict, self) Nov 8 16:23:17 server weewx[8229]: engine: File "/usr/share/weewx/weewx/drivers/fousb.py", line 226, in loader Nov 8 16:23:17 server weewx[8229]: engine: return FineOffsetUSB(**config_dict[DRIVER_NAME]) Nov 8 16:23:17 server weewx[8229]: engine: File "/usr/share/weewx/weewx/drivers/fousb.py", line 981, in __init__ Nov 8 16:23:17 server weewx[8229]: engine: self.openPort() Nov 8 16:23:17 server weewx[8229]: engine: File "/usr/share/weewx/weewx/drivers/fousb.py", line 1032, in openPort Nov 8 16:23:17 server weewx[8229]: engine: dev = self._find_device() Nov 8 16:23:17 server weewx[8229]: engine: File "/usr/share/weewx/weewx/drivers/fousb.py", line 1065, in _find_device Nov 8 16:23:17 server weewx[8229]: engine: for bus in usb.busses(): Nov 8 16:23:17 server weewx[8229]: engine: File "/usr/lib/python2.7/dist-packages/usb/legacy.py", line 340, in busses Nov 8 16:23:17 server weewx[8229]: engine: _interop._sorted(core.find(find_all=True), key=lambda d: d.bus), Nov 8 16:23:17 server weewx[8229]: engine: File "/usr/lib/python2.7/dist-packages/usb/core.py", line 1189, in find Nov 8 16:23:17 server weewx[8229]: engine: import usb.backend.libusb1 as libusb1 Nov 8 16:23:17 server weewx[8229]: engine: File "/usr/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 29, in Nov 8 16:23:17 server weewx[8229]: engine: from ctypes import * Nov 8 16:23:17 server weewx[8229]: engine: File "/usr/lib/python2.7/ctypes/__init__.py", line 497, in Nov 8 16:23:17 server weewx[8229]: engine: _cast = PYFUNCTYPE(py_object, c_void_p, py_object, py_object)(_cast_addr) Nov 8 16:23:17 server weewx[8229]: engine: File "/usr/lib/python2.7/ctypes/__init__.py", line 491, in PYFUNCTYPE Nov 8 16:23:17 server weewx[8229]: engine: class CFunctionType(_CFuncPtr): Nov 8 16:23:17 server weewx[8229]: import of driver failed: () Nov 8 16:23:17 server weewx[8229]: engine: Unable to load driver: Nov 8 16:23:17 server weewx[8229]: 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.
[weewx-user] Can't start weewx automatically in Ubuntu 16.04
Hi, Last week I upgraded my Ubuntu on my server from 14.04 to 16.04. And after the upgrade I can't start weewx on boot any more. I have tried both whit upstart script and systemd. I've tried waiting after the boot is totatally completed and then "sudo /etc/init.d/weewx start" or "*sudo systemctl start weewx.service*" With the following exec: "*/usr/bin/weewxd --daemon --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf"* And the user is set to root in both init.d and systemd But the result is the same: Nov 4 22:08:04 server systemd[1]: Started weewx weather system. Nov 4 22:08:04 server weewx[10465]: engine: Initializing weewx version 3.6. 1 Nov 4 22:08:04 server weewx[10465]: engine: Using Python 2.7.12 (default, Jul 1 2016, 15:12:24) #012[GCC 5.4.0 20160609] Nov 4 22:08:04 server weewx[10465]: engine: Platform Linux-4.4.0-45-generic -x86_64-with-Ubuntu-16.04-xenial Nov 4 22:08:04 server weewx[10465]: engine: pid file is /var/run/weewx.pid Nov 4 22:08:04 server weewx[10470]: engine: Using configuration file /etc/ weewx/weewx.conf Nov 4 22:08:04 server weewx[10470]: engine: Initializing engine Nov 4 22:08:04 server weewx[10470]: engine: Loading station type FineOffsetUSB (weewx.drivers.fousb) Nov 4 22:08:04 server weewx[10470]: engine: Received signal TERM. Nov 4 22:08:04 server weewx[10470]: engine: Terminating weewx version 3.6.1 But if i ssh and tires to start the demon from command line it works perfect: Nov 8 12:08:14 server weewx[18210]: engine: Initializing weewx version 3.6. 1 Nov 8 12:08:14 server weewx[18210]: engine: Using Python 2.7.12 (default, Jul 1 2016, 15:12:24) #012[GCC 5.4.0 20160609] Nov 8 12:08:14 server weewx[18210]: engine: Platform Linux-4.4.0-45-generic -x86_64-with-Ubuntu-16.04-xenial Nov 8 12:08:14 server weewx[18210]: engine: pid file is /var/run/weewx.pid Nov 8 12:08:14 server weewx[18214]: engine: Using configuration file /etc/ weewx/weewx.conf Nov 8 12:08:14 server weewx[18214]: engine: Loading station type FineOffsetUSB (weewx.drivers.fousb) Nov 8 12:08:17 server weewx[18214]: fousb: driver version is 1.9 Nov 8 12:08:17 server weewx[18214]: fousb: polling mode is PERIODIC Nov 8 12:08:17 server weewx[18214]: fousb: polling interval is 60 Nov 8 12:08:23 server weewx[18214]: fousb: found station on USB bus= device = Nov 8 12:08:23 server weewx[18214]: engine: StdConvert target unit is 0x1 Nov 8 12:08:23 server weewx[18214]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad= prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardware Nov 8 12:08:23 server weewx[18214]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS Nov 8 12:08:23 server weewx[18214]: engine: Archive will use data binding wx_binding Nov 8 12:08:23 server weewx[18214]: engine: Record generation will be attempted in 'hardware' Nov 8 12:08:24 server weewx[18214]: engine: Using archive interval of 300 seconds (specified by hardware) Nov 8 12:08:34 server weewx[18214]: engine: Using binding 'wx_binding' to database 'weewx' Any one have any ideas what I am missing? Can it be something with systemd starting Python script? But then why is the demon starting and then exits after loading the driver? -- 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.