new weewx install not creating database or webpage

1,093 views
Skip to first unread message

Eric Koester

unread,
Apr 24, 2021, 1:24:14 PM4/24/21
to weewx-user
I downloaded weewx-4.5.1 source code from github and I've been following the setup.py method of install into a Ubuntu 20 virtual machine.

I created a 'weewx' Ubuntu user, so the /home/weewx directory structure would be created.
I've edited the weewx.conf file for my setup to use an RTL-SDR to receive data from an Acurite Atlas weather station.
The stock apache2 conf.d file included in weewx, points to the web server location of:
Alias /weewx /home/weewx/public_html
<Directory /home/weewx/public_html>
That public_html directory was not created by the installation process.  Was it supposed to?

When I manually start weewx with the suggested commands:
cd /home/weewx
sudo ./bin/weewxd

Parts of the system start and i see the SDR reading the Atlas data.
There doesn't appear to be a database file, and there isn't any webpage files being created or updated.

weewx@Ubuntu20-WEEWX:~/Desktop$ sudo tail -f /var/log/syslog
Apr 24 12:04:56 Ubuntu20-WEEWX weewx[16422] DEBUG weewx.engine: Finished loading service weewx.engine.StdPrint
Apr 24 12:04:56 Ubuntu20-WEEWX weewx[16422] DEBUG weewx.engine: Loading service weewx.engine.StdReport
Apr 24 12:04:56 Ubuntu20-WEEWX weewx[16422] DEBUG weewx.engine: Finished loading service weewx.engine.StdReport
Apr 24 12:04:56 Ubuntu20-WEEWX weewx[16422] INFO __main__: Starting up weewx version 4.5.1
Apr 24 12:04:56 Ubuntu20-WEEWX weewx[16422] DEBUG weewx.engine: Station does not support reading the time
Apr 24 12:04:56 Ubuntu20-WEEWX weewx[16422] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
Apr 24 12:04:56 Ubuntu20-WEEWX weewx[16422] INFO weewx.manager: Starting backfill of daily summaries
Apr 24 12:04:56 Ubuntu20-WEEWX weewx[16422] INFO weewx.manager: Empty database
Apr 24 12:04:56 Ubuntu20-WEEWX weewx[16422] INFO weewx.engine: Starting main packet loop.
Apr 24 12:04:59 Ubuntu20-WEEWX weewx[16422] DEBUG user.sdr: lines=[]
Apr 24 12:05:03 Ubuntu20-WEEWX weewx[16422] DEBUG user.sdr: lines=['{"time" : "2021-04-24 17:04:59", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 0, "battery_ok" : 1, "message_type" : 38, "wind_avg_mi_h" : 0.000, "wind_dir_deg" : 200.000, "rain_in" : 0.130, "strike_count" : 0, "strike_distance" : 31, "exception" : 0, "raw_msg" : "c011660006a08d009f09"}\n', '{"time" : "2021-04-24 17:04:59", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 1, "battery_ok" : 1, "message_type" : 38, "wind_avg_mi_h" : 0.000, "wind_dir_deg" : 200.000, "rain_in" : 0.130, "strike_count" : 0, "strike_distance" : 31, "exception" : 0, "raw_msg" : "c411660006a08d009f0d"}\n', '{"time" : "2021-04-24 17:04:59", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 2, "battery_ok" : 1, "message_type" : 38, "wind_avg_mi_h" : 0.000, "wind_dir_deg" : 200.000, "rain_in" : 0.130, "strike_count" : 0, "strike_distance" : 31, "exception" : 0, "raw_msg" : "c811660006a08d009f11"}\n']

I've gone through the install process several times, to be sure that no steps were missed, but it isn't working as expected.
Is this a known problem with version 4.5.1?

vince

unread,
Apr 24, 2021, 2:03:25 PM4/24/21
to weewx-user
Tested on debian10 (current raspi os) with the Simulator...
  •  you did not need to create /home/weewx, the 'setup.py install' will handle that for you
  •  public_html and webpages are not created by the installation process, they are created and populated when run weewx as a daemon and it runs its reports the first time
  •  there 'should' be a /home/weewx/archive/weewx.sdb created for you when you ran that 'weewxd' command the first time
If you run "sudo ./bin/wee_reports" then it'll create public_html and populate it for you immediately.

Als, if you're debugging a new system, set debug=1 in weewx.conf please, at least initially, so it logs more verbosely.

Eric Koester

unread,
Apr 24, 2021, 3:47:22 PM4/24/21
to weewx-user
Thanks for the information.
I have debug=1 set in the weewx.conf file.
I just ran 'sudo ./bin/wee_reports' and it created and populated the public_html directory with image files.

