Skip to content

Commit

Permalink
docs - extended config documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
superstes committed Jan 9, 2022
1 parent e17c81c commit 5f566bf
Show file tree
Hide file tree
Showing 19 changed files with 173 additions and 46 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/source/_static/img/config/device/model.svg
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/source/_static/img/config/device/output.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 58 additions & 13 deletions docs/source/config/dashboard.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

.. |element| image:: ../_static/img/config/dashboard/element.svg
:class: ga-img-basic ga-img-center
.. |charts| image:: ../_static/img/config/dashboard/charts.png
:class: ga-img-basic ga-img-center ga-img-border
.. |db_create| image:: ../_static/img/config/dashboard/db_create.png
:class: ga-img-basic ga-img-center ga-img-border
.. |db_add| image:: ../_static/img/config/dashboard/db_add.png
:class: ga-img-basic ga-img-center ga-img-border
.. |db_preview| image:: ../_static/img/config/dashboard/db_preview.png
:class: ga-img-basic ga-img-center ga-img-border

.. include:: ../includes/tip_links.rst

Expand All @@ -13,32 +21,69 @@ Description
***********
How to configure dashboards in the GrowAutomation webinterface.

Dashboards
**********
Elements
********

How to create a dashboard and configure its grid-system.
Dashboard elements can be added to dashboards.

.. include:: ../includes/warn_in_progress.rst
You have to configure it using the 'Data - Charts' site.

Elements
********
|charts|

|element|

How to create a dashboard element.
They are built of 'datasets' and 'graphs'.

.. include:: ../includes/warn_in_progress.rst
|element|

Graphs
======

How to create a graph prototype.
A 'graph' defines some basic settings for the dashboard-element.

.. include:: ../includes/warn_in_progress.rst
Per example:

* time/date formats

* x/y axis settings

* chart.js custom configuration

* data unit

Datasets
========

How to create a dataset.
A 'dataset' is used to configure what data will be displayed.

You have to set:

* an input-device

* some data-range

* a data-function (*minimum, average, maximum*)

* visual settings

Dashboards
**********

After creating your dashboard-elements you can add them to a dashboard.

To do that you first have to create a dashboard.

You can do this by choosing 'Create' on the site 'Data - Dashboard' and clicking on the 'Select' button.

|db_create|

Give the dashboard a name and set the size of the dashboard (*row times columns*) and click on 'Save'.

You now can see a preview of your new dashboard.

At the bottom you can add elements to the dashboard and choose their size and position.

|db_add|

You then can verify the looks of it in the preview and modify it if needed.

.. include:: ../includes/warn_in_progress.rst
|db_preview|
60 changes: 39 additions & 21 deletions docs/source/config/device.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
.. _config-device:

.. |model| image:: ../_static/img/config/device/model.svg
:class: ga-img-basic ga-img-center
.. |device_create| image:: ../_static/img/config/device/device_create.png
:class: ga-img-basic ga-img-center ga-img-border
.. |device_add| image:: ../_static/img/config/device/device_add.png
:class: ga-img-basic ga-img-center ga-img-border
.. |device_finished| image:: ../_static/img/config/device/device_finished.png
:class: ga-img-basic ga-img-center ga-img-border
.. |output| image:: ../_static/img/config/device/output.png
:class: ga-img-basic ga-img-center ga-img-border

.. include:: ../includes/tip_links.rst

======
Expand All @@ -17,43 +28,50 @@ Basic

How the basic device config is structured.

.. include:: ../includes/warn_in_progress.rst
Model
-----

----
**Device models** are used to group devices of the **same hardware-type**.

.. _config-device-input:
|model|

Input
*****
Settings that are shared across all devices of this type are set for the model.

:ref:`What are input devices <device-input>`
Those settings are inherited by the devices. A device can only be a member/child of one model!

Special config for input devices.
Some settings can be defined on a model- and device-basis. If a setting is defined in both - the **device config will be prioritized**.

.. include:: ../includes/warn_in_progress.rst
You always have to **create the device-model first** - before you can create devices of its type. This can be done on the site 'Config - Input' or whatever device-type you want to create (*Input/Output/Connection*). Just press the 'Create' button at the bottom of the site.

----

.. _config-device-output:
Device
------

Output
******
After you created the device-model - you can create your devices.

:ref:`What are output devices <device-output>`
Open the model-members section and press the 'Create' button shown in it:

Special config for output devices.
|device_create|

.. include:: ../includes/warn_in_progress.rst
Fill the form-data and press the 'Save' button.

After that you can add the device as a member of the model:

|device_add|

It should look like this when you've finished you configuration:

|device_finished|

----

.. _config-device-connection:
Output
******

Connection
**********
:ref:`What are output devices <device-output>`

:ref:`What are connection devices <device-connection>`
Output devices have some additional settings. Actors can be reversible - therefore you are able to set some 'reverse-settings'.

Special config for connection devices.
Also you can see the status of your actors on the site 'Config - Output':

.. include:: ../includes/warn_in_progress.rst
|output|
9 changes: 5 additions & 4 deletions docs/source/config/script.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _config-script:

