Skip to content

Commit

Permalink
Merged development into master for v1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
dennissiemensma committed Oct 8, 2017
1 parent 5a17ab3 commit 3b9f4e5
Show file tree
Hide file tree
Showing 99 changed files with 2,730 additions and 1,228 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ before_script:
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'drop database IF EXISTS dsmrreader;' -u root; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysqladmin create dsmrreader; fi"

# https://github.com/travis-ci/travis-ci/issues/8331
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e \"GRANT ALL PRIVILEGES ON dsmrreader.* TO 'travis'@'%';\" -u root; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e \"GRANT ALL PRIVILEGES ON test_dsmrreader.* TO 'travis'@'%';\" -u root; fi"

script:
- py.test --pylama --cov --cov-report=term

Expand Down
Binary file added docs/_static/faq/external_pvoutput_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/faq/pvoutput_add_status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/faq/pvoutput_api.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,56 @@ Using **requests** (Python)::
----


``GET`` - ``consumption/today``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Returns the consumption of the current day so far.


URI
~~~
Full path: ``/api/v2/consumption/today``


Parameters
~~~~~~~~~~
None.


Response
~~~~~~~~
``HTTP 200`` on success. Body contains the result(s) in JSON format. Any other status code on failure.


Example
~~~~~~~

**Data structure returned**::

{
"day": "2017-09-28",
"electricity1": 0.716,
"electricity1_cost": 0.12,
"electricity1_returned": 0,
"electricity2": 3.403,
"electricity2_cost": 0.63,
"electricity2_returned": 0,
"gas": 0.253,
"gas_cost": 0.15,
"total_cost": 0.9,
}


----


``GET`` - ``statistics/hour``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Retrieves any **aggregated hourly statistics**. Please note that these are generated a few hours **after midnight**.


----


``GET`` - ``statistics/day``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Retrieves any **aggregated day statistics**. Please note that these are generated a few hours **after midnight**.
Expand Down
11 changes: 9 additions & 2 deletions docs/application.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,18 @@ Public webinterface warning

- You should also have Nginx restrict application access when exposing it to the Internet. Simply generate an htpasswd string `using one of the many generators found online <https://www.transip.nl/htpasswd/>`_.

- Paste the htpasswd string in ``/etc/nginx/htpasswd``.

.. warning::

It's safe to a htpasswd generator, **just make sure to NEVER enter personal credentials** there **used for other applications or personal accounts**.
It's safe to a htpasswd generator, **just make sure to NEVER enter personal credentials** there **used for other applications or personal accounts**.

.. seealso::

Alternatively you can generate a ``htpasswd`` file locally, by installing ``sudo apt-get install apache2-utils`` and running ``sudo htpasswd -c /etc/nginx/htpasswd USERNAME`` (where ``USERNAME`` is your desired username).

The command will prompt you to enter a password for it.

- Paste the htpasswd string in ``/etc/nginx/htpasswd``.

- Open the site's vhost in ``/etc/nginx/sites-enabled/dsmr-webinterface`` and **uncomment** the following lines (remove the ##)::

Expand Down
32 changes: 32 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,38 @@ Please make sure you have a fresh **database backup** before upgrading! Upgradin



v1.9.0 - 2017-10-08
^^^^^^^^^^^^^^^^^^^

.. note::

This release contains an update for the API framework, which `has a fix for some timezone issues <https://github.com/encode/django-rest-framework/issues/3732>`_.
You may experience different output regarding to datetime formatting when using the API.


**Tickets resolved in this release:**