If I manually call "sudo ./bin/weewxd', I start seeing weather station data appear in the /var/log/syslog.

I followed the Debian instructions for adding a weewx daemon using the init.d commands.
I don't think it worked, because there is no evidence of weewx running.
- not seeing weather station data appearing in /var/log/syslog
- not seeing weewx in the "top" screen
- not seeing a /var/run/weewx.pid file
- no /home/weewx/public_html/index.html file is being created

Now, I guess the mystery is, why isn't weewx running as a daemon?

If I manually call 'sudo /etc/init.d/weewx start', I do not see any entries appear in the /var/log/syslog.

Didn't Ubuntu move to using 'service name start/stop' commands?

I can manually start weewx with 'sudo service weewx start' and the following appears in the /var/log/syslog:
Apr 24 14:29:21 Ubuntu20-WEEWX systemd[1]: Starting LSB: weewx weather system...
Apr 24 14:29:21 Ubuntu20-WEEWX systemd[1]: Started LSB: weewx weather system.

And I can manually stop weewx with 'sudo service weewx stop' and the following appears in the /var/log/syslog:
Apr 24 14:29:34 Ubuntu20-WEEWX systemd[1]: Stopping LSB: weewx weather system...
Apr 24 14:29:34 Ubuntu20-WEEWX systemd[1]: weewx.service: Succeeded.
Apr 24 14:29:34 Ubuntu20-WEEWX systemd[1]: Stopped LSB: weewx weather system.

