Skip to content

Commit

Permalink
docs - updated condition config
Browse files Browse the repository at this point in the history
  • Loading branch information
superstes committed Apr 27, 2021
1 parent 7a94133 commit b089f1c
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 6 deletions.
63 changes: 59 additions & 4 deletions docs/source/config/condition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ The **following steps are needed** to configure such a condition:

|default_condition|

----

Reverse
=======

Expand Down Expand Up @@ -150,6 +152,7 @@ The **following steps are needed** to configure such a condition:

|reverse_condition|

----

Info
****
Expand All @@ -164,14 +167,16 @@ Links allow conditions to have complex structures.
They are used to calculate the result of two member-items.


**It links** one of the following:
Linking targets
---------------

* two condition matches,
* one match and a nested condition or
* two nested conditions


Supported **processing types** are:
Processing types
----------------

* **AND** => both members must match
* **NOT-AND** => neither or just one member must match
Expand All @@ -181,11 +186,61 @@ Supported **processing types** are:
* **NOT-XOR** => either both or none of the members must match
* **NOT** => the first one must match, the second one must not

----

Condition match
===============

.. _config-condition-match:

.. warning::
Documentation is not yet finished.
A condition match is a single rule to match.

It will compare data to some given value using an operator.

Sources of data
---------------

* **Input device** => a single sensor device
* **Input model** => all devices of a given sensor model

* They can be **filtered by an area** => only the devices in the given area will be used for the data selection

* **Special match** => some other comparison like:

* **time** => comparison with the current **time of the day**
* **date** => comparison with the **current date**
* **datetime** => comparison with the **current date and time**
* **day_week** => comparison with the current **day of the week**
* **day_month** => comparison with the current **day of the month**


Periods
-------

Periods are used to pull data-points for the match comparison.

There currently are **two types of periods** to use.

* **RANGE** => the last N data-points of the given device(s)
* **TIME** => all data-points in a given time period (*in seconds*)


Check types
-----------

These check types are used to calculate the final data for comparison from the given pool of datapoint pulled from the database.

If the **data type** is **neither integer nor float** those **calculations will be skipped**.

* **AVG** => get the average value
* **MIN** => get the smallest value
* **MAX** => get the largest value


Operators
---------

* **EQUALS** => whether the calculated data is equal to the configured value
* **NOT** => the data must not be equal to the value
* **BIGGER** (*<*) => whether the data is bigger than the value
* **SMALLER** (*>*) => whether the data is smaller than the value
6 changes: 4 additions & 2 deletions docs/source/setup/raspberry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ Here you can find some basic setup infos.

**This is NOT a full set** of instructions needed to setup the GrowAutomation software.

There is a setup script made for exactly that purpose.
There is a `setup script <https://github.com/superstes/growautomation/tree/dev/setup>`_ for exactly that purpose.


.. warning::
Documentation is not yet finished.

----

SSD
***

Expand Down Expand Up @@ -116,4 +118,4 @@ ____________

7. Re-connect to the raspi and re-do the steps 2 to 5

8. Disconnect the sd-card and you are done with this!
8. Disconnect the sd-card and you are done with this!

0 comments on commit b089f1c

Please sign in to comment.