- [`#9 <https://github.com/dennissiemensma/dsmr-reader/issues/9>`_] Data export: PVOutput
- [`#163 <https://github.com/dennissiemensma/dsmr-reader/issues/163>`_] Allow separate prices/costs for electricity returned
- [`#337 <https://github.com/dennissiemensma/dsmr-reader/issues/337>`_] API mogelijkheid voor ophalen 'dashboard' waarden
- [`#284 <https://github.com/dennissiemensma/dsmr-reader/issues/284>`_] Automatische backups geven alleen lege bestanden
- [`#279 <https://github.com/dennissiemensma/dsmr-reader/issues/279>`_] Weather report with temperature '-' eventually results in stopped dsmr_backend
- [`#245 <https://github.com/dennissiemensma/dsmr-reader/issues/245>`_] Grafiek gasverbruik doet wat vreemd na aantal uur geen nieuwe data
- [`#272 <https://github.com/dennissiemensma/dsmr-reader/issues/272>`_] Dashboard - weergave huidig verbruik bij smalle weergave
- [`#273 <https://github.com/dennissiemensma/dsmr-reader/issues/273>`_] Docker (by xirixiz) reference in docs
- [`#286 <https://github.com/dennissiemensma/dsmr-reader/issues/286>`_] Na gebruik admin-pagina's geen (eenvoudige) mogelijkheid voor terugkeren naar de site
- [`#332 <https://github.com/dennissiemensma/dsmr-reader/issues/332>`_] Launch full screen on iOS device when opening from homescreen
- [`#276 <https://github.com/dennissiemensma/dsmr-reader/issues/276>`_] Display error compare page on mobile
- [`#288 <https://github.com/dennissiemensma/dsmr-reader/issues/288>`_] Add info to FAQ
- [`#320 <https://github.com/dennissiemensma/dsmr-reader/issues/320>`_] auto refresh op statussen op statuspagina
- [`#314 <https://github.com/dennissiemensma/dsmr-reader/issues/314>`_] Add web-applicatie mogelijkheid ala pihole
- [`#358 <https://github.com/dennissiemensma/dsmr-reader/issues/358>`_] Requirements update (September 2017)
- [`#270 <https://github.com/dennissiemensma/dsmr-reader/issues/270>`_] Public Webinterface Warning (readthedocs.io)
- [`#231 <https://github.com/dennissiemensma/dsmr-reader/issues/231>`_] Contributors update
- [`#300 <https://github.com/dennissiemensma/dsmr-reader/issues/300>`_] Upgrade to Django 1.11 LTS



v1.8.2 - 2017-08-12
^^^^^^^^^^^^^^^^^^^

Expand Down
30 changes: 24 additions & 6 deletions docs/credits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,41 @@ Special thanks for supplying code contributions
- `Jeroen Peters <https://www.linkedin.com/in/jeroenpeters1986>`_


Also many thanks to the contributions of
----------------------------------------
Also many thanks to the contributions (reporting) of
----------------------------------------------------
Listed in any order, sorted by name.


- `balk77 <https://github.com/balk77>`_
- `Bert-Jan Vos <https://www.linkedin.com/in/bert-jan-vos-82011712>`_
- `dajappie <https://github.com/dajappie>`_
- `Daniel ter Horst <https://www.linkedin.com/in/danielterhorst>`_
- `emilkwaaitaal <https://github.com/emilkwaaitaal>`_
- `fpompert <https://github.com/fpompert>`_
- `Gert Schaafsma <https://www.linkedin.com/in/gertschaafsma>`_
- `goegol <https://github.com/goegol>`_
- `Hans-Paul Hemelaar <https://www.linkedin.com/in/hanspaulhemelaar>`_
- `helmo <https://github.com/helmo>`_
- `Jelte Leijenaar <https://www.linkedin.com/in/jelteleijenaar>`_
- `Jeroen Tielen <https://nl.linkedin.com/in/jeroentielen>`_
- Koen Volleberg
- `MarsWarrior <https://github.com/MarsWarrior>`_
- `mbnn <https://github.com/mbnn>`_
- `michielvisser <https://github.com/michielvisser>`_
- `mkruiver <https://github.com/mkruiver>`_
- `Paul Vinken <https://nl.linkedin.com/in/paul-vinken-934a7a44>`_
- `perryodk <https://github.com/perryodk>`_
- `pyrocumulus <https://github.com/pyrocumulus>`_
- `Sander de Leeuw <https://www.linkedin.com/in/sander-de-leeuw-58313aa0>`_
- `Sevickson <https://github.com/sevickson>`_
- "`WatskeBart <https://github.com/WatskeBart>`_"


- `ThinkPadNL <https://github.com/ThinkPadNL>`_
- `thommy101 <https://github.com/thommy101>`_
- `TopdRob <https://github.com/TopdRob>`_
- `trbs <https://github.com/trbs>`_
- `voipmeister <https://github.com/voipmeister>`_
- `WatskeBart <https://github.com/WatskeBart>`_
- `xirixiz <https://github.com/xirixiz>`_