weewx@Ubuntu20-WEEWX:~$ sudo service weewx status
● weewx.service - LSB: weewx weather system
     Loaded: loaded (/etc/init.d/weewx; generated)
     Active: inactive (dead) since Sat 2021-04-24 14:29:34 CDT; 6min ago
       Docs: man:systemd-sysv-generator(8)
    Process: 3737 ExecStart=/etc/init.d/weewx start (code=exited, status=0/SUCC>
    Process: 3747 ExecStop=/etc/init.d/weewx stop (code=exited, status=0/SUCCES>

Apr 24 14:29:21 Ubuntu20-WEEWX systemd[1]: Starting LSB: weewx weather system...
Apr 24 14:29:21 Ubuntu20-WEEWX systemd[1]: Started LSB: weewx weather system.
Apr 24 14:29:34 Ubuntu20-WEEWX systemd[1]: Stopping LSB: weewx weather system...
Apr 24 14:29:34 Ubuntu20-WEEWX systemd[1]: weewx.service: Succeeded.
Apr 24 14:29:34 Ubuntu20-WEEWX systemd[1]: Stopped LSB: weewx weather system.


vince

unread,
Apr 24, 2021, 4:20:11 PM4/24/21
to weewx-user
On Saturday, April 24, 2021 at 12:47:22 PM UTC-7 eric.k...@gmail.com wrote:
I followed the Debian instructions for adding a weewx daemon using the init.d commands.
I don't think it worked, because there is no evidence of weewx running.
- not seeing weather station data appearing in /var/log/syslog
- not seeing weewx in the "top" screen
- not seeing a /var/run/weewx.pid file
- no /home/weewx/public_html/index.html file is being created

Now, I guess the mystery is, why isn't weewx running as a daemon?

 
Without seeing exactly which commands you ran, it's impossible to help.
 

If I manually call 'sudo /etc/init.d/weewx start', I do not see any entries appear in the /var/log/syslog.
 
Didn't Ubuntu move to using 'service name start/stop' commands?


No, it moved 'away' from that toward systemd commands, although it works either way as a backward compatibility item. It moved YEARS ago to systemd.  You should just learn the new systemd way and use that.

If you want to go to systemd service files for weewx, you should remove the /etc/init.d/weewx file and install and enable the weewx service file that comes in the distribution.

(after you remove the init.d file you seem to have put into place)
sudo cp /home/weewx/util/systemd/weewx.service /etc/systemd/system
sudo systemctl enable weewx
sudo systemctl start weewx

Eric Koester

unread,
Apr 24, 2021, 5:06:20 PM4/24/21
to weewx-user
In the 2nd line of my first post, I gave the link to the directions I followed.
Here's that link, again:  https://weewx.com/docs/setup.htm

Section 4 tells Debian users to enter a bunch of init.d commands:

cd /home/weewx
sudo cp util/init.d/weewx.debian /etc/init.d/weewx
sudo chmod +x /etc/init.d/weewx
sudo update-rc.d weewx defaults 98
sudo /etc/init.d/weewx start

Those are wrong and outdated?
If so, the install instruction page needs to be updated!

vince

unread,
Apr 24, 2021, 5:24:37 PM4/24/21
to weewx-user
On Saturday, April 24, 2021 at 2:06:20 PM UTC-7 eric.k...@gmail.com wrote:
In the 2nd line of my first post, I gave the link to the directions I followed.
Here's that link, again:  https://weewx.com/docs/setup.htm

Section 4 tells Debian users to enter a bunch of init.d commands:

cd /home/weewx
sudo cp util/init.d/weewx.debian /etc/init.d/weewx
sudo chmod +x /etc/init.d/weewx
sudo update-rc.d weewx defaults 98
sudo /etc/init.d/weewx start

Those are wrong and outdated?
If so, the install instruction page needs to be updated!

Not a bug.
This comes up frequently.

Weewx supports many operating systems and versions, including some old ones that do not have systemd.
Fortunately the newer os versions support both init.d 'and' systemd ways of getting there.

So on a modern ubuntu/debian/centos you can use either the legacy init.d way or the newer systemd way.
Your choice.

FWIW, It is assumed that people who use setup.py have the skills/experience to hook weewx into the startup sequence in the way 'they' want, and know how to do that.  If you want more of a one-command shrink-wrapped kind of installer that does everything for you, you should use the pre-packaged variant of weewx.


Eric Koester

unread,
Apr 26, 2021, 9:32:24 PM4/26/21
to weewx-user
I am willing to try switching to the systemd method.
It would still be nice to know why the publishes instructions for init.d startup method did not work, as expected.

I've been using various Debian Linux systems at home since 2007, and using init.d and update-rc.d commands to autostart software the whole time.
This is the first time I've seen it fail to work, and that's the reason for the posting.
After following the published instructions, I'm trying to understand what has gone wrong, 

Earlier, I was trying to troubleshoot the startup problem by pointing out what was working and what wasn't working.
What can be done to troubleshoot?  
Thanks.

Eric Koester

unread,
Apr 26, 2021, 10:35:22 PM4/26/21
to weewx-user
I removed the init.d related files and copied the systemd files as you demonstrated.
I can see the signs of it working:
- the pid file '/var/run/weewx.pid' exists
- after running this command 'sudo tail -f /var/log/syslog' I see weather station data being recieved every 10 seconds
- the database file /home/weewx/archive/weewx.sdb got accessed when I entered 'sudo systemctl start weewx'

However, there is still no index.html file in the /home/weewx/public_html directory.

What other files and processes should I be seeing?

p q

unread,
Apr 26, 2021, 10:43:05 PM4/26/21
to weewx...@googlegroups.com
Where does the log file say the files are being copied to?
Where does weewx.conf have for  HTML_ROOT ?

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/a6d73a65-e05b-4a4c-ad07-c75384737972n%40googlegroups.com.


--
Peter Quinn
(415)794-2264

vince

unread,
Apr 26, 2021, 10:49:07 PM4/26/21
to weewx-user
Standard answer applies here.

You need to provide us your syslog from when weewx starts to 2x the archive time period you have configured....or run "sudo /home/weewx/bin/wee_reports" to force it to run the reports immediately and provide what you see in the console, which should 'also' generate syslog entries.

I might add that I provide docs updates to add the systemd commands which were merged into the the development branch, so those will be in the docs in a future release.   I think eventually the old init.d stuff will be sunset eventually  that almost every current os is based on systemd, but either way works on all systemd systems I have access to (debian/ubuntu/centos8/rhel8)

Graham Eddy

unread,
Apr 26, 2021, 10:50:49 PM4/26/21
to weewx...@googlegroups.com
… and wait 5 minutes for the first report i.e. for index.html to be created. see whether logfile reports errors generating it

vince

unread,
Apr 26, 2021, 10:51:20 PM4/26/21
to weewx-user
Wow - google mangled the last paragraph in what I typed....here's one that reads correctly...

On Monday, April 26, 2021 at 7:49:07 PM UTC-7 vince wrote:
Standard answer applies here.

You need to provide us your syslog from when weewx starts to 2x the archive time period you have configured....or run "sudo /home/weewx/bin/wee_reports" to force it to run the reports immediately and provide what you see in the console, which should 'also' generate syslog entries.

I might add that I provided some docs updates to add the systemd commands to the setup.py instructions for Debian, which were merged into the the development branch, so those will be in the docs in a future release.   I think the old init.d stuff will be sunset eventually now that almost every current os is based on systemd, but either way works on all systemd systems I have access to (debian/ubuntu/centos8/rhel8)

Eric Koester

unread,
Apr 26, 2021, 10:54:06 PM4/26/21
to weewx-user
I'm not sure where the log file is.  In /var/log/syslog?
Here's the relevant section of the weewx.conf file:
##############################################################################

# This section is for general configuration information.

# Set to 1 for extra debug info, otherwise comment it out or set to zero
debug = 1

# Root directory of the weewx data file hierarchy for this station
WEEWX_ROOT = /home/weewx

# Whether to log successful operations
log_success = True

# Whether to log unsuccessful operations
log_failure = True

# 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 = 4.5.1

##############################################################################

Eric Koester

unread,
Apr 26, 2021, 11:07:59 PM4/26/21
to weewx-user
I think Vince pointed me to the syslog, as the log to look in.

The 'archive time period' is at the default 300 (seconds?).
I don't think the Acurite Atlas weather sensor holds any history, so I suspect I could lower the 'archive time period' to a single digit?

I ran wee_reports and here's what appeared in the syslog:

Apr 26 21:56:32 Ubuntu20-WEEWX weewx[3583] DEBUG user.sdr: lines=[]
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.engine.StdTimeSynch
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.engine.StdTimeSynch
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.engine.StdConvert
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.engine: StdConvert target unit is 0x1
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.engine.StdConvert
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.engine.StdCalibrate
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.engine.StdCalibrate
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.engine.StdQC
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.engine.StdQC
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.wxservices.StdWXCalculate
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.manager: Daily summary version is 4.0
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.wxservices.StdWXCalculate
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.wxxtypes.StdWXXTypes
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdWXXTypes
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.wxxtypes.StdPressureCooker
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdPressureCooker
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.wxxtypes.StdRainRater
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdRainRater
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.wxxtypes.StdDelta
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdDelta
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.engine.StdArchive
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.engine: Archive will use data binding wx_binding
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.engine: Record generation will be attempted in 'hardware'
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.engine: Using archive interval of 300 seconds (specified by hardware)
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Use LOOP data in hi/low calculations: 1
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.engine.StdArchive
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.restx.StdStationRegistry
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.restx: StationRegistry: Station will be registered.
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.restx.StdStationRegistry
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.restx.StdWunderground
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.restx: Wunderground: Posting not enabled.
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.restx.StdWunderground
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.restx.StdPWSweather
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.restx: PWSweather: Posting not enabled.
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.restx.StdPWSweather
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.restx.StdCWOP
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.restx: CWOP: Posting not enabled.
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.restx.StdCWOP
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.restx.StdWOW
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.restx: WOW: Posting not enabled.
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.restx.StdWOW
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.restx.StdAWEKAS
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.restx: AWEKAS: Posting not enabled.
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.restx.StdAWEKAS
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.engine.StdPrint
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.engine.StdPrint
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Loading service weewx.engine.StdReport
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.engine: Finished loading service weewx.engine.StdReport
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.manager: Daily summary version is 4.0
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.reportengine: Running reports for latest time in the database.
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.reportengine: Running report 'SeasonsReport'
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.reportengine: Found configuration file /home/weewx/skins/Seasons/skin.conf for report 'SeasonsReport'
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras', 'weewx.cheetahgenerator.JSONHelpers']
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.manager: Daily summary version is 4.0
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.cheetahgenerator: Skipping template NOAA/NOAA-%Y-%m.txt.tmpl: cannot find start time
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.cheetahgenerator: Skipping template NOAA/NOAA-%Y.txt.tmpl: cannot find start time
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.cheetahgenerator: Skipping template index.html.tmpl: cannot find start time
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.cheetahgenerator: Skipping template statistics.html.tmpl: cannot find start time
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.cheetahgenerator: Skipping template telemetry.html.tmpl: cannot find start time
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.cheetahgenerator: Skipping template tabular.html.tmpl: cannot find start time
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.cheetahgenerator: Skipping template celestial.html.tmpl: cannot find start time
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.cheetahgenerator: Skipping template rss.xml.tmpl: cannot find start time
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.cheetahgenerator: Generated 0 files for report SeasonsReport in 0.01 seconds
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.manager: Daily summary version is 4.0
Apr 26 21:56:35 Ubuntu20-WEEWX weewx[3583] DEBUG user.sdr: lines=[]
Apr 26 21:56:36 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.imagegenerator: Generated 60 images for report SeasonsReport in 1.86 seconds
Apr 26 21:56:36 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.reportengine: Copied 5 files to /home/weewx/public_html
Apr 26 21:56:36 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.reportengine: Report 'SmartphoneReport' not enabled. Skipping.
Apr 26 21:56:36 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.reportengine: Report 'MobileReport' not enabled. Skipping.
Apr 26 21:56:36 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.reportengine: Report 'StandardReport' not enabled. Skipping.
Apr 26 21:56:36 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.reportengine: Report 'FTP' not enabled. Skipping.
Apr 26 21:56:36 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.reportengine: Report 'RSYNC' not enabled. Skipping.
Apr 26 21:56:40 Ubuntu20-WEEWX weewx[3583] DEBUG user.sdr: lines=['{"time" : "2021-04-27 02:56:36", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 0, "battery_ok" : 1, "message_type" : 38, "wind_avg_mi_h" : 0.000, "wind_dir_deg" : 197.000, "rain_in" : 0.130, "strike_count" : 2, "strike_distance" : 8, "exception" : 0, "raw_msg" : "c011660006148d004826"}\n', '{"time" : "2021-04-27 02:56:36", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 1, "battery_ok" : 1, "message_type" : 38, "wind_avg_mi_h" : 0.000, "wind_dir_deg" : 197.000, "rain_in" : 0.130, 

vince

unread,
Apr 26, 2021, 11:37:02 PM4/26/21
to weewx-user
On Monday, April 26, 2021 at 8:07:59 PM UTC-7 eric.k...@gmail.com wrote:
I think Vince pointed me to the syslog, as the log to look in.

Yes - that would be /var/log/syslog or /var/log/messages depending on your os.  Likely 'syslog'. 
 
The 'archive time period' is at the default 300 (seconds?).

Yes - 5 minutes
 
I don't think the Acurite Atlas weather sensor holds any history, so I suspect I could lower the 'archive time period' to a single digit?


No - don't touch anything.  It's already not working.  Lets get it working first.

 
I ran wee_reports and here's what appeared in the syslog:
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.cheetahgenerator: Skipping template index.html.tmpl: cannot find start time
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.cheetahgenerator: Skipping template statistics.html.tmpl: cannot find start time
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.cheetahgenerator: Skipping template telemetry.html.tmpl: cannot find start time
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.cheetahgenerator: Skipping template tabular.html.tmpl: cannot find start time
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.cheetahgenerator: Skipping template celestial.html.tmpl: cannot find start time
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.cheetahgenerator: Skipping template rss.xml.tmpl: cannot find start time
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.cheetahgenerator: Generated 0 files for report SeasonsReport in 0.01 seconds
Apr 26 21:56:34 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.manager: Daily summary version is 4.0
Apr 26 21:56:35 Ubuntu20-WEEWX weewx[3583] DEBUG user.sdr: lines=[]
Apr 26 21:56:36 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.imagegenerator: Generated 60 images for report SeasonsReport in 1.86 seconds
Apr 26 21:56:36 Ubuntu20-WEEWX wee_reports[4071] INFO weewx.reportengine: Copied 5 files to /home/weewx/public_html
Apr 26 21:56:36 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.reportengine: Report 'SmartphoneReport' not enabled. Skipping.
Apr 26 21:56:36 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.reportengine: Report 'MobileReport' not enabled. Skipping.
Apr 26 21:56:36 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.reportengine: Report 'StandardReport' not enabled. Skipping.
Apr 26 21:56:36 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.reportengine: Report 'FTP' not enabled. Skipping.
Apr 26 21:56:36 Ubuntu20-WEEWX wee_reports[4071] DEBUG weewx.reportengine: Report 'RSYNC' not enabled. Skipping.
Apr 26 21:56:40 Ubuntu20-WEEWX weewx[3583] DEBUG user.sdr: lines=['{"time" : "2021-04-27 02:56:36", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 0, "battery_ok" : 1, "message_type" : 38, "wind_avg_mi_h" : 0.000, "wind_dir_deg" : 197.000, "rain_in" : 0.130, "strike_count" : 2, "strike_distance" : 8, "exception" : 0, "raw_msg" : "c011660006148d004826"}\n', '{"time" : "2021-04-27 02:56:36", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 1, "battery_ok" : 1, "message_type" : 38, "wind_avg_mi_h" : 0.000, "wind_dir_deg" : 197.000, "rain_in" : 0.130, 



Let it run for another 10 minutes and look again.   The report generator can't generate reports if there's no data in the database yet.

I don't know enough about the SDR driver to know if you have it configured correctly, but it's possible you don't have some kind of mapping of SDR to weewx db completed in your weewx.conf - if nothing shows up in 15 minutes (3 report cycles) and 'if' you see the same 'cannot start time' messages, I'm guessing this might be the issue.  If it's still generating nothing in 15 minutes we would need to see your entire weewx.conf (with any usernames/passwords/keys obfuscated please).



Eric Koester

unread,
Apr 27, 2021, 12:17:05 AM4/27/21
to weewx-user
Ok...20+ minutes later and no index.html report

I manually ran wee_reports again and the same 'cannot find start time' appeared in the syslog.

Attached is a redacted copy of the weewx.conf.

Thanks for looking it over.
Eric

weewx.conf.zip

vince

unread,
Apr 27, 2021, 1:35:12 AM4/27/21
to weewx-user
I'm going to have to give up here.

The  log info you've provided is not enough to go on.  We need your syslog for at least two or three archive periods after you restart weewx.   The 'very' limited data you've provided so far is missing a lot of elements in your sensor_map, so I'm not certain your map is even correct.

Somebody who runs the same gear as you is going to be needed to work this one, once you post enough of the syslog for folks to be able to try to help more.


Eric Koester

unread,
Apr 27, 2021, 3:09:22 AM4/27/21
to weewx...@googlegroups.com
Did you find the weewx.conf file to be free of problems?

Here is a 40 minute segment of the syslog - from the start of a boot of the Ubuntu 20 virtual machine.
You can see the weewx service starting and 'Loading station type SDR (user.sdr)'.


--
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/yejkXG-_uZo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/030dadf7-e3de-4ad5-9a32-9a9094a2a4f0n%40googlegroups.com.
syslog.zip

gjr80

unread,
Apr 27, 2021, 5:27:41 AM4/27/21
to weewx-user
Hi,

I think you need to take a step back and work through this carefully and methodically. The weewx.conf you posted a couple of posts ago is for a setup.py install, ie WeeWX is installed in /home/weewx. The syslog extract you provided is for a WeeWX install that was installed as a package (ie not installed via setup.py) where weewx.conf is located in /etc/weewx. This makes it impossible to reconcile one against the other (and in this case determine if you have any obvious issues in weewx.conf).

You need to forget about index.html and wee_reports for the time being, you have a fundamental config problem with the sdr driver that is preventing WeeWX from receiving data. No data in means no data to the database which means no WeeWX output. So wee_reports will not do anything mainingful and index.html will not be produced.

When obtaining a log extract you should edit weewx.conf, set debug = 1, save weewx.conf and restart WeeWX. Let WeeWX run for at least two archive periods (in you case 10 minutes) and then take a copy of the log showing the full WeeWX startup and the 10 minutes of log activity. Post the log extract here, no zips or compressed files, just plain text (far easier for us to read on mobile devices etc). Don’t restart WeeWX multiple times or post excessively long log extracts (unless expressly asked for), again far easier for us to read if your log extract is not excessively long.

In terms of your sdr problem, I would sort out your WeeWX install (is it setup.py or a package install ?). I would then work through the ‘Configuration’ and ‘How to diagnose problems‘ sections (in order) of the sdr driver readme to make sure you have the sdr driver properly configured. If you are still stuck, come back here and post a sanitised copy of (the correct) weewx.conf (the wee_debug utility can do this for you) as well as a log extract as I described above.

Gary

Eric Koester

unread,
Apr 27, 2021, 12:07:47 PM4/27/21
to weewx...@googlegroups.com
On Tue, Apr 27, 2021 at 4:27 AM gjr80 <gjrod...@gmail.com> wrote:
Hi,

I think you need to take a step back and work through this carefully and methodically. The weewx.conf you posted a couple of posts ago is for a setup.py install, ie WeeWX is installed in /home/weewx. The syslog extract you provided is for a WeeWX install that was installed as a package (ie not installed via setup.py) where weewx.conf is located in /etc/weewx. This makes it impossible to reconcile one against the other (and in this case determine if you have any obvious issues in weewx.conf).

I just looked back in the syslog I shared overnight (4-27-2021) and did not see any references to /etc/weewx.
I initially installed the weewx system using Ubuntu 20 dpkg files.  (weewx, weewx-sdr, rtl_433)
That system did not work, due to rtl_433 in the Ubuntu 20 dpkg repo being too old to have support for the Acurite Atlas.
While trying to troubleshoot the various configuration files, I found it very messy and confusing to have weewx files scattered all over the system, so I did "sudo apt remove weewx', and reinstalled with the setup.py method, so all the weewx files got put in one place - the /home/weewx directory.
Since I did not use 'sudo apt purge weewx', there were files left over in /etc/weewx and /usr/share/weewx/user.
To keep people from being confused, I just manually removed all the contents of /etc/weewx and /usr/share/weewx/user.

You need to forget about index.html and wee_reports for the time being, you have a fundamental config problem with the sdr driver that is preventing WeeWX from receiving data. No data in means no data to the database which means no WeeWX output. So wee_reports will not do anything mainingful and index.html will not be produced.

OK, understood.  
I see 3 main pieces to using the SDR to gather the weather sensor data:
1. weewx-sdr
I followed the install instructions from the weewx-sdr readme file.  As long as those instructions are up to date, it is likely working right.  
I will have to post in the github issues list to see if they can help determine if it is working right.
2. rtl_433
Since the rtl_433 in the Ubuntu 20 dpkg repo was too old, I had to remove the dpkg and compile current rtl_433 source code.
I know that rtl_433 is working, because the weather sensor data appears in the syslog every 10-20 seconds.
3. the Sensor Map section of the weewx.conf file 
I suspect the Sensor Map section in the weewx.conf file may be the problem.  
I copied that Atlas-specific Sensor Map section from a post in the rtl_433 Google Group.  
I changed the ID number and variable names to fit the Acurite Atlas, but am not 100% sure of all the needed modifications.
 
When obtaining a log extract you should edit weewx.conf, set debug = 1, save weewx.conf and restart WeeWX. Let WeeWX run for at least two archive periods (in you case 10 minutes) and then take a copy of the log showing the full WeeWX startup and the 10 minutes of log activity. Post the log extract here, no zips or compressed files, just plain text (far easier for us to read on mobile devices etc). Don’t restart WeeWX multiple times or post excessively long log extracts (unless expressly asked for), again far easier for us to read if your log extract is not excessively long.

I found that Google Groups would not let me attach a file to my post unless it was a zip file....so I attached a zip file.
If I have to post a 10 minute syslog extract in the message body, it is going to be long.  

In terms of your sdr problem, I would sort out your WeeWX install (is it setup.py or a package install ?).

This is a "setup.py" installation.

I would then work through the ‘Configuration’ and ‘How to diagnose problems‘ sections (in order) of the sdr driver readme to make sure you have the sdr driver properly configured. If you are still stuck, come back here and post a sanitised copy of (the correct) weewx.conf (the wee_debug utility can do this for you) as well as a log extract as I described above.

I copied the [SDR] section of the weewx.conf file directly from that weewx-sdr readme file.
The command calls and structures should be correct.  The details in the variable names are not 100% clear.

This is difficult to troubleshoot with the system functionality spread across multiple groups of developers!

Eric

vince

unread,
Apr 27, 2021, 12:40:49 PM4/27/21
to weewx-user
On Tuesday, April 27, 2021 at 9:07:47 AM UTC-7 eric.k...@gmail.com wrote:
This is difficult to troubleshoot with the system functionality spread across multiple groups of developers!


Eric - you are trying to do something relatively difficult.  The SDR stuff is a bit complex.  You using a newer os means you got forced from dpkg to setup.py which ups the ante on the difficulty side a bit.  Once you reached the point where you had to compile anything, it's now in the 'this is gonna be tough' level of effort.

This thread points out why I want to add to that evolving weewx FAQ that I mentioned in another thread.  It points out multiple questions on the to-do list there:
  • how to ask for help
  • what data to provide and how
  • should I use setup.py or packaged install
  • where are my logs
  • why didn't I get the web pages I expected
 The main issue here which I speculated last night, and as Gary agreed, is that first you need the driver to get the data into the database.  Take a breath and baseline your system to a known state.  Change one thing at a time.  Go slowly.  It'll get there.

Eric Koester

unread,
Apr 27, 2021, 1:06:43 PM4/27/21
to weewx-user
I just posted a request for help on the weewx-sdr github issues tab.
I demonstrated weewx-sdr working by calling '/home/weewx/bin/user/sdr.py' and showing the valid weather station output.
I asked them to look over my weewx.conf file for corrections.

For my own information, I just ran wee_debug and it confirms the database is empty.

System info
  Platform:       Linux-5.8.0-50-generic-x86_64-with-glibc2.32
  Python Version: 3.8.6

Load Information
  1 minute load average:  0.00
  5 minute load average:  0.07
  15 minute load average: 0.11

General Weewx info
  Weewx version 4.5.1 detected.

Station info
  Station type: SDR
  Driver:       user.sdr

Driver info

Currently installed extensions
Extension Name    Version   Description
sdr               0.78      Capture data from rtl_433

Archive info
  Database name:        weewx.sdb
  Table name:           archive
  Version               4.0
  Unit system:          None (Unknown unit constant)
  First good timestamp: ******* N/A *******     (    N/A   )
  Last good timestamp:  ******* N/A *******     (    N/A   )
  Number of records:    None (no archive records found)
                        It is likely that the database (weewx.sdb) archive table (archive)
                        exists but contains no data.
  weewx (weewx.conf) is set to use an archive interval of 300 seconds.
  The station hardware was not interrogated in determining archive interval.

Databases configured in weewx.conf
  Database name:        weewx.sdb
  Database driver:      weedb.sqlite

  Database name:        weewx
  Database driver:      weedb.mysql
  Database host:        localhost


Parsed and obfuscated weewx.conf

Eric Koester

unread,
Apr 27, 2021, 2:54:19 PM4/27/21
to weewx-user
I got some hints/tips on getting the correct variable names from the parsed and unparsed data that the sdr.py produces.

I am now getting data into the database and the index.html file has been produced!

Oddly, the Firefox browser is able to display file:///home/weewx/public_html/index.html , but Chromium is not.  I get an error from Chromium:

Access to the file was denied

The file at file:///home/weewx/public_html/index.html is not readable. It may have been removed, moved, or file permissions may be preventing access.

Now, I'm tweaking the [sensor_map] variables so they line up with the variables in weewx, and all the collected data gets displayed.


##############################################################################

[SDR]
    # This section is for the software-defined radio driver.
    # collect data from Acurite Atlas sensor 0011
    
    # The driver to use
    driver = user.sdr
    cmd = rtl_433 -R 40 -M utc -F json
    
    [[sensor_map]]
        outTemp = temperature.0011.AcuriteAtlasPacket
        outHumidity = humidity.0011.AcuriteAtlasPacket
        windSpeed = wind_speed.0011.AcuriteAtlasPacket
        windDir = wind_dir.0011.AcuriteAtlasPacket
        UV = uv.0011.AcuriteAtlasPacket
        rain_total = rain_total.0011.AcuriteAtlasPacket
        lux = lux.0011.AcuriteAtlasPacket
        strikes_total = strike_count.0011.AcuriteAtlasPacket
        strike_distance = strike_distance.0011.AcuriteAtlasPacket
        BatteryStatus = battery.0011.AcuriteAtlasPacket
        
    [[Corrections]]
        strike_distance = strike_distance if Lightning_Strikes > 0 else None

##############################################################################

Eric Koester

unread,
Apr 27, 2021, 9:32:16 PM4/27/21
to weewx-user
Thanks for the hints and suggestions.
I'm over the hump.  
Data is flowing from rtl_433, to weewx-sdr, to weewx!

Now, the fine tuning and preference tweaking can occur!

Is there any big downside to lowering the archive interval to 60 seconds?
What are your favorite weewx webpage skins?

Eric

p q

unread,
Apr 27, 2021, 9:39:38 PM4/27/21
to weewx...@googlegroups.com
Biggest downside to decreasing the interval is the increase in database size for no real gain in accuracy. I have my interval set at 2 minutes and I am thinking about thinning out some of the historical data because the database is 140MB and goes up by about 4mb a month.

There is a real time extension that operates as fast as the data comes in, so if you're looking at wind speed/direction, you can get that.

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/bc4f3073-2f11-452e-9254-dcb40a51b012n%40googlegroups.com.


--
Peter Quinn
(415)794-2264

Eric K

unread,
May 25, 2021, 1:01:11 PM5/25/21
to weewx-user
I want to point out an error from above, so no one copies my mistake.
The [[Corrections]] section does not belong in the [SDR] driver section!

Here's how it should look:

##############################################################################

[SDR]
    # This section is for the software-defined radio driver.
    # collect data from Acurite Atlas sensor 0011
    
    # The driver to use
    driver = user.sdr
    cmd = rtl_433 -R 40 -M utc -F json
    
    [[sensor_map]]
        outTemp = temperature.0011.AcuriteAtlasPacket
        outHumidity = humidity.0011.AcuriteAtlasPacket
        windSpeed = wind_speed.0011.AcuriteAtlasPacket
        windDir = wind_dir.0011.AcuriteAtlasPacket
        UV = uv.0011.AcuriteAtlasPacket
        Atlas_rain_total = rain_total.0011.AcuriteAtlasPacket
        lux = lux.0011.AcuriteAtlasPacket
        Atlas_strike_count = strike_count.0011.AcuriteAtlasPacket
        lightning_distance = strike_distance.0011.AcuriteAtlasPacket
        BatteryStatus = battery.0011.AcuriteAtlasPacket

    [[deltas]]
        rain = Atlas_rain_total        
        lightning_strike_count = Atlas_strike_count
                
##############################################################################

[StdCalibrate]
    
    [[Corrections]]
        lightning_distance = lightning_distance if Atlas_stike_count > 0 else None
Reply all
Reply to author
Forward
0 new messages