.. |list| image:: ../_static/img/config/script/list.png
:class: ga-img-basic ga-img-center
:class: ga-img-basic ga-img-center ga-img-border

.. include:: ../includes/tip_links.rst

Expand Down Expand Up @@ -72,7 +72,7 @@ Per example:
python3 cpu_temp.py
> {"data": "12.60"}
In python3 this can be done like this:
In python3 it can be done like this:

.. code-block:: python3
Expand Down Expand Up @@ -138,7 +138,7 @@ Whenever you need to pass:

You can use the **device-connection** setting.

This setting can be either hold one **single value** or **key-value pairs** and will be passed as JSON to the script.
This setting can either hold one **single value** or **key-value pairs** and will be passed in JSON-format to the script.

Single value
^^^^^^^^^^^^
Expand All @@ -149,6 +149,7 @@ Per example:
# configured script: 'dht22.py'
# configured argument: 'temperature'
# configured device-connection: '4'
# command to be executed by the core:
python3 dht22.py temperature "{\"connection\": 4}"
Expand All @@ -171,7 +172,7 @@ Per example:
# command to be executed to stop the actor:
python3 L298N.py reverse "{\"connection\": {\"fwd\": \"19\", \"rev\": \"26\", \"time\": \"20\"}}"
The script can then load that config - in python3 this can be done like this:
The script can then load that config - in python3 it can be done like this:

.. code-block:: python3
Expand Down
28 changes: 26 additions & 2 deletions docs/source/config/system.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.. _config-system:

.. |settings| image:: ../_static/img/config/system/settings.png
:class: ga-img-basic ga-img-center ga-img-border

.. include:: ../includes/tip_links.rst

======
Expand All @@ -8,6 +11,27 @@ System

Description
***********
How to configure the controller system.

.. include:: ../includes/warn_in_progress.rst
System settings are used to define configure fundamental functions.

Those settings are split-up in two types - 'Server' and 'Agent'.

This is because in the future it will be possible to connect multiple agents to one server.

|settings|

Server
******

The server-settings are set for the website - you use to interact with the GrowAutomation software.

Most of these settings are related to the webinterface itself.


Agent
*****

The agent-settings are set for the GrowAutomation core - that is processing your devices.

Here you find settings related to the core service.

4 changes: 2 additions & 2 deletions docs/source/device/connection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Config
Device model
^^^^^^^^^^^^

* Script: ads1115.py
* Script: `ads1115.py <https://github.com/superstes/growautomation/blob/dev/code/device/connection/ads1115.py>`_

Device
^^^^^^
Expand Down Expand Up @@ -175,7 +175,7 @@ Config
Device model
^^^^^^^^^^^^

* Script: mcp3008.py
* Script: `mcp3008.py <https://github.com/superstes/growautomation/blob/dev/code/device/connection/mcp3008.py>`_
* Script argument: spi number

* If empty => the default spi will be used
Expand Down
40 changes: 39 additions & 1 deletion docs/source/device/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Config
Device model
^^^^^^^^^^^^

* Script: dht22.py
* Script: `dht22.py <https://github.com/superstes/growautomation/blob/dev/code/device/input/dht22.py>`_
* Script argument: temperature or humidity
* Data unit: °C
* Data type: FLOAT
Expand Down Expand Up @@ -318,3 +318,41 @@ Issues
**You could**:

Turn on the energy supply to the sensor only at the moment you want to read its measurement (*per example with a relay*). This would slow the electrolysis down.

----

Raspberry CPU Temperature
=========================

Tags
----

* **NATIVE**

Dependencies
------------

* **privileges**

* executing user must be a member of group **video** (*usermod -a -G video USERNAME*)

Config
------

Device model
^^^^^^^^^^^^

* Script: `cpu_temp.py <https://github.com/superstes/growautomation/blob/dev/code/device/input/cpu_temp.py>`_
* Data unit: °C
* Data type: FLOAT
* Timer: Measurement interval in seconds

Device
^^^^^^

* Connection: NONE

Issues
------

No known issues.
2 changes: 1 addition & 1 deletion docs/source/device/output.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Config
Device model
^^^^^^^^^^^^

* Script: L298N.py
* Script: `L298N.py <https://github.com/superstes/growautomation/blob/dev/code/device/output/L298N.py>`_
* Script argument: forward
* Reverse script argument: reverse
* Reverse type: condition or time
Expand Down
2 changes: 1 addition & 1 deletion docs/source/setup/6-post-setup.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _setup-post-setup:

.. |users| image:: ../_static/img/setup/post-setup/users.png
:class: ga-img-center
:class: ga-img-center ga-img-border

.. include:: ../includes/tip_links.rst

Expand Down
2 changes: 1 addition & 1 deletion docs/source/workflow/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Description

Inputs are used to **gather sensor data**.

The data collection is done in a **time interval** :ref:`as configured <config-device-input>`.
The data collection is done in a **time interval** :ref:`as configured <config-device>`.

This data inserted and stored in the database.

Expand Down

0 comments on commit 5f566bf

Please sign in to comment.