Software used
-------------
Please note and respect their licences as well, if any. Credits to the following software and projects:
Expand Down
46 changes: 44 additions & 2 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Every once in a while there may be updates. Since ``v1.5`` you can also easily c
You can update your application to the latest version by executing **deploy.sh**, located in the root of the project.
Make sure to execute it while logged in as the ``dsmr`` user::

sudo su - dsmr
./deploy.sh

It will make sure to check, fetch and apply any changes released. Summary of deployment script steps:
Expand Down Expand Up @@ -61,7 +62,7 @@ Mindergas.nl: Automated gas meter position export
-------------------------------------------------
*How can I link my mindergas.nl account?*

Make sure you have a Mindergas.nl-account or `signup for one <https://www.mindergas.nl/users/sign_up>`_.
Make sure you have a Mindergas.nl account or `signup for one <https://www.mindergas.nl/users/sign_up>`_.
Now go to "`Meterstand API <https://www.mindergas.nl/member/api>`_" and click on the button located below **"Authenticatietoken"**.

.. image:: _static/faq/mindergas_api.png
Expand All @@ -77,6 +78,47 @@ Obviously the export only works when there are any gas readings at all and you h
Therefor this is not supported by the application. You can however, enter them manually on their website.


PVOutput.org: Automated electricity consumption export
------------------------------------------------------
*How can I link my PVOutput.org account?*

Make sure you have a PVOutput.org account, or `signup for an account <https://pvoutput.org/>`_.
You will have to configure your account and PV system(s). For any support doing that, please `see this page <https://pvoutput.org/help.html#overview-getting-started>`_ for more information.

In order to link DSMR-reader to your account, please write down the "API Key" and "System ID" from your PVOutput account. You can find them near the bottom of the "Settings" page in PVOutput.


.. image:: _static/faq/external_pvoutput_settings.png
:target: _static/faq/external_pvoutput_settings.png
:alt: PVOutput account settings


Enter those values in DSMR-reader's admin pages, at "PVOutput: API configuration". Make sure to enter both:

* API Key
* System ID


.. image:: _static/faq/pvoutput_api.png
:target: _static/faq/pvoutput_api.png
:alt: API settings


Now navigate to another settings page in DSMR-reader: "PVOutput: "Add Status" configuration".

* Enable uploading the consumption.
* Choose an interval between the uploads. You can configure this as well on the PVOutput's end, in Device Settings.
* Optionally, choose an upload delay X (in minutes). If set, DSMR-reader will not use data of the past X minutes.
* Optionally, you can choose to enter a **processing delay in minutes** for PVOutput. Please note that PVOutput will only allow this when you have a **"Donation" account** on their website. If you do not have one, they will reject each API call you make, until you disable (clear) this option in DSMR-reader.


.. image:: _static/faq/pvoutput_add_status.png
:target: _static/faq/pvoutput_add_status.png
:alt: Add Status settings

If you configured everything correctly, you should see some addional data in PVOutput listed under "Your Outputs" momentarily.


Usage notification: Daily usage statistics on your smartphone
-------------------------------------------------------------
*Which services for sending notifications are supported?*
Expand Down Expand Up @@ -159,7 +201,7 @@ Recalculate prices retroactively

Statistics for each day are generated once, the day after. However, you can flush your statistics by executing:

``./manage.py dsmr_stats_clear_statistics --ack-to-delete-my-data``
``./manage.py dsmr_backend_delete_aggregated_data``

The application will delete all statistics and (slowly) regenerate them in the background. Just make sure the source data is still there.

Expand Down
14 changes: 14 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ Installation

.. contents::
:depth: 2



Docker (alternative)
--------------------
.. seealso::

There is also a Docker version available for DSMR-reader. It's hosted and maintained by a third party. More information can be found here:

Github: https://github.com/xirixiz/dsmr-reader-docker

Docker hub: https://hub.docker.com/r/xirixiz/dsmr-reader-docker/

Not interested in Docker? Follow the instructions in the chapters below if you wish to install this project the regular way.


1. Database backend (PostgreSQL)
Expand Down
Binary file modified docs/locale/nl/LC_MESSAGES/api.mo
Binary file not shown.
Loading

0 comments on commit 3b9f4e5

Please sign in to comment.