The problem appears to be that I also read the instructions in cmon,py so I added:
[ComputerMonitor]
database = computer_sqlite
max_age = 2592000 # 30 days
hashing out the line max_age = 2592000 # 30 days and re-starting weewx removes the error.
I was puzzled about None or none. In cmon.py to my uneducated eye it appeared to be looking for none and setting the value to None but I copied your example and weewx restarted with out errors.
Something else I have notice and are also a little puzzled by is the the cmon plots are update on the 10 minuites (e.g. 18:10, 18:20, 18:30 etc) but all my other day plots update on the 5 minuites (18:05, 18:10, 18:15, 18:20 etc). See my server page and check back 5 minutes latter to see Williams plots have updated but the cmon plots do not.
Is that how it is meant to work? In the instruction wiki it states "cmon will save data to the computer database at every archive interval" which is set at 300 seconds. I have all the day plots together in skin.conf and cannot see any setting I have missed.
I have also had a scalling issue with the values on the Y axis. My solution has been to go through cmon.py adding a few "/ 1024" and "/ 1048576" change the scale into kB and MB where I required it.
Matt, on my system my network interface is thru eth1. When I replace eth0 with eth1 in the cmon.py and skin.conf files I receive the following errors in my syslog:
take a look at your cmon database to see whether the timestamps correspond to the archive record timestamps
Hi,
I've done everything mentioned here in the posts.
But I still have the following errors:
Jan 15 17:10:50 raspberrypi weewx[2628]: **** File "/usr/share/weewx/weewx/reportengine.py", line 312, in _getArchive
Jan 15 17:10:50 raspberrypi weewx[2628]: **** if archive_name not in self.archive_cache:
Jan 15 17:10:50 raspberrypi weewx[2628]: **** TypeError: unhashable type: 'list'
Jan 15 17:10:50 raspberrypi weewx[2628]: **** Generator terminated...
Any idea?
##############################################################################
# #
# WEEWX CONFIGURATION FILE #
# #
# Copyright (c) 2009-2013 Tom Keffer <tke...@gmail.com> #
# $Id: weewx.conf 1823 2013-12-30 23:48:21Z mwall $
##############################################################################
# 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 = /etc/weewx
# How long to wait before timing out a socket (FTP, HTTP) connection:
socket_timeout = 20
# Do not modify this - it is used by setup.py when installing and updating.
version = 2.5.1
##############################################################################
[Station]
# This section is for information about your station
# Description of the station location. If there is a comma in the
# description, then put the description in quotes.
location = "Juelich-Mersch, Germany"
# Latitude, longitude in decimal degrees
latitude = 50.960
longitude = 6.378
# Altitude of the station, with unit it is in. This is downloaded from
# from the station if the hardware supports it.
altitude = 99, meter
# 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
# Set to type of station hardware. Supported stations include:
# Vantage
# WMR100
# WMR200
# WMR9x8
# FineOffsetUSB
# WS28xx
# WS23xx
# TE923
# Simulator
station_type = WMR100
# If you have a website, you may optionally specify an URL for
# its HTML server.
station_url = http://www.wetternet.org
##############################################################################
[Vantage]
# This section is for configuration info for a Davis VantagePro2,
# VantageVue or WeatherLinkIP
# Connection type: serial or ethernet
# serial (the classic VantagePro)
# ethernet (the WeatherLinkIP)
type = serial
# If the connection type is serial, a port must be specified:
# Debian, Ubuntu, Redhat, Fedora, and SuSE:
# /dev/ttyUSB0 is a common USB port name
# /dev/ttyS0 is a common serial port name
# BSD:
# /dev/cuaU0 is a common serial port name
port = /dev/ttyUSB0
# If the connection type is ethernet, an IP Address/hostname is required:
host = 1.2.3.4
######################################################
# The rest of this section rarely needs any attention.
# You can safely leave it "as is."
######################################################
# Serial baud rate (usually 19200)
baudrate = 19200
# TCP port (when using the WeatherLinkIP)
tcp_port = 22222
# TCP send delay (when using the WeatherLinkIP):
tcp_send_delay = 1
# The id of your ISS station (usually 1)
iss_id = 1
# How long to wait for a response from the station before giving up (in
# seconds; must be greater than 2)
timeout = 5
# How long to wait before trying again (in seconds)
wait_before_retry = 1.2
# How many times to try before giving up:
max_tries = 4
# The driver to use:
driver = weewx.drivers.vantage
##############################################################################
[WMR100]
# This section is for the Oregon Scientific WMR100
# How long a wind record can be used to calculate wind chill (in seconds)
stale_wind = 30
# The driver to use
driver = weewx.drivers.wmr100
##############################################################################
[WMR200]
# This section is for the Oregon Scientific WMR200
# The driver to use
driver = weewx.drivers.wmr200
##############################################################################
[WMR9x8]
# This section is for the Oregon Scientific WMR918/968
# Connection type. For now, 'serial' is the only option.
type = serial
# Serial port such as /dev/ttyS0, /dev/ttyUSB0, or /dev/cuaU0
port = /dev/ttyUSB0
# The driver to use
driver = weewx.drivers.wmr9x8
##############################################################################
[FineOffsetUSB]
# This section is for the Fine Offset series of weather stations.
# The station model, e.g., WH1080, WS1090, WS2080, WH3081
model = WS2080
# The polling mode can be PERIODIC or ADAPTIVE
polling_mode = PERIODIC
# How often to poll the station for data, in seconds
polling_interval = 60
# The pressure calibration offset, in hPa (millibars)
pressure_offset = 0
# The driver to use
driver = weewx.drivers.fousb
##############################################################################
[WS23xx]
# This section is for the La Crosse WS-2300 series of weather stations.
# Serial port such as /dev/ttyS0, /dev/ttyUSB0, or /dev/cuaU0
port = /dev/ttyUSB0
# The WS23xx is branded by various vendors. Use the model parameter to
# indicate the brand, e.g., 'LaCrosse WS2317' or 'TFA Primus'
model = LaCrosse WS23xx
# The pressure calibration offset, in hPa (millibars)
pressure_offset = 0
# The driver to use
driver = weewx.drivers.ws23xx
##############################################################################
[WS28xx]
# This section is for the La Crosse WS-2800 series of weather stations.
# Radio frequency to use between USB transceiver and console: US or EU
# US uses 915 MHz, EU uses 868.3 MHz. Default is US.
transceiver_frequency = US
# The WS28xx is branded by various vendors. Use the model parameter to
# indicate the brand, e.g., 'LaCrosse C86234' or 'TFA Primus'
model = LaCrosse WS28xx
# The pressure calibration offset, in hPa (millibars)
pressure_offset = 0
# The driver to use
driver = weewx.drivers.ws28xx
##############################################################################
[TE923]
# This section is for the Hideki TE923 series of weather stations.
# The TE923 is branded by various vendors. Use the model parameter to
# indicate the brand, e.g., 'Meade TE923W' or 'TFA Nexus'
model = TE923
# The driver to use
driver = weewx.drivers.te923
# The default configuration associates the channel 1 sensor with outTemp
# and outHumidity. To change this, or to associate other channels with
# specific columns in the database schema, use the following maps.
[[sensor_map]]
# Map the remote sensors to columns in the database schema.
outTemp = t_1
outHumidity = h_1
extraTemp1 = t_2
extraHumid1 = h_2
extraTemp2 = t_3
extraHumid2 = h_3
extraTemp3 = t_4
# WARNING: the following are not in the default schema
extraHumid3 = h_4
extraTemp4 = t_5
extraHumid4 = h_5
[[battery_map]]
txBatteryStatus = batteryUV
windBatteryStatus = batteryWind
rainBatteryStatus = batteryRain
outTempBatteryStatus = battery1
# WARNING: the following are not in the default schema
extraBatteryStatus1 = battery2
extraBatteryStatus2 = battery3
extraBatteryStatus3 = battery4
extraBatteryStatus4 = battery5
##############################################################################
[Simulator]
# This section for the weewx weather station simulator
# The time (in seconds) between LOOP packets.
loop_interval = 2.5
# The simulator mode can be either 'simulator' or 'generator'.
# Real-time simulator. Sleep between each LOOP packet.
mode = simulator
# Generator. Emit LOOP packets as fast as possible (useful for testing).
#mode = generator
# The start time. If not specified, the default is to use the present time.
#start = 2011-01-01 00:00
driver = weewx.drivers.simulator
##############################################################################
[StdRESTful]
# This section is for uploading data to sites using RESTful protocols.
[[Wunderground]]
# This section is for configuring posts to the Weather Underground
# If you wish to do this, uncomment the following station and password
# lines and fill them with your station and password:
#station = your Weather Underground station ID (eg, KORHOODR3)
#password = your Weather Underground password
driver = weewx.restful.Ambient
[[PWSweather]]
# This section is for configuring posts to PWSweather.com
# If you wish to do this, uncomment the following station and password
# lines and fill them with your station and password:
#station = your PWSweather station ID (eg, KORHOODR3)
#password = your PWSweather password
driver = weewx.restful.Ambient
[[CWOP]]
# This section is for configuring posts to CWOP
# If you wish to do this, make sure the following line is uncommented
# and filled out with your station ID:
#station = CW1234
# If you are an APRS (radio amateur) station, you will need a passcode
# as well:
#passcode = your passcode here eg, 12345 (APRS stations only)
# Comma separated list of server:ports to try:
server = cwop.aprs.net:14580, cwop.aprs.net:23
# How often we should post in seconds. 0=with every archive record
interval = 600
driver = weewx.restful.CWOP
[[StationRegistry]]
# Uncomment the following line to register this weather station.
#register_this_station = True
# Specify a station URL, otherwise the station_url from [Station]
# will be used.
#station_url = http://example.com/weather/
# Specify a description of the station, otherwise the location from
# [Station] will be used.
#description = The greatest station on earth
driver = weewx.restful.StationRegistry
##############################################################################
[StdReport]
# This section specifies what reports, using which skins, to generate.
# Where the skins reside, relative to WEEWX_ROOT:
SKIN_ROOT = /etc/weewx/skins
# Where the generated reports should go, relative to WEEWX_ROOT:
HTML_ROOT = /var/www/
# Each subsection represents a report you wish to run:
[[StandardReport]]
# What skin this report should be based on:
skin = Alf_normal
[[AlfNormalReport]]
# What skin this report should be based on:
skin = Alf_normal
HTML_ROOT = public_html/alf_normal
# You can override values in the skin configuration file.
# You can override values in the skin configuration file here. For
# example, uncomment the following lines to display metric units
# throughout the report, regardless of what is defined in the skin.
#
#[[[Units]]]
# [[[[Groups]]]]
# group_altitude = 99, meter
# group_degree_day = degree_C_day
# group_pressure = mbar
# group_radiation = watt_per_meter_squared
# group_rain = mm
# group_rainrate = mm_per_hour
# group_speed = meter_per_second
# group_speed2 = meter_per_second2
# group_temperature = degree_C
# Here is an example where we create a custom report, still using the
# standard skin, but where the image size is overridden, and the results
# are put in a separate subdirectory 'public_html/big'
#
#[[BigReport]]
# skin = Standard
# HTML_ROOT = /var/www/weewx
# [[[Images]]]
# image_width = 600
# image_height = 360
[[FTP]]
skin = Ftp
# FTP'ing the results to a webserver is treated as just another report,
# albeit one with an unusual report generator!
#
# If you wish to use FTP, uncomment and fill out the next four lines:
# user = replace with your username
# password = replace with your password
# server = replace with your server name, e.g, www.threefools.org
# path = replace with the destination directory (e.g., /weather)
# Set to 1 to use passive mode, zero for active mode:
passive = 1
# How many times to try to transfer a file before giving up:
max_tries = 3
# If you wish to upload files from something other than what HTML_ROOT
# is set to above, then reset it here:
# HTML_ROOT = /var/www/weewx
[[RSYNC]]
skin = Rsync
# rsync'ing the results to a webserver is treated as just another
# report, much like the FTP report.
#
# The following configure what system and remote path the files are
# sent to:
# server = replace with your server name, e.g, www.threefools.org
# path = replace with the destination directory (e.g., /weather)
# If you wish to use rsync, you must configure passwordless ssh using
# public/private key authentication from the user account that weewx
# runs as to the user account on the remote machine where the files
# will be copied.
# user = replace with your username
# Rsync can be configured to remove files from the remote server if
# they don't exist under HTML_ROOT locally. USE WITH CAUTION: if you
# make a mistake in the remote path, you could could unintentionally
# cause unrelated files to be deleted. Set to 1 to enable remote file
# deletion, zero to allow files to accumulate remotely.
# delete = 1
##############################################################################
[StdConvert]
# This service acts as a filter, converting the unit system coming from
# the hardware to a target output unit system.
#
# The target_unit affects only the unit system in the database. Once
# chosen it cannot be changed without converting the entire database.
# Modification of target_unit after starting weewx will result in
# corrupt data - the database will contain a mix of US and METRIC data.
#
# The value of target_unit does not affect the unit system for
# reporting - reports can display US, Metric, or any combination of
# units.
#
# In most cases, target_unit should be left as the default: US
#
# In particular, those migrating from a standard wview installation
# should use US since that is what the wview database contains.
# DO NOT MODIFY THIS VALUE UNLESS YOU KNOW WHAT YOU ARE DOING!
target_unit = US # Choices are 'US' or 'METRIC'
##############################################################################
[StdCalibrate]
# This section can adjust data using calibration expressions.
[[Corrections]]
# For each type, an arbitrary calibration expression can be given.
# It should be in the native units of the weather station hardware.
# For example:
# outTemp = outTemp - 0.2
##############################################################################
[StdQC]
# This section is for quality control checks.
# Values must be in the units defined in the StdConvert section.
[[MinMax]]
outTemp = -40, 120
barometer = 28, 32.5
outHumidity = 0, 100
##############################################################################
[StdArchive]
# This section is for configuring the archive databases.
# The database to be used for archive data.
# This should match a section given in section [Databases] below.
archive_database = archive_sqlite
# The database to be used for stats data.
# This should match a section given in section [Databases] below.
stats_database = stats_sqlite
# If your station hardware supports data logging then the archive interval
# will be downloaded from the station.
# Otherwise, you must specify it below (in seconds):
archive_interval = 120
# How long to wait (in seconds) before processing new archive data. Must
# be greater than zero.
archive_delay = 15
# Generally, if possible, new records are downloaded from the console
# hardware. If the console does not support this, then software record
# generation is done.
# Set the following to "software" to force software record generation:
record_generation = hardware
# Whether to include LOOP data in hi/low statistics.
loop_hilo = True
# The schema to be used for the archive database. This is used only when
# it is initialized.
# Thereafter, the types are retrieved from the database.
archive_schema = user.schemas.defaultArchiveSchema
# The schema to be used for the stats database. This is used only when
# it is initialized.
# Thereafter, the types are retrieved from the database.
stats_schema = user.schemas.defaultStatsSchema
##############################################################################
[StdTimeSynch]
# How often to check the weather station clock for drift (in seconds)
clock_check = 14400
# How much it can drift before we will correct it (in seconds):
max_drift = 5
##############################################################################
[Databases]
# This section lists possible databases.
[[archive_sqlite]]
root = %(WEEWX_ROOT)s
database = /var/lib/weewx/weewx.sdb
driver = weedb.sqlite
[[stats_sqlite]]
root = %(WEEWX_ROOT)s
database = /var/lib/weewx/stats.sdb
driver = weedb.sqlite
# MySQL databases require setting an appropriate 'user' and 'password'
[[archive_mysql]]
host = localhost
user = weewx
password = weewx
database = weewx
driver = weedb.mysql
[[stats_mysql]]
host = localhost
user = weewx
password = weewx
database = stats
driver = weedb.mysql
# [[computer_sqlite]]
# root = %(WEEWX_ROOT)s
# database = archive/computer.sdb
# driver = weedb.sqlite
##############################################################################
[ComputerMonitor]
database = computer_sqlite
max_age = 2592000 # 30 days; None to store indefinitely
##############################################################################
[Engines]
# This section configures the internal weewx engines.
# It is for advanced customization.
[[WxEngine]]
# The list of services the main weewx engine should run:
service_list = weewx.wxengine.StdTimeSynch, weewx.wxengine.StdConvert, weewx.wxengine.StdCalibrate, weewx.wxengine.StdQC, weewx.wxengine.StdArchive, weewx.wxengine.StdPrint, weewx.wxengine.StdRESTful, weewx.wxengine.StdReport
Here we go. In this config I commented the lines which refer to cymon and the engine is missing.
############################################################################################
# #
# #
# ALF_NORMAL SKIN CONFIGURATION FILE #
# #
# #
############################################################################################
# #
# Copyright (c) 2010 Alf Hogemark <a...@i100.no> #
# #
# See the file LICENSE.txt for your full rights. #
# #
############################################################################################
#
# $Revision: $
# $Author: $
# $Date: $
#
############################################################################################
############################################################################################
[Extras]
# Your Google Analytics id, comment out if you do not have one
#googleAnalyticsId=yourid
# The name to use as value for the publisher element in the RSS feed
#rssPublisherName=your name
# Display Google Map showing where your station is. Comment out this if you do not want the map to appear
googleMapsDisplay=true
# If you want to include links to the closes city / village. Look at geonames.org to find the closest, and its' id
# Comment out all of these if you do not want it to appear
[[Geonames]]
geonames_url=http://www.geonames.org
closest_city_village_name=Juelich
closest_city_village_id=2871753
############################################################################################
[Units]
#
# This section is for managing the selection and formatting of units.
#
[[Groups]]
#
# For each group of measurements, this section sets what units to use for it.
# NB: The unit is always in the singular. I.e., 'mile_per_hour', NOT 'miles_per_hour'
#
group_altitude = meter # Options are 'foot' or 'meter'
group_direction = degree_compass
group_moisture = centibar
group_percent = percent
group_pressure = mbar # Options are 'inHg', 'mbar', or 'hPa'
group_radiation = watt_per_meter_squared
group_rain = mm # Options are 'inch', 'cm', or 'mm'
group_rainrate = mm_per_hour # Options are 'inch_per_hour', 'cm_per_hour', or 'mm_per_hour'
group_speed = km_per_hour # Options are 'mile_per_hour', 'km_per_hour', 'knot', or 'meter_per_second'
group_speed2 = meter_per_second2 # Options are 'mile_per_hour2', 'km_per_hour2', 'knot2', or 'meter_per_second2'
group_temperature = degree_C # Options are 'degree_F' or 'degree_C'
group_volt = volt
[[StringFormats]]
#
# This section sets the string formatting for each type of unit.
#
centibar = %.0f
cm = %.2f
cm_per_hour = %.2f
degree_C = %.1f
degree_compass = %.0f
degree_F = %.1f
foot = %.0f
hPa = %.1f
inHg = %.3f
inch = %.2f
inch_per_hour = %.2f
km_per_hour = %.0f
km_per_hour2 = %.1f
knot = %.0f
knot2 = %.1f
mbar = %.0f
meter = %.0f
meter_per_second = %.0f
meter_per_second2 = %.1f
mile_per_hour = %.0f
mile_per_hour2 = %.1f
mm = %.1f
mm_per_hour = %.1f
percent = %.0f
volt = %.1f
watt_per_meter_squared = %.0f
[[Labels]]
#
# This section sets a label to be used for each type of unit.
#
centibar = " cb"
cm = " cm"
cm_per_hour = " cm/hr"
degree_C = °C
degree_compass = °
degree_F = °F
foot = " feet"
hPa = " hPa"
inHg = " inHg"
inch = " in"
inch_per_hour = " in/hr"
km_per_hour = " kph"
km_per_hour2 = " kph"
knot = " knots"
knot2 = " knots"
mbar = " mbar"
meter = " meters"
meter_per_second = " m/s"
meter_per_second2 = " m/s"
mile_per_hour = " mph"
mile_per_hour2 = " mph"
mm = " mm"
mm_per_hour = " mm/hr"
percent = %
volt = " V"
watt_per_meter_squared = " W/m²"
[[TimeFormats]]
#
# This section sets the string format to be used
# each time scale.
#
day = %H:%M
week = %H:%M on %A
month = %d-%b-%Y %H:%M
year = %d-%b-%Y %H:%M
rainyear = %d-%b-%Y %H:%M
current = %d-%b-%Y %H:%M
[[DegreeDays]]
#
# This section sets the base temperatures used for the calculation
# of heating and cooling degree-days.
#
# Base temperature for heating days, with unit:
heating_base = 65, degree_F
# Base temperature for cooling days, with unit:
cooling_base = 65, degree_F
############################################################################################
[Labels]
#
# Generic labels
#
# Set to hemisphere abbreviations suitable for your location:
hemispheres = N, S, E, W
[[Generic]]
#
# Generic labels, keyed by an observation type.
#
inTemp = Inside Temperature
outTemp = Outside Temperature
inHumidity = Inside Humidity
outHumidity = Outside Humidity
windSpeed = Wind Speed
windDir = Wind Direction
windGust = Gust Speed
windGustDir = Gust Direction
windvec = Wind Vector
windgustvec = Gust Vector
rainRate = Rain Rate
rain = Rain
dewpoint = Dew Point
windchill = Wind Chill
heatindex = Heat Index
#radiation = Radiation
#extraTemp1 = Pond Temperature
############################################################################################
[Almanac]
# The labels to be used for the phases of the moon:
moon_phases = New, Waxing crescent, First quarter, Waxing gibbous, Full, Waning gibbous, Last quarter, Waning crescent
############################################################################################
[FileGenerator]
#
# This section is used by the generator FileGenerator, and specifies which
# files are to be generated from which template.
#
encoding = html_entities # Possible encodings are 'html_entities', 'utf8', or 'strict_ascii'
[[SummaryByMonth]]
# Reports that summarize "by month"
[[[NOAA_month]]]
encoding = strict_ascii
template = NOAA/NOAA-YYYY-MM.txt.tmpl
[[SummaryByYear]]
# Reports that summarize "by year"
[[[NOAA_year]]]
encoding = strict_ascii
template = NOAA/NOAA-YYYY.txt.tmpl
[[ToDate]]
#
# Reports that show statistics "to date", such as day-to-date,
# week-to-date, month-to-date, etc.
#
[[[day]]]
template = index.html.tmpl
[[[dayrss]]]
template = rss.xml.tmpl
[[[week]]]
template = week.html.tmpl
[[[month]]]
template = month.html.tmpl
[[[year]]]
template = year.html.tmpl
[[[XML]]]
template = xml/weewx_pws.xml.tmpl
############################################################################################
[CopyGenerator]
#
# This section is used by the generator CopyGenerator
#
# List of files that are to be copied at the first invocation of the generator only
copy_once = javascript/fancybox/*, javascript/jquery/*, alf_normal.css
# List of files to be copied every time:
# copy_always =
############################################################################################
[ImageGenerator]
#
# This section lists all the images to be generated, what SQL types are to
# be included in them, along with many plotting options, such as color or
# font. There's a default for almost everything, if not specified
# below. Nevertheless, I've explicitly put in values, to make it easy to see
# and understand the options.
#
# Fonts can be anything accepted by the Python Imaging Library (PIL), which
# is currently truetype (.ttf), or PIL's own font format (.pil). See
# http://www.pythonware.com/library/pil/handbook/imagefont.htm for more
# details. Note that "font size" is only used with truetype (.ttf)
# fonts. For others, font size is determined by the bit-mapped size, usually
# encoded in the file name (e.g., courB010.pil). If a font can't be found,
# then a default font will be used.
#
image_width = 300
image_height = 180
image_background_color = 0xf5f5f5
chart_background_color = 0xd8d8d8
chart_gridline_color = 0xa0a0a0
top_label_font_path = /usr/share/fonts/truetype/freefont/FreeMonoBold.ttf
top_label_font_size = 10
unit_label_font_path = /usr/share/fonts/truetype/freefont/FreeMonoBold.ttf
unit_label_font_size = 10
unit_label_font_color = 0x000000
bottom_label_font_path = /usr/share/fonts/truetype/freefont/FreeMonoBold.ttf
bottom_label_font_size = 12
bottom_label_font_color = 0x000000
axis_label_font_path = /usr/share/fonts/truetype/freefont/FreeMonoBold.ttf
axis_label_font_size = 10
axis_label_font_color = 0x000000
# Options for the compass rose, used for progressive vector plots
rose_label = N
rose_label_font_path = /usr/share/fonts/truetype/freefont/FreeMonoBold.ttf
rose_label_font_size = 10
rose_label_font_color = 0x000000
# Default colors for the plot lines. These can be overridden for
# individual lines using option 'color'
chart_line_colors = 0xb48242, 0x4242b4, 0x42b442
##
## What follows is a list of subsections, each specifying a time span, such
## as a day, week, month, or year. There's nothing special about them or
## their names: it's just a convenient way to group plots with a time span
## in common. You could add a time span [[biweek_images]] and add the
## appropriate time length, aggregation strategy, etc., without changing any
## code.
##
## Within each time span, each sub-subsection is the name of a plot to be
## generated for that time span. The generated plot will be stored using
## that name, in whatever directory was specified by option 'HTML_ROOT'
## in weewx.conf.
##
## With one final nesting (four brackets!) is the sql type of each line to
## be included within that plot.
##
## Unless overridden, leaf nodes inherit options from their parent
##
# Default plot and aggregation. Can get overridden at any level.
plot_type = line
aggregate_type = none
width = 1
time_length = 86400 # == 24 hours
# This defines what fraction of the difference between maximum and minimum
# horizontal chart bounds is considered a gap in the samples and should not
# be plotted.
line_gap_fraction = 0.9
bar_gap_fraction = 0.9
# The following option merits an explanation. The y-axis scale used for plotting
# can be controlled using option 'yscale'. It is a 3-way tuple, with
# values (ylow, yhigh, min_interval). If set to "None", a parameter is
# set automatically, otherwise the value is used. However, in the case of
# min_interval, what is set is the *minimum* y-axis tick interval.
yscale = None, None, 0.02
# For progressive vector plots, you can choose to rotate the vectors.
# Positive is clockwise.
# For my area, westerlies overwhelmingly predominate, so by rotating
# positive 90 degrees, the average vector will point straight up.
vector_rotate = 90
[[day_images]]
x_label_format = %H:%M
bottom_label_format = %m/%d/%y %H:%M
time_length = 86400 # == 24 hours
[[[daybarometer]]]
[[[[barometer]]]]
[[[daybarometer_highres]]]
image_width = 1060
image_height = 640
[[[[barometer]]]]
[[[daytempdew]]]
line_gap_fraction = 0.1
[[[[outTemp]]]]
[[[[dewpoint]]]]
[[[daytempdew_highres]]]
image_width = 1060
image_height = 640
[[[[outTemp]]]]
[[[[dewpoint]]]]
[[[daytempchill]]]
[[[[windchill]]]]
[[[[heatindex]]]]
[[[daytempchill_highres]]]
image_width = 1060
image_height = 640
[[[[windchill]]]]
[[[[heatindex]]]]
[[[dayrain]]]
# Make sure the y-axis increment is at least 0.02 for the rain plot:
yscale = None, None, 0.02
plot_type = bar
[[[[rain]]]]
aggregate_type = sum
aggregate_interval = 3600
label = Rain (hourly avg)
[[[dayrain_highres]]]
image_width = 1060
image_height = 640
# Make sure the y-axis increment is at least 0.02 for the rain plot:
yscale = None, None, 0.02
plot_type = bar
[[[[rain]]]]
aggregate_type = sum
aggregate_interval = 3600
label = Rain (hourly avg)
[[[daywind]]]
[[[[windSpeed]]]]
[[[[windGust]]]]
[[[daywind_highres]]]
image_width = 1060
image_height = 640
[[[[windSpeed]]]]
[[[[windGust]]]]
[[[dayinside]]]
yscale = 12.0, 28.0, 1
[[[[inTemp]]]]
[[[dayinside_highres]]]
yscale = 12.0, 28.0, 1
image_width = 1060
image_height = 640
[[[[inTemp]]]]
[[[daywinddir]]]
# Hardwire in the y-axis scale for wind direction:
yscale = 0.0, 360.0, 45.0
[[[[windDir]]]]
[[[daywinddir_highres]]]
image_width = 1060
image_height = 640
# Hardwire in the y-axis scale for wind direction:
yscale = 0.0, 360.0, 45.0
[[[[windDir]]]]
[[[daywindvec]]]
[[[[windvec]]]]
plot_type = vector
[[[daywindvec_highres]]]
image_width = 1060
image_height = 640
[[[[windvec]]]]
plot_type = vector
[[[dayinHumidity]]]
[[[[inHumidity]]]]
[[[dayinHumidity_highres]]]
image_width = 1060
image_height = 640
[[[[inHumidity]]]]
[[[dayoutHumidity]]]
[[[[outHumidity]]]]
[[[dayoutHumidity_highres]]]
image_width = 1060
image_height = 640
[[[[outHumidity]]]]
[[week_images]]
x_label_format = %d
bottom_label_format = %m/%d/%y %H:%M
time_length = 604800 # == 7 days
aggregate_type = avg
aggregate_interval = 3600
[[[weekbarometer]]]
[[[[barometer]]]]
[[[weekbarometer_highres]]]
image_width = 1060
image_height = 640
[[[[barometer]]]]
[[[weektempdew]]]
[[[[outTemp]]]]
[[[[dewpoint]]]]
[[[weektempdew_highres]]]
image_width = 1060
image_height = 640
[[[[outTemp]]]]
[[[[dewpoint]]]]
[[[weektempchill]]]
[[[[windchill]]]]
[[[[heatindex]]]]
[[[weektempchill_highres]]]
image_width = 1060
image_height = 640
[[[[windchill]]]]
[[[[heatindex]]]]
[[[weekrain]]]
yscale = None, None, 0.02
plot_type = bar
[[[[rain]]]]
aggregate_type = sum
aggregate_interval = 86400
label = Rain (daily avg)
[[[weekrain_highres]]]
image_width = 1060
image_height = 640
yscale = None, None, 0.02
plot_type = bar
[[[[rain]]]]
aggregate_type = sum
aggregate_interval = 86400
label = Rain (daily avg)
[[[weekwind]]]
[[[[windSpeed]]]]
[[[[windGust]]]]
aggregate_type = max
[[[weekwind_highres]]]
image_width = 1060
image_height = 640
[[[[windSpeed]]]]
[[[[windGust]]]]
aggregate_type = max
[[[weekinside]]]
[[[[inTemp]]]]
[[[weekinside_highres]]]
image_width = 1060
image_height = 640
[[[[inTemp]]]]
[[[weekwinddir]]]
yscale = 0.0, 360.0, 45.0
[[[[windDir]]]]
[[[weekwinddir_highres]]]
image_width = 1060
image_height = 640
yscale = 0.0, 360.0, 45.0
[[[[windDir]]]]
# [[[weekradiation]]]
# [[[[radiation]]]]
# [[[weekradiation_highres]]]
# image_width = 1060
# image_height = 640
# [[[[radiation]]]]
# [[[daycpu]]]
# archive_database = computer_sqlite
# [[[[cpu_user]]]]
# [[[[cpu_idle]]]]
# [[[[cpu_nice]]]]
# [[[[cpu_system]]]]
# [[[[cpu_iowait]]]]
# [[[[cpu_irq]]]]
# [[[[cpu_softirq]]]]#
##
# [[[dayload]]]
# archive_database = computer_sqlite yscale = 0, 1, 0.25
# [[[[load1]]]]
# [[[[load5]]]]
# [[[[load15]]]]
#
# [[[daydisk]]]
# archive_database = computer_sqlite yscale = 0, None, None
# [[[[disk_root_total]]]]
# [[[[disk_root_used]]]]
# [[[daymem]]]
# archive_database = computer_sqlite yscale = 0, None, None
# [[[[mem_total]]]]
# [[[[mem_used]]]]
# [[[daynet]]]
# archive_database = computer_sqlite
# [[[[net_eth0_rbytes]]]]
# [[[[net_eth0_tbytes]]]]
[[month_images]]
x_label_format = %d
bottom_label_format = %m/%d/%y %H:%M
time_length = 2592000 # == 30 days
aggregate_type = avg
aggregate_interval = 10800 # == 3 hours
[[[monthbarometer]]]
[[[[barometer]]]]
[[[monthbarometer_highres]]]
image_width = 1060
image_height = 640
[[[[barometer]]]]
[[[monthtempdew]]]
[[[[outTemp]]]]
[[[[dewpoint]]]]
[[[monthtempdew_highres]]]
image_width = 1060
image_height = 640
[[[[outTemp]]]]
[[[[dewpoint]]]]
[[[monthtempchill]]]
[[[[windchill]]]]
[[[[heatindex]]]]
[[[monthtempchill_highres]]]
image_width = 1060
image_height = 640
[[[[windchill]]]]
[[[[heatindex]]]]
[[[monthrain]]]
yscale = None, None, 0.02
plot_type = bar
[[[[rain]]]]
aggregate_type = sum
aggregate_interval = 86400
label = Rain (daily avg)
[[[monthrain_highres]]]
image_width = 1060
image_height = 640
yscale = None, None, 0.02
plot_type = bar
[[[[rain]]]]
aggregate_type = sum
aggregate_interval = 86400
label = Rain (daily avg)
[[[monthwind]]]
[[[[windSpeed]]]]
[[[[windGust]]]]
aggregate_type = max
[[[monthwind_highres]]]
image_width = 1060
image_height = 640
[[[[windSpeed]]]]
[[[[windGust]]]]
aggregate_type = max
[[[monthinside]]]
[[[[inTemp]]]]
[[[monthinside_highres]]]
image_width = 1060
image_height = 640
[[[[inTemp]]]]
[[[monthwinddir]]]
yscale = 0.0, 360.0, 45.0
[[[[windDir]]]]
[[[monthwinddir_highres]]]
image_width = 1060
image_height = 640
yscale = 0.0, 360.0, 45.0
[[[[windDir]]]]
# [[[monthradiation]]]
# [[[[radiation]]]]
# [[[monthradiation_highres]]]
# image_width = 1060
# image_height = 640
# [[[[radiation]]]]
[[year_images]]
x_label_format = %m/%d
bottom_label_format = %m/%d/%y
time_length = 31536000 # == 365 days
aggregate_type = avg
aggregate_interval = 86400
[[[yearbarometer]]]
[[[[barometer]]]]
[[[yearbarometer_highres]]]
image_width = 1060
image_height = 640
[[[[barometer]]]]
[[[yeartempdew]]]
[[[[outTemp]]]]
[[[[dewpoint]]]]
[[[yeartempdew_highres]]]
image_width = 1060
image_height = 640
[[[[outTemp]]]]
[[[[dewpoint]]]]
[[[yearwind]]]
[[[[windSpeed]]]]
[[[[windGust]]]]
aggregate_type = max
[[[yearwind_highres]]]
image_width = 1060
image_height = 640
[[[[windSpeed]]]]
[[[[windGust]]]]
aggregate_type = max
[[[yeartempchill]]]
[[[[windchill]]]]
[[[[heatindex]]]]
[[[yeartempchill_highres]]]
image_width = 1060
image_height = 640
[[[[windchill]]]]
[[[[heatindex]]]]
[[[yearrain]]]
yscale = None, None, 0.02
plot_type = bar
[[[[rain]]]]
aggregate_type = sum
# aggregate_interval = 2629800 # Magic number: the length of a nominal month
aggregate_interval = 604800 # == 1 week
label = Rain (weekly avg)
[[[yearrain_highres]]]
image_width = 1060
image_height = 640
yscale = None, None, 0.02
plot_type = bar
[[[[rain]]]]
aggregate_type = sum
# aggregate_interval = 2629800 # Magic number: the length of a nominal month
aggregate_interval = 604800 # == 1 week
label = Rain (weekly avg)
[[[yearinside]]]
[[[[inTemp]]]]
[[[yearinside_highres]]]
image_width = 1060
image_height = 640
[[[[inTemp]]]]
[[[yearwinddir]]]
yscale = 0.0, 360.0, 45.0
[[[[windDir]]]]
[[[yearwinddir_highres]]]
image_width = 1060
image_height = 640
yscale = 0.0, 360.0, 45.0
[[[[windDir]]]]
# [[[yearradiation]]]
# [[[[radiation]]]]
# [[[yearradiation_highres]]]
# image_width = 1060
# image_height = 640
# [[[[radiation]]]]
# A progressive vector plot of daily gust vectors overlayed
# with the daily wind average would look something like this:
# [[[yeargustvec]]]
# [[[[windvec]]]]
# plot_type = vector
# aggregate_type = avg
# [[[[windgustvec]]]]
# plot_type = vector
# aggregate_type = max
############################################################################################
#
# The list of generators that are to be run:
#
[Generators]
generator_list = weewx.filegenerator.FileGenerator, weewx.imagegenerator.ImageGenerator, weewx.reportengine.CopyGenerator
Well, I made the changes you mentioned above. It wasn't commented when I tried that. I commented it now because I want to have the data archieved and running.
Here is my skin.conf: (The sections are commented too. Only to leave all running)
F
##
# [[[dayload]]]
# archive_database = computer_sqlite yscale = 0, 1, 0.25
# [[[[load1]]]]
# [[[[load5]]]]
# [[[[load15]]]]
#
# [[[daydisk]]]
# archive_database = computer_sqlite yscale = 0, None, None
# [[[[disk_root_total]]]]
# [[[[disk_root_used]]]]
# [[[daymem]]]
# archive_database = computer_sqlite yscale = 0, None, None
# [[[[mem_total]]]]
# [[[[mem_used]]]]
Jan 16 13:58:47 raspberrypi weewx[2704]: reportengine: Caught unrecoverable exception in generator weewx.imagegenerator.ImageGenerator
Jan 16 13:58:47 raspberrypi weewx[2704]: **** no such column: net_eth0_rbytes
Jan 16 13:58:47 raspberrypi weewx[2704]: **** Traceback (most recent call las t):
Jan 16 13:58:47 raspberrypi weewx[2704]: **** File "/usr/share/weewx/weewx/ reportengine.py", line 131, in run
Jan 16 13:58:47 raspberrypi weewx[2704]: **** obj.start()
Jan 16 13:58:47 raspberrypi weewx[2704]: **** File "/usr/share/weewx/weewx/ reportengine.py", line 294, in start
Jan 16 13:58:47 raspberrypi weewx[2704]: **** self.run()
Jan 16 13:58:47 raspberrypi weewx[2704]: **** File "/usr/share/weewx/weewx/ imagegenerator.py", line 38, in run
Jan 16 13:58:47 raspberrypi weewx[2704]: **** self.genImages(self.gen_ts)
Jan 16 13:58:47 raspberrypi weewx[2704]: **** File "/usr/share/weewx/weewx/ imagegenerator.py", line 202, in genImages
Jan 16 13:58:47 raspberrypi weewx[2704]: **** aggregate_interval, aggrega te_type)
Jan 16 13:58:47 raspberrypi weewx[2704]: **** File "/usr/share/weewx/weewx/ archive.py", line 409, in getSqlVectorsExtended
Jan 16 13:58:47 raspberrypi weewx[2704]: **** return self.getSqlVectors(e xt_type, startstamp, stopstamp, aggregate_interval, aggregate_type)
Jan 16 13:58:47 raspberrypi weewx[2704]: **** File "/usr/share/weewx/weewx/ archive.py", line 334, in getSqlVectors
Jan 16 13:58:47 raspberrypi weewx[2704]: **** _cursor.execute(sql_str, st amp)
Jan 16 13:58:47 raspberrypi weewx[2704]: **** File "/usr/share/weewx/weedb/ sqlite.py", line 120, in execute
Jan 16 13:58:47 raspberrypi weewx[2704]: **** raise weedb.OperationalErro r(e)
Jan 16 13:58:47 raspberrypi weewx[2704]: **** OperationalError: no such colum n: net_eth0_rbytes
Jan 16 13:58:47 raspberrypi weewx[2704]: **** Generator terminated...
root@raspberrypi:~# ifconfig
eth0 Link encap:Ethernet Hardware Adresse b8:27:eb:4e:3b:d8
inet Adresse:192.168.178.77 Bcast:192.168.178.255 Maske:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
RX packets:59208 errors:0 dropped:0 overruns:0 frame:0
TX packets:31447 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:1000
RX bytes:4632359 (4.4 MiB) TX bytes:10214955 (9.7 MiB)
lo Link encap:Lokale Schleife
inet Adresse:127.0.0.1 Maske:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metrik:1
RX packets:163 errors:0 dropped:0 overruns:0 frame:0
TX packets:163 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:0
RX bytes:30768 (30.0 KiB) TX bytes:30768 (30.0 KiB)
Jan 16 14:14:59 raspberrypi weewx[3884]: wxengine: Caught unrecoverable exception in wxengine:
Jan 16 14:14:59 raspberrypi weewx[3884]: **** schema mismatch: ['dateTime', 'usUnits', 'mem_total', 'mem_free', 'mem_used', 'swap_total', 'swap_free', 'swap_used', 'cpu_user', 'cpu_nice', 'cpu_system', 'cpu_idle', 'cpu_iowait', 'cpu_irq', 'cpu_softirq', 'load1', 'load5', 'load15', 'proc_active', 'proc_total', 'net_eth1_rbytes', 'net_eth1_rpackets', 'net_eth1_rerrs', 'net_eth1_rdrop', 'net_eth1_tbytes', 'net_eth1_tpackets', 'net_eth1_terrs', 'net_eth1_tdrop', 'disk_root_total', 'disk_root_free', 'disk_root_used'] != ['dateTime', 'usUnits', 'mem_total', 'mem_free', 'mem_used', 'swap_total', 'swap_free', 'swap_used', 'cpu_user', 'cpu_nice', 'cpu_system', 'cpu_idle', 'cpu_iowait', 'cpu_irq', 'cpu_softirq', 'load1', 'load5', 'load15', 'proc_active', 'proc_total', 'net_eth0_rbytes', 'net_eth0_rpackets', 'net_eth0_rerrs', 'net_eth0_rdrop', 'net_eth0_tbytes', 'net_eth0_tpackets', 'net_eth0_terrs', 'net_eth0_tdrop', 'disk_root_total', 'disk_root_free', 'disk_root_used']
Jan 16 14:14:59 raspberrypi weewx[3884]: **** Traceback (most recent call last):
Jan 16 14:14:59 raspberrypi weewx[3884]: **** File "/usr/share/weewx/weewx/wxengine.py", line 892, in main
Jan 16 14:14:59 raspberrypi weewx[3884]: **** engine = EngineClass(config_dict)
Jan 16 14:14:59 raspberrypi weewx[3884]: **** File "/usr/share/weewx/weewx/wxengine.py", line 70, in __init__
Jan 16 14:14:59 raspberrypi weewx[3884]: **** self.loadServices(config_dict)
Jan 16 14:14:59 raspberrypi weewx[3884]: **** File "/usr/share/weewx/weewx/wxengine.py", line 124, in loadServices
Jan 16 14:14:59 raspberrypi weewx[3884]: **** self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict))
Jan 16 14:14:59 raspberrypi weewx[3884]: **** File "/usr/share/weewx/user/cmon.py", line 191, in __init__
Jan 16 14:14:59 raspberrypi weewx[3884]: **** raise Exception('schema mismatch: %s != %s' % (dbcol, memcol))
Jan 16 14:14:59 raspberrypi weewx[3884]: **** Exception: schema mismatch: ['dateTime', 'usUnits', 'mem_total', 'mem_free', 'mem_used', 'swap_total', 'swap_free', 'swap_used', 'cpu_user', 'cpu_nice', 'cpu_system', 'cpu_idle', 'cpu_iowait', 'cpu_irq', 'cpu_softirq', 'load1', 'load5', 'load15', 'proc_active', 'proc_total', 'net_eth1_rbytes', 'net_eth1_rpackets', 'net_eth1_rerrs', 'net_eth1_rdrop', 'net_eth1_tbytes', 'net_eth1_tpackets', 'net_eth1_terrs', 'net_eth1_tdrop', 'disk_root_total', 'disk_root_free', 'disk_root_used'] != ['dateTime', 'usUnits', 'mem_total', 'mem_free', 'mem_used', 'swap_total', 'swap_free', 'swap_used', 'cpu_user', 'cpu_nice', 'cpu_system', 'cpu_idle', 'cpu_iowait', 'cpu_irq', 'cpu_softirq', 'load1', 'load5', 'load15', 'proc_active', 'proc_total', 'net_eth0_rbytes', 'net_eth0_rpackets', 'net_eth0_rerrs', 'net_eth0_rdrop', 'net_eth0_tbytes', 'net_eth0_tpackets', 'net_eth0_terrs', 'net_eth0_tdrop', 'disk_root_total', 'disk_root_free', 'disk_root_used']
Jan 16 14:14:59 raspberrypi weewx[3884]: **** Exiting.
> Jan 16 13:58:47 raspberrypi weewx[2704]: **** OperationalError: no such
> colum n: net_eth0_rbytes
Looks like your database schema doesn't match the data you're trying to graph from.
(Or you're trying to read the wrong database).
Is that column in your database?
You can check with:
$ sqlite3 weewx.sdbDavid.
--
You received this message because you are subscribed to the Google Groups "Weewx user's group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I changed the eth1 to eth0 back in cmon.py because I saw that my network is eth0.
$ sqlite3 weewx.sdbAm Donnerstag, 16. Januar 2014 14:28:27 UTC+1 schrieb mwall:
On Thursday, January 16, 2014 8:24:38 AM UTC-5, Florian B wrote:Thanks for your help.
But I can't get this to work:$ sqlite3weewx.sdb
Florian
1) the data from cmon go into computer.sdb, not weewx.sdb
sqlite3 /var/lib/weewx/computer.sdb
sqlite3> .schema
2) the network interface in cmon.py must match your real network interface. if your interface is eth1, then modify cmon.py so that it uses eth1 instead of eth0.
3) the columns in cmon.py must match the columns in the actual database. if there is a mismatch, the quickest way to fix it is to delete or move aside computer.sdb and let weewx generate a new database.
m
ad1) OK. Thats right. Do I have to do anything for that?
ad2) Modified to eth1.
ad3) Done that. But there's no new computer.sdb and the error still exists.
I stopped it. But there's no more computer.sdb file in archive. When I try to start weewx there's no computer.sdb created and the error mentioned abov (schema) appears again.
One short thing to this topic. Do you have an idea why the chart looks so ugly? How can I get rid of that?
folks,
here is another weewx service to track cpu load, memory use, disk use, and network traffic.
https://sourceforge.net/p/weewx/wiki/monitor/
william phelps already wrote one of these as described in this thread:
https://groups.google.com/forum/#!topic/weewx-user/sk7kenddddQ
however, this service is a bit more generic - it should work on any linux with kernel 2.2 or later (not just the raspberry pi), and it saves data to a separate database instead of extending the weewx archive schema.
m