-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
341 changed files
with
106,523 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ MAINTAINER Tom Mitchell "[email protected]" | |
ENV VERSION=5.1.0 | ||
ENV TAG=v5.1.0 | ||
ENV WEEWX_ROOT=/home/weewx/weewx-data | ||
ENV WEEWX_VERSION=4.10.0 | ||
ENV HOME=/home/weewx | ||
ENV TZ=America/New_York | ||
ENV PATH=/usr/bin:$PATH | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
# | ||
# read a yaml file and extract the NameValuePairs section | ||
# NameValuePairs: | ||
# driver: "simulator" | ||
# latitude: "37.4219999" | ||
|
||
# Read the YAML file | ||
data=$(cat config.yaml) | ||
|
||
# Extract the NameValuePairs section from the YAML file | ||
name_value_pairs=$(echo "$data" | grep -A1 'NameValuePairs' | tail -n 1) | ||
|
||
# Prepare the command arguments | ||
args="" | ||
while read -r line; do | ||
name=$(echo "$line" | awk -F: '{print $1}' | tr -d ' ') | ||
value=$(echo "$line" | awk -F: '{print $2}' | tr -d ' ') | ||
args+=" --$name $value" | ||
done <<< "$name_value_pairs" | ||
|
||
# Call weectl with all the arguments | ||
weectl $args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FILES=../conf-fragments/*.conf | ||
for f in $FILES | ||
do | ||
echo "Processing $f" | ||
echo "" | ||
done | ||
|
||
|
||
#!/bin/bash | ||
|
||
if [ ! -f ext_installed ]; then | ||
touch ext_installed | ||
for file in *; do | ||
weewx_ext $file | ||
done | ||
else | ||
echo "ext_installed file found, skipping execution of weewx_ext." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Metadata-Version: 1.0 | ||
Name: weewx | ||
Version: 4.10.0 | ||
Summary: The WeeWX weather software system | ||
Home-page: http://www.weewx.com | ||
Author: Tom Keffer | ||
Author-email: [email protected] | ||
License: GPLv3 | ||
Description: WeeWX interacts with a weather station to produce graphs, reports, and HTML pages. WeeWX can upload data to services such as the WeatherUnderground, PWSweather.com, or CWOP. | ||
Platform: UNKNOWN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
weewx communicates with a weather station to produce graphs, reports, and HTML | ||
pages. weewx can publish data to weather services such as WeatherUnderground, | ||
PWSweather.com, or CWOP. | ||
|
||
weewx is licensed under the GNU Public License v3. | ||
|
||
Documentation: docs/readme.htm or http://weewx.com/docs.html | ||
Wiki: https://github.com/weewx/weewx/wiki | ||
Community support: https://groups.google.com/group/weewx-user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# [WeeWX](http://www.weewx.com) | ||
*Open source software for your weather station* | ||
|
||
## Description | ||
|
||
The WeeWX weather system is written in Python and runs on Linux, MacOSX, | ||
Solaris, and *BSD. It runs exceptionally well on a Raspberry Pi. It generates | ||
plots, HTML pages, and monthly and yearly summary reports, which can be | ||
uploaded to a web server. Thousands of users worldwide! | ||
|
||
See the WeeWX website for [examples](http://weewx.com/showcase.html) of web | ||
sites generated by WeeWX, and a [map](http://weewx.com/stations.html) of | ||
stations using WeeWX. | ||
|
||
* Robust and hard-to-crash | ||
* Designed with the enthusiast in mind | ||
* Simple, easy to understand internal design that is easily extended (Python skills recommended) | ||
* Python 2 or Python 3 | ||
* Growing ecosystem of 3rd party extensions | ||
* Internationalized language support | ||
* Localized date/time support | ||
* Support for US and metric units | ||
* Support for multiple skins | ||
* Support sqlite and MySQL | ||
* Extensive almanac information | ||
* Uploads to your website via FTP, FTPS, or rsync | ||
* Uploads to online weather services | ||
|
||
Support for many online weather services, including: | ||
|
||
* The Weather Underground | ||
* CWOP | ||
* PWSweather | ||
* WOW | ||
* AWEKAS | ||
* Open Weathermap | ||
* WeatherBug | ||
* Weather Cloud | ||
* Wetter | ||
* Windfinder | ||
|
||
Support for many data aggregation services, including: | ||
|
||
* EmonCMS | ||
* Graphite | ||
* InfluxDB | ||
* MQTT | ||
* Smart Energy Groups | ||
* Thingspeak | ||
* Xively | ||
|
||
Support for over 70 types of hardware including, but not limited to: | ||
|
||
* Davis Vantage Pro, Pro2, Vue, Envoy; | ||
* Oregon Scientific WMR100, WMR300, WMR9x8, and other variants; | ||
* Oregon Scientific LW300/LW301/LW302; | ||
* Fine Offset WH10xx, WH20xx, and WH30xx series (including Ambient, Elecsa, Maplin, Tycon, Watson, and others); | ||
* Fine Offset WH23xx, WH4000 (including Tycon TP2700, MiSol WH2310); | ||
* Fine Offset WH2600, HP1000 (including Ambient Observer, Aercus WeatherSleuth, XC0422); | ||
* LaCrosse WS-23XX and WS-28XX (including TFA); | ||
* LaCrosse GW1000U bridge; | ||
* Hideki TE923, TE831, TE838, DV928 (including TFA, Cresta, Honeywell, and others); | ||
* PeetBros Ultimeter; | ||
* RainWise CC3000 and MKIII; | ||
* AcuRite 5-in-1 via USB console or bridge; | ||
* Argent Data Systems WS1; | ||
* KlimaLogg Pro; | ||
* New Mountain; | ||
* AirMar 150WX; | ||
* Texas Weather Instruments; | ||
* Dyacon; | ||
* Meteostick; | ||
* Ventus W820; | ||
* Si1000 radio receiver; | ||
* Software Defined Radio (SDR); | ||
* One-wire (including Inspeed, ADS, AAG, Hobby-Boards). | ||
|
||
See the [hardware list](http://www.weewx.com/hardware.html) for a complete list | ||
of supported stations, and for pictures to help identify your hardware! The | ||
[hardware comparison](http://www.weewx.com/hwcmp.html) shows specifications for | ||
many different types of hardware, including some not yet supported by WeeWX. | ||
|
||
## Downloads | ||
|
||
For current and previous releases: | ||
|
||
[http://weewx.com/downloads](http://weewx.com/downloads) | ||
|
||
## Documentation and Support | ||
|
||
Guides for installation, upgrading, and customization are in `docs/readme.htm` | ||
or at: | ||
|
||
[http://weewx.com/docs.html](http://weewx.com/docs.html) | ||
|
||
The wiki includes user-contributed extensions and suggestions at: | ||
|
||
[https://github.com/weewx/weewx/wiki](https://github.com/weewx/weewx/wiki) | ||
|
||
Community support can be found at: | ||
|
||
[https://groups.google.com/group/weewx-user](https://groups.google.com/group/weewx-user) | ||
|
||
<h2>Licensing</h2> | ||
|
||
WeeWX is licensed under the GNU Public License v3. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# -*- coding: iso-8859-1 -*- | ||
# | ||
# Copyright (c) 2009-2015 Tom Keffer <[email protected]> | ||
# | ||
# See the file LICENSE.txt for your full rights. | ||
# | ||
''' | ||
This module is used to fork the current process into a daemon. | ||
Almost none of this is necessary (or advisable) if your daemon | ||
is being started by inetd. In that case, stdin, stdout and stderr are | ||
all set up for you to refer to the network connection, and the fork()s | ||
and session manipulation should not be done (to avoid confusing inetd). | ||
Only the chdir() and umask() steps remain as useful. | ||
References: | ||
UNIX Programming FAQ | ||
1.7 How do I get my program to act like a daemon? | ||
http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16 | ||
Advanced Programming in the Unix Environment | ||
W. Richard Stevens, 1992, Addison-Wesley, ISBN 0-201-56317-7. | ||
History: | ||
2001/07/10 by Jürgen Hermann | ||
2002/08/28 by Noah Spurrier | ||
2003/02/24 by Clark Evans | ||
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66012 | ||
''' | ||
import sys, os | ||
|
||
done = False | ||
|
||
def daemonize(stdout='/dev/null', stderr=None, stdin='/dev/null', | ||
pidfile=None, startmsg = 'started with pid %s' ): | ||
''' | ||
This forks the current process into a daemon. | ||
The stdin, stdout, and stderr arguments are file names that | ||
will be opened and be used to replace the standard file descriptors | ||
in sys.stdin, sys.stdout, and sys.stderr. | ||
These arguments are optional and default to /dev/null. | ||
Note that stderr is opened unbuffered, so | ||
if it shares a file with stdout then interleaved output | ||
may not appear in the order that you expect. | ||
''' | ||
global done | ||
# Don't proceed if we have already daemonized. | ||
if done: | ||
return | ||
# Do first fork. | ||
try: | ||
pid = os.fork() | ||
if pid > 0: sys.exit(0) # Exit first parent. | ||
except OSError as e: | ||
sys.stderr.write("fork #1 failed: (%d) %s\n" % (e.errno, e.strerror)) | ||
sys.exit(1) | ||
|
||
# Decouple from parent environment. | ||
os.chdir("/") | ||
os.umask(0o022) | ||
os.setsid() | ||
|
||
# Do second fork. | ||
try: | ||
pid = os.fork() | ||
if pid > 0: sys.exit(0) # Exit second parent. | ||
except OSError as e: | ||
sys.stderr.write("fork #2 failed: (%d) %s\n" % (e.errno, e.strerror)) | ||
sys.exit(1) | ||
|
||
# Open file descriptors and print start message | ||
if not stderr: stderr = stdout | ||
si = open(stdin, 'r') | ||
so = open(stdout, 'a+') | ||
se = open(stderr, 'a+') | ||
pid = str(os.getpid()) | ||
# sys.stderr.write("\n%s\n" % startmsg % pid) | ||
# sys.stderr.flush() | ||
if pidfile: open(pidfile,'w+').write("%s\n" % pid) | ||
# Redirect standard file descriptors. | ||
os.dup2(si.fileno(), sys.stdin.fileno()) | ||
os.dup2(so.fileno(), sys.stdout.fileno()) | ||
os.dup2(se.fileno(), sys.stderr.fileno()) | ||
done = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# Copyright (c) 2009-2015 Tom Keffer <[email protected]> | ||
# | ||
# See the file LICENSE.txt for your full rights. | ||
# | ||
""" | ||
Package of schemas used by weewx. | ||
This package consists of a set of modules, each containing a schema. | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# | ||
# Copyright (c) 2009-2021 Tom Keffer <[email protected]> | ||
# | ||
# See the file LICENSE.txt for your full rights. | ||
# | ||
"""The wview schema, which is also used by weewx.""" | ||
|
||
# ============================================================================= | ||
# This is original schema for both weewx and wview, expressed using Python. | ||
# It is only used for initialization --- afterwards, the schema is obtained | ||
# dynamically from the database. | ||
# | ||
# Although a type may be listed here, it may not necessarily be supported by | ||
# your weather station hardware. | ||
# | ||
# You may trim this list of any unused types if you wish, but it may not | ||
# result in saving as much space as you might think --- most of the space is | ||
# taken up by the primary key indexes (type "dateTime"). | ||
# ============================================================================= | ||
# NB: This schema is specified using the WeeWX V3 "old-style" schema. Starting | ||
# with V4, a new style was added, which allows schema for the daily summaries | ||
# to be expressed explicitly. | ||
# ============================================================================= | ||
schema = [('dateTime', 'INTEGER NOT NULL UNIQUE PRIMARY KEY'), | ||
('usUnits', 'INTEGER NOT NULL'), | ||
('interval', 'INTEGER NOT NULL'), | ||
('barometer', 'REAL'), | ||
('pressure', 'REAL'), | ||
('altimeter', 'REAL'), | ||
('inTemp', 'REAL'), | ||
('outTemp', 'REAL'), | ||
('inHumidity', 'REAL'), | ||
('outHumidity', 'REAL'), | ||
('windSpeed', 'REAL'), | ||
('windDir', 'REAL'), | ||
('windGust', 'REAL'), | ||
('windGustDir', 'REAL'), | ||
('rainRate', 'REAL'), | ||
('rain', 'REAL'), | ||
('dewpoint', 'REAL'), | ||
('windchill', 'REAL'), | ||
('heatindex', 'REAL'), | ||
('ET', 'REAL'), | ||
('radiation', 'REAL'), | ||
('UV', 'REAL'), | ||
('extraTemp1', 'REAL'), | ||
('extraTemp2', 'REAL'), | ||
('extraTemp3', 'REAL'), | ||
('soilTemp1', 'REAL'), | ||
('soilTemp2', 'REAL'), | ||
('soilTemp3', 'REAL'), | ||
('soilTemp4', 'REAL'), | ||
('leafTemp1', 'REAL'), | ||
('leafTemp2', 'REAL'), | ||
('extraHumid1', 'REAL'), | ||
('extraHumid2', 'REAL'), | ||
('soilMoist1', 'REAL'), | ||
('soilMoist2', 'REAL'), | ||
('soilMoist3', 'REAL'), | ||
('soilMoist4', 'REAL'), | ||
('leafWet1', 'REAL'), | ||
('leafWet2', 'REAL'), | ||
('rxCheckPercent', 'REAL'), | ||
('txBatteryStatus', 'REAL'), | ||
('consBatteryVoltage', 'REAL'), | ||
('hail', 'REAL'), | ||
('hailRate', 'REAL'), | ||
('heatingTemp', 'REAL'), | ||
('heatingVoltage', 'REAL'), | ||
('supplyVoltage', 'REAL'), | ||
('referenceVoltage', 'REAL'), | ||
('windBatteryStatus', 'REAL'), | ||
('rainBatteryStatus', 'REAL'), | ||
('outTempBatteryStatus', 'REAL'), | ||
('inTempBatteryStatus', 'REAL')] |
Oops, something went wrong.