Package: wdwapp
For the moment, only cron.py works.The rest of this README file is not relevant.Please look into cron.py for explanations.Wait next releases to have full description.In one word :Install this software (For fedora)$ sudo dnf install python3-pip$ sudo dnf install mariadb-devel$ sudo dnf install gcc$ sudo dnf install redhat-rpm-config$ pip install wdwappDownload development.ini file from :https://static.frkb.fr/wdwappExample. Do : wgethttps://static.frkb.fr/wdwapp/development.iniAdapt this file for your need.Create a database (empty) for this app.In phpMyAdmin for exemple you can do :CREATE USER‘wdwapp’@’localhost’ IDENTIFIED BY ‘my secret password’;GRANT USAGE ON.TO‘wdwapp’@’localhost’ REQUIRE NONE WITHMAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0MAX_USER_CONNECTIONS 0;CREATE DATABASE IF NOT EXISTSwdwapp;GRANT ALLPRIVILEGES ONwdwapp.* TO‘wdwapp’@’localhost’;Create tables :$ wdwapp_initialize_db development.iniPut in a cron job this command :$ wdwapp_cron /path/to/development.iniBecause by default data is saved every 15 minutes, it is a good idea to callthe cron job 3 minutes after. This mean every hour at 3, 18, 33 and 48 minute.To do tis with con insert this line in the crontab :3,18,33,48  *  *  *  * wdwapp_cron /path/to/development.iniStart web server :$ gunicorn –paste development.iniDO NOT USE the rest of this file =============================================Getting StartedChange directory into your newly created project:cd meteowebCreate a Python virtual environment:python3 -m venv envUpgrade packaging tools:env/bin/pip install --upgrade pip setuptoolsInstall the project in editable mode with its testing requirements:env/bin/pip install -e ".[testing]"Run your project’s tests:env/bin/pytestDownload ini files:wget http://static.frkb.fr/wdwapp/development.ini
wget http://static.frkb.fr/wdwapp/production.iniAdaptdomainesentry in[app:main]section from ini filesee onhttps://api.ovh.com/how to obtain keys.
Or go directly tohttps://api.ovh.com/createToken/index.cgiRun your project:env/bin/pserve development.ini
or
env/bin/pserve production.iniAcces your project:http://localhost:6543Retrieve weather data using a cron job.Get the URLhttp://localhost:6543/cronevery 15 minutes.The best way is to add the following line in a crontab :*/15  *  *  *  * wget -q -O /dev/null http://dev.local:6543/cronReplace dev.local:6543 with your domain if you have one.The interval used to call this service determine the data interval.Change log0.1.42021/10/18Use of route_path instead of route_url to keep http or https scheme.Use of current year in copyright.Show last change and nbr of changes over battery icon.Show last-seen over time icon.Add Possibility to connect to weather data server with password.Group battery and timing indicator in one indicator column.Update Bootstrap from 3.3 to 5.1Replaced indicators icons with bootstart iconshttps://icons.getbootstrap.comAdd arrow in detail view to navigate between locations.Add click to change battery on battery icon with confirmation.In case if locations no more in session (e.g. if cookies are cleared)
refresh there list.0.1.32021/10/16Change display order in overview.Correction of URL to https.Correction of reStructuredText syntax errors.Add alembic versions files.Add alembic database update script.0.1.02021/10/15Add two year digit in date of detail.Add battery life data (last change, number of change).Add display of battery level as a icon.Add display of accuracy of data. If data is up to date as a icon.Add new config value “ in .ini file.0.0.82018/02/28use of gunicorn as web-server.Data base update. Suppress unique index on sensor id in location.
Please run V007to008.sql available onhttp://static.frkb.fr/wdwappDetect and send alarms only every wd.interval.Corrections :When new sensor is detected save first data received.Internal Server Error after lost MySql connection due to interactive timeout.
Resolved by adding pool_pre_ping=True to create_engine.0.0.72017/12/28Data base update. Add rank and grah color to location.
Please run V006to007.sql available onhttp://static.frkb.fr/wdwappSecure humidity reading. Cannot be below 1 or upper 100.Added detail view of last 24h data for a location.0.0.62017/12/26Beginning with the webserver.
A first page with last datas is available (in french sorry).Data base update. Add long description to server.
Please run V004to005.sql available onhttp://static.frkb.fr/wdwappRemoved tests.0.0.42017/12/25Remove return value.Change logging system to manage different levels (debug, error, warning,
etc.). In this way, for example, warnings can be send by mail from cron.
This implies mail option from log() have been removed.Suppress of backup file. Replaced by sensor_data table.
This table is indexed with sensor ID and timestamp so it is easier to
re-process data for a new sensor (re-process part need to be written).0.0.32017/12/22Rounding results to avoid truncate warning during database update.Avoid to insert already existing weather data.0.0.12017/12/21First version.