Advertisement
kudumi

weewx config

Aug 9th, 2022
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.02 KB | None | 0 0
  1. $ cat /etc/weewx/weewx.conf
  2. # WEEWX CONFIGURATION FILE
  3. #
  4. # Copyright (c) 2009-2022 Tom Keffer <tkeffer@gmail.com>
  5. # See the file LICENSE.txt for your rights.
  6.  
  7. ##############################################################################
  8.  
  9. # This section is for general configuration information.
  10.  
  11. # Set to 1 for extra debug info, otherwise comment it out or set to zero
  12. debug = 0
  13.  
  14. # Root directory of the weewx data file hierarchy for this station
  15. WEEWX_ROOT = /
  16.  
  17. # Whether to log successful operations. May get overridden below.
  18. log_success = True
  19.  
  20. # Whether to log unsuccessful operations. May get overridden below.
  21. log_failure = True
  22.  
  23. # Do not modify this. It is used when installing and updating weewx.
  24. version = 4.8.0
  25.  
  26. ##############################################################################
  27.  
  28. # This section is for information about the station.
  29.  
  30. [Station]
  31.  
  32. # Description of the station location
  33. location = my weather station
  34.  
  35. # Latitude in decimal degrees. Negative for southern hemisphere
  36. latitude = x.xxx
  37. # Longitude in decimal degrees. Negative for western hemisphere.
  38. longitude = x.xxx
  39.  
  40. # Altitude of the station, with the unit it is in. This is used only
  41. # if the hardware cannot supply a value.
  42. altitude = 5, meter
  43.  
  44. # Set to type of station hardware. There must be a corresponding stanza
  45. # in this file, which includes a value for the 'driver' option.
  46. station_type = WS23xx
  47.  
  48. # If you have a website, you may specify an URL
  49. station_url = mywebsite.com/weather
  50.  
  51. # If you have a website, you may specify an URL. This is required if you
  52. # intend to register your station.
  53.  
  54. # The start of the rain year (1=January; 10=October, etc.). This is
  55. # downloaded from the station if the hardware supports it.
  56. rain_year_start = 1
  57.  
  58. # Start of week (0=Monday, 6=Sunday)
  59. week_start = 6
  60.  
  61. ##############################################################################
  62.  
  63. [WS23xx]
  64. # This section is for the La Crosse WS-2300 series of weather stations.
  65.  
  66. # Serial port such as /dev/ttyS0, /dev/ttyUSB0, or /dev/cuaU0
  67. port = /dev/usb/hiddev0
  68.  
  69. # The station model, e.g., 'LaCrosse WS2317' or 'TFA Primus'
  70. model = LaCrosse WS23xx
  71.  
  72. # The driver to use:
  73. driver = weewx.drivers.ws23xx
  74.  
  75. ##############################################################################
  76.  
  77. [Simulator]
  78. # This section is for the weewx weather station simulator
  79.  
  80. # The time (in seconds) between LOOP packets.
  81. loop_interval = 2.5
  82.  
  83. # The simulator mode can be either 'simulator' or 'generator'.
  84. # Real-time simulator. Sleep between each LOOP packet.
  85. mode = simulator
  86. # Generator. Emit LOOP packets as fast as possible (useful for testing).
  87. #mode = generator
  88.  
  89. # The start time. Format is YYYY-mm-ddTHH:MM. If not specified, the default
  90. # is to use the present time.
  91. #start = 2011-01-01T00:00
  92.  
  93. # The driver to use:
  94. driver = weewx.drivers.simulator
  95.  
  96. ##############################################################################
  97.  
  98. # This section is for uploading data to Internet sites
  99.  
  100. [StdRESTful]
  101.  
  102. # Uncomment and change to override logging for uploading services.
  103. # log_success = True
  104. # log_failure = True
  105.  
  106. [[StationRegistry]]
  107. # To register this weather station with weewx, set this to true,
  108. # then fill out option 'station_url' above.
  109. register_this_station = true
  110.  
  111. [[AWEKAS]]
  112. # This section is for configuring posts to AWEKAS.
  113.  
  114. # If you wish to post to AWEKAS, set the option 'enable' to true, then specify a username
  115. # and password. To guard against parsing errors, put the password in quotes.
  116. enable = false
  117. username = replace_me
  118. password = replace_me
  119.  
  120. [[CWOP]]
  121. # This section is for configuring posts to CWOP.
  122.  
  123. # If you wish to post to CWOP, set the option 'enable' to true,
  124. # then specify the station ID (e.g., CW1234).
  125. enable = false
  126. station = replace_me
  127. # If this is an APRS (radio amateur) station, specify the
  128. # passcode (e.g., 12345). Otherwise, ignore.
  129. passcode = replace_me
  130.  
  131.  
  132. [[PWSweather]]
  133. # This section is for configuring posts to PWSweather.com.
  134.  
  135. # If you wish to post to PWSweather.com, set the option 'enable' to true, then specify a
  136. # station and password. To guard against parsing errors, put the password in quotes.
  137. enable = false
  138. station = replace_me
  139. password = replace_me
  140.  
  141. [[WOW]]
  142. # This section is for configuring posts to WOW.
  143.  
  144. # If you wish to post to WOW, set the option 'enable' to true, then specify a station and
  145. # password. To guard against parsing errors, put the password in quotes.
  146. enable = false
  147. station = replace_me
  148. password = replace_me
  149.  
  150. [[Wunderground]]
  151. # This section is for configuring posts to the Weather Underground.
  152.  
  153. # If you wish to post to the Weather Underground, set the option 'enable' to true, then
  154. # specify a station (e.g., 'KORHOODR3') and password. To guard against parsing errors, put
  155. # the password in quotes.
  156. enable = false
  157. station = replace_me
  158. password = replace_me
  159.  
  160. # If you plan on using wunderfixer, set the following
  161. # to your API key:
  162. api_key = replace_me
  163.  
  164. # Set the following to True to have weewx use the WU "Rapidfire"
  165. # protocol. Not all hardware can support it. See the User's Guide.
  166. rapidfire = False
  167.  
  168. ##############################################################################
  169.  
  170. # This section specifies what reports, using which skins, to generate.
  171.  
  172. [StdReport]
  173.  
  174. # Where the skins reside, relative to WEEWX_ROOT
  175. SKIN_ROOT = /etc/weewx/skins
  176.  
  177. # Where the generated reports should go, relative to WEEWX_ROOT
  178. HTML_ROOT = /var/www/html/weewx
  179.  
  180. # Uncomment and change to override logging for reports
  181. # log_success = True
  182. # log_failure = True
  183.  
  184. # The database binding indicates which data should be used in reports.
  185. data_binding = wx_binding
  186.  
  187. # Each of the following subsections defines a report that will be run.
  188. # See the customizing guide to change the units, plot types and line
  189. # colors, modify the fonts, display additional sensor data, and other
  190. # customizations. Many of those changes can be made here by overriding
  191. # parameters, or by modifying templates within the skin itself.
  192.  
  193. [[SeasonsReport]]
  194. # The SeasonsReport uses the 'Seasons' skin, which contains the
  195. # images, templates and plots for the report.
  196. skin = Seasons
  197. enable = true
  198.  
  199. [[SmartphoneReport]]
  200. # The SmartphoneReport uses the 'Smartphone' skin, and the images and
  201. # files are placed in a dedicated subdirectory.
  202. skin = Smartphone
  203. enable = false
  204. HTML_ROOT = /var/www/html/weewx/smartphone
  205.  
  206. [[MobileReport]]
  207. # The MobileReport uses the 'Mobile' skin, and the images and files
  208. # are placed in a dedicated subdirectory.
  209. skin = Mobile
  210. enable = false
  211. HTML_ROOT = /var/www/html/weewx/mobile
  212.  
  213. [[StandardReport]]
  214. # This is the old "Standard" skin. By default, it is not enabled.
  215. skin = Standard
  216. enable = false
  217.  
  218. [[FTP]]
  219. # FTP'ing the results to a webserver is treated as just another report,
  220. # albeit one with an unusual report generator!
  221. skin = Ftp
  222.  
  223. # If you wish to use FTP, set "enable" to "true", then
  224. # fill out the next four lines.
  225. # Use quotes around passwords to guard against parsing errors.
  226. enable = false
  227. user = replace_me
  228. password = replace_me
  229. server = replace_me # The ftp server name, e.g, www.myserver.org
  230. path = replace_me # The destination directory, e.g., /weather
  231.  
  232. # Set to True for an FTP over TLS (FTPS) connection. Not all servers
  233. # support this.
  234. secure_ftp = False
  235.  
  236. # To upload files from something other than what HTML_ROOT is set
  237. # to above, specify a different HTML_ROOT here.
  238. #HTML_ROOT = /var/www/html/weewx
  239.  
  240. # Most FTP servers use port 21
  241. port = 21
  242.  
  243. # Set to 1 to use passive mode, zero for active mode
  244. passive = 1
  245.  
  246. [[RSYNC]]
  247. # rsync'ing to a webserver is treated as just another report
  248. skin = Rsync
  249.  
  250. # If you wish to use rsync, you must configure passwordless ssh using
  251. # public/private key authentication from the user account that weewx
  252. # runs to the user account on the remote machine where the files
  253. # will be copied.
  254. #
  255. # If you wish to use rsync, set "enable" to "true", then
  256. # fill out server, user, and path.
  257. # The server should appear in your .ssh/config file.
  258. # The user is the username used in the identity file.
  259. # The path is the destination directory, such as /var/www/html/weather.
  260. # Be sure that the user has write permissions on the destination!
  261. enable = false
  262. server = replace_me
  263. user = replace_me
  264. path = replace_me
  265.  
  266. # To upload files from something other than what HTML_ROOT is set
  267. # to above, specify a different HTML_ROOT here.
  268. #HTML_ROOT = /var/www/html/weewx
  269.  
  270. # Rsync can be configured to remove files from the remote server if
  271. # they don't exist under HTML_ROOT locally. USE WITH CAUTION: if you
  272. # make a mistake in the remote path, you could could unintentionally
  273. # cause unrelated files to be deleted. Set to 1 to enable remote file
  274. # deletion, zero to allow files to accumulate remotely.
  275. delete = 0
  276.  
  277. # Options in the [[Defaults]] section below will apply to all reports.
  278. # What follows are a few of the more popular options you may want to
  279. # uncomment, then change.
  280. [[Defaults]]
  281.  
  282. # Which language to use for all reports. Not all skins support all languages.
  283. # You can override this for individual reports.
  284. lang = en
  285.  
  286. # Which unit system to use for all reports. Choices are 'us', 'metric', or 'metricwx'.
  287. # You can override this for individual reports.
  288. unit_system = metric
  289.  
  290. [[[Units]]]
  291.  
  292. # Option "unit_system" above sets the general unit system, but overriding specific unit
  293. # groups is possible. These are popular choices. Uncomment and set as appropriate.
  294. # NB: The unit is always in the singular. I.e., 'mile_per_hour',
  295. # NOT 'miles_per_hour'
  296. [[[[Groups]]]]
  297. # group_altitude = meter # Options are 'foot' or 'meter'
  298. # group_pressure = mbar # Options are 'inHg', 'mmHg', 'mbar', or 'hPa'
  299. # group_rain = mm # Options are 'inch', 'cm', or 'mm'
  300. # group_rainrate = mm_per_hour # Options are 'inch_per_hour', 'cm_per_hour', or 'mm_per_hour'
  301. # group_temperature = degree_C # Options are 'degree_C', 'degree_F', or 'degree_K'
  302. # The following line is used to keep the above lines indented properly.
  303. # It can be ignored.
  304. unused = unused
  305.  
  306. # Uncommenting the following section frequently results in more
  307. # attractive formatting of times and dates, but may not work in
  308. # your locale.
  309. [[[[TimeFormats]]]]
  310. # day = %H:%M
  311. # week = %H:%M on %A
  312. # month = %d-%b-%Y %H:%M
  313. # year = %d-%b-%Y %H:%M
  314. # rainyear = %d-%b-%Y %H:%M
  315. # current = %d-%b-%Y %H:%M
  316. # ephem_day = %H:%M
  317. # ephem_year = %d-%b-%Y %H:%M
  318. # The following line is used to keep the above lines indented properly.
  319. # It can be ignored.
  320. unused = unused
  321.  
  322. [[[Labels]]]
  323. # Users frequently change the labels for these observation types
  324. [[[[Generic]]]]
  325. # inHumidity = Inside Humidity
  326. # inTemp = Inside Temperature
  327. # outHumidity = Outside Humidity
  328. # outTemp = Outside Temperature
  329. # extraTemp1 = Temperature1
  330. # extraTemp2 = Temperature2
  331. # extraTemp3 = Temperature3
  332. # The following line is used to keep the above lines indented properly.
  333. # It can be ignored.
  334. unused = unused
  335.  
  336. ##############################################################################
  337.  
  338. # This service acts as a filter, converting the unit system coming from
  339. # the hardware to a unit system in the database.
  340.  
  341. [StdConvert]
  342.  
  343. # The target_unit affects only the unit system in the database. Once
  344. # chosen it cannot be changed without converting the entire database.
  345. # Modification of target_unit after starting weewx will result in
  346. # corrupt data - the database will contain a mix of US and METRIC data.
  347. #
  348. # The value of target_unit does not affect the unit system for
  349. # reporting - reports can display US, Metric, or any combination of units.
  350. #
  351. # In most cases, target_unit should be left as the default: US
  352. #
  353. # In particular, those migrating from a standard wview installation
  354. # should use US since that is what the wview database contains.
  355.  
  356. # DO NOT MODIFY THIS VALUE UNLESS YOU KNOW WHAT YOU ARE DOING!
  357. target_unit = US # Options are 'US', 'METRICWX', or 'METRIC'
  358.  
  359. ##############################################################################
  360.  
  361. # This section can adjust data using calibration expressions.
  362.  
  363. [StdCalibrate]
  364.  
  365. [[Corrections]]
  366. # For each type, an arbitrary calibration expression can be given.
  367. # It should be in the units defined in the StdConvert section.
  368. # Example:
  369. foo = foo + 0.2
  370.  
  371. ##############################################################################
  372.  
  373. # This section is for quality control checks. If units are not specified,
  374. # values must be in the units defined in the StdConvert section.
  375.  
  376. [StdQC]
  377.  
  378. [[MinMax]]
  379. barometer = 26, 32.5, inHg
  380. pressure = 24, 34.5, inHg
  381. outTemp = -40, 120, degree_F
  382. inTemp = 10, 120, degree_F
  383. outHumidity = 0, 100
  384. inHumidity = 0, 100
  385. windSpeed = 0, 120, mile_per_hour
  386. rain = 0, 10, inch
  387.  
  388. ##############################################################################
  389.  
  390. # This section controls the origin of derived values.
  391.  
  392. [StdWXCalculate]
  393.  
  394. [[Calculations]]
  395. # How to calculate derived quantities. Possible values are:
  396. # hardware - use the value provided by hardware
  397. # software - use the value calculated by weewx
  398. # prefer_hardware - use value provide by hardware if available,
  399. # otherwise use value calculated by weewx
  400.  
  401. pressure = prefer_hardware
  402. altimeter = prefer_hardware
  403. appTemp = prefer_hardware
  404. barometer = prefer_hardware
  405. cloudbase = prefer_hardware
  406. dewpoint = prefer_hardware
  407. ET = prefer_hardware
  408. heatindex = prefer_hardware
  409. humidex = prefer_hardware
  410. inDewpoint = prefer_hardware
  411. maxSolarRad = prefer_hardware
  412. rainRate = prefer_hardware
  413. windchill = prefer_hardware
  414. windrun = prefer_hardware
  415.  
  416. ##############################################################################
  417.  
  418. # For hardware that supports it, this section controls how often the
  419. # onboard clock gets updated.
  420.  
  421. [StdTimeSynch]
  422.  
  423. # How often to check the weather station clock for drift (in seconds)
  424. clock_check = 14400
  425.  
  426. # How much it can drift before we will correct it (in seconds)
  427. max_drift = 5
  428.  
  429. ##############################################################################
  430.  
  431. # This section is for configuring the archive service.
  432.  
  433. [StdArchive]
  434.  
  435. # If the station hardware supports data logging then the archive interval
  436. # will be downloaded from the station. Otherwise, specify it (in seconds).
  437. archive_interval = 300
  438.  
  439. # If possible, new archive records are downloaded from the station
  440. # hardware. If the hardware does not support this, then new archive
  441. # records will be generated in software.
  442. # Set the following to "software" to force software record generation.
  443. record_generation = software
  444.  
  445. # Whether to include LOOP data in hi/low statistics
  446. loop_hilo = True
  447.  
  448. # Uncomment and change to override logging for archive operations
  449. # log_success = True
  450. # log_failure = True
  451.  
  452. # The data binding used to save archive records
  453. data_binding = wx_binding
  454.  
  455. ##############################################################################
  456.  
  457. # This section binds a data store to a database.
  458.  
  459. [DataBindings]
  460.  
  461. [[wx_binding]]
  462. # The database must match one of the sections in [Databases].
  463. # This is likely to be the only option you would want to change.
  464. database = archive_sqlite
  465. # The name of the table within the database
  466. table_name = archive
  467. # The manager handles aggregation of data for historical summaries
  468. manager = weewx.manager.DaySummaryManager
  469. # The schema defines the structure of the database.
  470. # It is *only* used when the database is created.
  471. schema = schemas.wview_extended.schema
  472.  
  473. ##############################################################################
  474.  
  475. # This section defines various databases.
  476.  
  477. [Databases]
  478.  
  479. # A SQLite database is simply a single file
  480. [[archive_sqlite]]
  481. database_name = weewx.sdb
  482. database_type = SQLite
  483.  
  484. # MySQL
  485. [[archive_mysql]]
  486. database_name = weewx
  487. database_type = MySQL
  488.  
  489. ##############################################################################
  490.  
  491. # This section defines defaults for the different types of databases.
  492.  
  493. [DatabaseTypes]
  494.  
  495. # Defaults for SQLite databases
  496. [[SQLite]]
  497. driver = weedb.sqlite
  498. # Directory in which the database files are located
  499. SQLITE_ROOT = /var/lib/weewx
  500.  
  501. # Defaults for MySQL databases
  502. [[MySQL]]
  503. driver = weedb.mysql
  504. # The host where the database is located
  505. host = localhost
  506. # The user name for logging in to the host
  507. user = weewx
  508. # The password (use quotes to guard against parsing errors)
  509. password = weewx
  510.  
  511. ##############################################################################
  512.  
  513. # This section configures the internal weewx engine.
  514.  
  515. [Engine]
  516.  
  517. # The following section specifies which services should be run and in what order.
  518. [[Services]]
  519. prep_services = weewx.engine.StdTimeSynch
  520. data_services = ,
  521. process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, weewx.engine.StdQC, weewx.wxservices.StdWXCalculate
  522. xtype_services = weewx.wxxtypes.StdWXXTypes, weewx.wxxtypes.StdPressureCooker, weewx.wxxtypes.StdRainRater, weewx.wxxtypes.StdDelta
  523. archive_services = weewx.engine.StdArchive
  524. restful_services = weewx.restx.StdStationRegistry, weewx.restx.StdWunderground, weewx.restx.StdPWSweather, weewx.restx.StdCWOP, weewx.restx.StdWOW, weewx.restx.StdAWEKAS
  525. report_services = weewx.engine.StdPrint, weewx.engine.StdReport
  526.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement