import schemas.wview_extended
my_schema = {
'table': schemas.wview_extended.table + [('soilMoist5', 'REAL')],
'day_summaries' : schemas.wview_extended.day_summaries + [('soilMoist5', 'SCALAR')]
}
import weewx.units
weewx.units.obs_group_dict['soilMoist5'] = 'group_moisture'
Additional/optional sensors:
One WH32 outdoor temperature and humidity sensor. possibly because this is not a multi-channel device - see WH31 below.
One WH40 self-emptying rain gauge sensor
One WS68 wireless anemometer
One WH57 lightning sensor
Up to 8 WH31 multi-channel temperature and humidity sensors
Up to 8 WH51 soil moisture sensors
Up to 4 WH41 PM2.5 air quality sensors
Up to 4 WH55 Water leak sensors
Future sensors (to be developed), such as: water temp, soil temp
import schemas.wview_extended
my_schema = {
'table': schemas.wview_extended.table + [ ('soilMoist5', 'REAL')
('soilMoist6', 'REAL') ('soilMoist7', 'REAL') ('soilMoist8', 'REAL') ],
'day_summaries' : schemas.wview_extended.day_summaries + [('soilMoist5','soilMoist6','soilMosit7','soilMoist8', 'SCALAR')]
}
import weewx.units
weewx.units.obs_group_dict['soilMoist5','soilMoist6','soilMost7,'soilMoist8'] = 'group_moisture'
--
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/8dbd5209-bc5e-4f76-9457-c04369eefea6o%40googlegroups.com.
import schemas.wview_extended
my_schema = {
'table': schemas.wview_extended.table +
[ ('soilMoist5', 'REAL’), ('soilMoist6', 'REAL’), ('soilMoist7', 'REAL’),
('soilMoist8', 'REAL') ],
'day_summaries' : schemas.wview_extended.day_summaries + [('soilMoist5’,’scalar’),(‘soilMoist6’,’scalar’),(‘soilMoist7’,’scalar’),('soilMoist8', ’scalar')]
}import weewx.units
weewx.units.obs_group_dict[‘soilMoist5’] = ‘group_moisture’ weewx.units.obs_group_dict[‘soilMoist6’] = ‘group_moisture’ weewx.units.obs_group_dict[‘soilMoist7’] = ‘group_moisture’ weewx.units.obs_group_dict['soilMoist8'] = 'group_moisture'
/etc/init.d/weewx stop
cp /home/weewx/archive/weewx.sdb /home/weewx/archive/weewx.sdb.bkup08232020a
## Copyright (c) 2009-2015 Tom Keffer <tke...@gmail.com>## See the file LICENSE.txt for your full rights.#"""User extensions moduleThis module is imported from the main executable, so anything put here will beexecuted before anything else happens. This makes it a good place to put userextensions.
"""my_schema = {'table': schemas.wview_extended.table + [('soilMoist5', 'REAL'),('soilMoist6', 'REAL'),('soilMoist7', 'REAL'),('soilMoist8', 'REAL')],'day_summaries' : schemas.wview_extended.day_summaries + [('soilMoist5','scalar'),('soilMoist6','scalar'),('soilMoist7','scalar'),('soilMoist8', 'scalar')]import weewx.unitsweewx.units.obs_group_dict['soilMoist5'] = 'group_moisture' weewx.units.obs_group_dict['soilMoist6'] = 'group_moisture' weewx.units.obs_group_dict['soilMoist7'] = 'group_moisture' weewx.units.obs_group_dict['soilMoist8'] = 'group_moisture'
import locale# This will use the locale specified by the environment variable 'LANG'# Other options are possible. See:locale.setlocale(locale.LC_ALL, '')
[DataBindings][[wx_binding]]# The database must match one of the sections in [Databases].# This is likely to be the only option you would want to change.database = archive_sqlite# The name of the table within the databasetable_name = archive# The manager handles aggregation of data for historical summariesmanager = weewx.manager.DaySummaryManager# The schema defines the structure of the database.# It is *only* used when the database is created.#schema = schemas.wview_extended.schema = user.extensions.my_schema[[forecast_binding]]manager = weewx.manager.Managerschema = user.forecast.schematable_name = archivedatabase = forecast_sqlite
/home/weewx/bin/wee_database /home/weewx/weewx.conf --reconfigure
mv /home/weewx/archive/weewx.sdb_new /home/weewx/archive/weewx.sdb
/etc/init.d/weewx start
--
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/7069D2C1-0BEE-4008-8C71-3D282A27220A%40gmail.com.
## Copyright (c) 2009-2015 Tom Keffer <tke...@gmail.com>## See the file LICENSE.txt for your full rights.#"""User extensions moduleThis module is imported from the main executable, so anything put here will beexecuted before anything else happens. This makes it a good place to put userextensions."""
import locale# This will use the locale specified by the environment variable 'LANG'# Other options are possible. See:locale.setlocale(locale.LC_ALL, '')
import schemas.wview_extendedmy_schema = {'table': schemas.wview_extended.table + [('soilMoist5', 'REAL'),('soilMoist6', 'REAL'),('soilMoist7', 'REAL'),('soilMoist8', 'REAL')],'day_summaries' : schemas.wview_extended.day_summaries + [('soilMoist5','SCALAR'),('soilMoist6','SCALAR'),('soilMoist7','SCALAR'),('soilMoist8','SCALAR')]}import weewx.unitsweewx.units.obs_group_dict['soilMoist5','soilMoist6','soilMoist7','soilMoist8'] = 'group_moisture'
And below is my query for the extra sensors in the database.root@myweewx:~# /home/weewx/bin/wee_database /home/weewx/weewx.conf --reconfigureUsing configuration file /home/weewx/weewx.confUsing database binding 'wx_binding', which is bound to database 'archive_sqlite'Copying database 'weewx.sdb' to 'weewx.sdb_new'The new database will use the same unit system as the old ('US').Are you sure you wish to proceed (y/n)? yDatabase 'weewx.sdb' copied to 'weewx.sdb_new' in 2.92 seconds.
root@myweewx:~# sqlite3 /home/weewx/archive/weewx.sdb_newSQLite version 3.31.1 2020-01-27 19:55:54Enter ".help" for usage hints.sqlite> .headers onsqlite> SELECT dateTime,soilMoist4 FROM archive ORDER BY dateTime ASC LIMIT 5;dateTime|soilMoist41596909900|60.01596910200|60.01596910500|60.01596910800|60.01596911100|60.0sqlite> SELECT dateTime,soilMoist5 FROM archive ORDER BY dateTime ASC LIMIT 5;dateTime|soilMoist51596909900|1596910200|1596910500|1596910800|1596911100|sqlite> SELECT dateTime,soilMoist6 FROM archive ORDER BY dateTime ASC LIMIT 5;dateTime|soilMoist61596909900|1596910200|1596910500|1596910800|1596911100|sqlite> SELECT dateTime,soilMoist7 FROM archive ORDER BY dateTime ASC LIMIT 5;dateTime|soilMoist71596909900|1596910200|1596910500|1596910800|1596911100|sqlite> SELECT dateTime,soilMoist8 FROM archive ORDER BY dateTime ASC LIMIT 5;dateTime|soilMoist81596909900|1596910200|1596910500|1596910800|1596911100|
Thank you for all your help!
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/1c827370-5291-4b7e-aa13-8d51b4ee737cn%40googlegroups.com.
## Copyright (c) 2009-2015 Tom Keffer <tke...@gmail.com>## See the file LICENSE.txt for your full rights.#"""User extensions moduleThis module is imported from the main executable, so anything put here will beexecuted before anything else happens. This makes it a good place to put userextensions."""import locale# This will use the locale specified by the environment variable 'LANG'# Other options are possible. See:locale.setlocale(locale.LC_ALL, '')import schemas.wview_extendedmy_schema = {'table': schemas.wview_extended.table + [('soilMoist5', 'REAL'),('soilMoist6', 'REAL'),('soilMoist7', 'REAL'),('soilMoist8', 'REAL')],'day_summaries' : schemas.wview_extended.day_summaries + [('soilMoist5','SCALAR'),('soilMoist6','SCALAR'),('soilMoist7','SCALAR'),('soilMoist8','SCALAR')]}import weewx.units
weewx.units.obs_group_dict['soilMoist5'] = 'group_moisture'weewx.units.obs_group_dict['soilMoist6'] = 'group_moisture'weewx.units.obs_group_dict['soilMoist7'] = 'group_moisture'weewx.units.obs_group_dict['soilMoist8'] = 'group_moisture'
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/5b542d8e-4eaf-4b59-a329-2d7e72649f48n%40googlegroups.com.
or for package installs:
$ cp /etc/weewx/skins/Seasons/current.inc /home/weewx/skins/Seasons/current_orig.inc
should be
or for package installs:
$ cp /etc/weewx/skins/Seasons/current.inc /etc/weewx/skins/Seasons/current_orig.inc
Larry