mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-25 00:18:17 +01:00
documentation updated
This commit is contained in:
parent
6abce69a35
commit
b4640b477a
8 changed files with 101 additions and 23 deletions
|
@ -11,7 +11,7 @@ Architecture
|
|||
ActorController
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
.. autoclass:: core.controller.actor_controller.ActorController
|
||||
.. autoclass:: cbpi.controller.actor_controller.ActorController
|
||||
:members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
|
@ -21,7 +21,7 @@ ActorController
|
|||
CBPiActor
|
||||
^^^^^^^^^
|
||||
|
||||
.. autoclass:: cbpi_api.CBPiActor
|
||||
.. autoclass:: cbpi.api.CBPiActor
|
||||
:members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
|
@ -31,7 +31,7 @@ CBPiActor
|
|||
Custom Actor
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. literalinclude:: ../../core/extension/dummyactor/__init__.py
|
||||
.. literalinclude:: ../../cbpi/extension/dummyactor/__init__.py
|
||||
:caption: __init__.py
|
||||
:name: __init__-py
|
||||
:language: python
|
||||
|
@ -40,6 +40,6 @@ Custom Actor
|
|||
|
||||
config.yaml
|
||||
|
||||
.. literalinclude:: ../../core/extension/dummyactor/config.yaml
|
||||
.. literalinclude:: ../../cbpi/extension/dummyactor/config.yaml
|
||||
:language: yaml
|
||||
:linenos:
|
|
@ -18,6 +18,7 @@ Welcome to CraftBeerPi's documentation!
|
|||
kettle_controller
|
||||
properties
|
||||
standards
|
||||
webapis
|
||||
|
||||
|
||||
..
|
||||
|
|
|
@ -1,12 +1,65 @@
|
|||
============
|
||||
Installation
|
||||
============
|
||||
|
||||
Please make sure that Python 3.6 is installed
|
||||
Please make sure that Python 3.5 is installed.
|
||||
`Rapsbian Stretch <https://www.raspberrypi.org/downloads/raspbian//>`_ is required at least.
|
||||
It will also run on MacOS
|
||||
|
||||
|
||||
Download and Installation
|
||||
=========================
|
||||
|
||||
::
|
||||
|
||||
git clone https://github.com/manuel83/craftbeerpi4
|
||||
$ sudo pip install -i https://test.pypi.org/simple/ cbpi
|
||||
|
||||
cd craftbeerpi4
|
||||
Further version can be found on PiPy: https://test.pypi.org/project/cbpi/
|
||||
|
||||
.. note::
|
||||
All dependencies will be installed automatically. The installation will add the command "cbpi" to your shell.
|
||||
|
||||
To uninstall just remove the package via pip.
|
||||
|
||||
::
|
||||
|
||||
$ sudo pip uninstall cbpi
|
||||
|
||||
Run the Server
|
||||
==============
|
||||
|
||||
To start CraftBeerPi just run the following command in your shell
|
||||
::
|
||||
|
||||
$ cbpi
|
||||
|
||||
|
||||
During the first startup a `config` and `logs` folder gets created in the directory from where the `$ cbpi` in called
|
||||
PIP Website: https://test.pypi.org/project/cbpi/
|
||||
|
||||
|
||||
Update CraftBeerPi
|
||||
==================
|
||||
|
||||
That's super easy. Just run again with upgrade option
|
||||
::
|
||||
$ sudo pip install -i https://test.pypi.org/simple/ cbpi --upgrade
|
||||
|
||||
|
||||
Install plugins
|
||||
===============
|
||||
|
||||
Plugins are normal Python Pip packages.
|
||||
|
||||
Install
|
||||
::
|
||||
|
||||
$ sudo pip install -i https://test.pypi.org/simple/ CBPiActor1
|
||||
|
||||
Uninstall
|
||||
|
||||
::
|
||||
|
||||
$ pip uninstall CBPiActor1
|
||||
|
||||
pip install -r requirements.txt
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ Kettle
|
|||
KettleController
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. autoclass:: core.controller.kettle_controller.KettleController
|
||||
.. autoclass:: cbpi.controller.kettle_controller.KettleController
|
||||
:members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
|
@ -16,7 +16,7 @@ CBPiKettleLogic
|
|||
^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
.. autoclass:: cbpi_api.CBPiKettleLogic
|
||||
.. autoclass:: cbpi.api.CBPiKettleLogic
|
||||
:members:
|
||||
:show-inheritance:
|
||||
:inherited-members:
|
||||
|
@ -25,7 +25,7 @@ CBPiKettleLogic
|
|||
Custom Logic
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. literalinclude:: ../../core/extension/dummylogic/__init__.py
|
||||
.. literalinclude:: ../../cbpi/extension/dummylogic/__init__.py
|
||||
:caption: __init__.py
|
||||
:name: __init__-py
|
||||
:language: python
|
||||
|
@ -34,6 +34,6 @@ Custom Logic
|
|||
|
||||
config.yaml
|
||||
|
||||
.. literalinclude:: ../../core/extension/dummylogic/config.yaml
|
||||
.. literalinclude:: ../../cbpi/extension/dummylogic/config.yaml
|
||||
:language: yaml
|
||||
:linenos:
|
|
@ -13,7 +13,7 @@ Typical example how to use properties in an actor module.
|
|||
Custom Actor
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. literalinclude:: ../../core/extension/dummyactor/__init__.py
|
||||
.. literalinclude:: ../../cbpi/extension/dummyactor/__init__.py
|
||||
:caption: __init__.py
|
||||
:name: __init__-py
|
||||
:language: python
|
||||
|
@ -23,7 +23,7 @@ Custom Actor
|
|||
|
||||
|
||||
|
||||
.. autoclass:: cbpi_api.Property
|
||||
.. autoclass:: cbpi.api.Property
|
||||
:members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
|
|
|
@ -5,7 +5,7 @@ Sensor
|
|||
Sensor Controller
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. autoclass:: core.controller.sensor_controller.SensorController
|
||||
.. autoclass:: cbpi.controller.sensor_controller.SensorController
|
||||
:members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
|
@ -15,7 +15,7 @@ Sensor Controller
|
|||
CBPiSensor
|
||||
^^^^^^^^^^
|
||||
|
||||
.. autoclass:: cbpi_api.CBPiSensor
|
||||
.. autoclass:: cbpi.api.CBPiSensor
|
||||
:members:
|
||||
:private-members:
|
||||
:undoc-members:
|
||||
|
@ -25,15 +25,15 @@ CBPiSensor
|
|||
Custom Sensor
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. literalinclude:: ../../core/extension/dummysensor/__init__.py
|
||||
.. literalinclude:: ../../cbpi/extension/dummysensor/__init__.py
|
||||
:caption: __init__.py
|
||||
:name: __init__-py
|
||||
:name: __init__.py
|
||||
:language: python
|
||||
:linenos:
|
||||
|
||||
|
||||
config.yaml
|
||||
|
||||
.. literalinclude:: ../../core/extension/dummysensor/config.yaml
|
||||
.. literalinclude:: ../../cbpi/extension/dummysensor/config.yaml
|
||||
:language: yaml
|
||||
:linenos:
|
|
@ -6,7 +6,7 @@ Brewing Step
|
|||
StepController
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
.. autoclass:: core.controller.step_controller.StepController
|
||||
.. autoclass:: cbpi.controller.step_controller.StepController
|
||||
:members:
|
||||
|
||||
:undoc-members:
|
||||
|
@ -16,7 +16,7 @@ StepController
|
|||
CBPiSimpleStep
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
.. autoclass:: cbpi_api.CBPiSimpleStep
|
||||
.. autoclass:: cbpi.api.CBPiSimpleStep
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
@ -28,7 +28,7 @@ Custom Step
|
|||
This is an example of a custom step. The Step class need to extend Simple step. In addtion at least the run_cycle method needs to be overwritten
|
||||
|
||||
|
||||
.. literalinclude:: ../../core/extension/dummystep/__init__.py
|
||||
.. literalinclude:: ../../cbpi/extension/dummystep/__init__.py
|
||||
:caption: __init__.py
|
||||
:language: python
|
||||
:linenos:
|
||||
|
@ -36,6 +36,6 @@ This is an example of a custom step. The Step class need to extend Simple step.
|
|||
|
||||
config.yaml
|
||||
|
||||
.. literalinclude:: ../../core/extension/dummystep/config.yaml
|
||||
.. literalinclude:: ../../cbpi/extension/dummystep/config.yaml
|
||||
:language: yaml
|
||||
:linenos:
|
24
docs_src/source/webapis.rst
Normal file
24
docs_src/source/webapis.rst
Normal file
|
@ -0,0 +1,24 @@
|
|||
REST API
|
||||
========
|
||||
|
||||
The REST API is document by using Swagger.IO.
|
||||
After startup of the server the API documentation is available under:
|
||||
|
||||
::
|
||||
|
||||
http://<SERVER_IP>:<PORT>/api/doc
|
||||
|
||||
|
||||
WebSocket API
|
||||
=============
|
||||
|
||||
WebSocket client can be connected to the following endpoint:
|
||||
|
||||
::
|
||||
|
||||
http://<SERVER_IP>:<PORT>/ws
|
||||
|
||||
I recommend to use Dark WebSocket Terminal for testing. At the moment the WebSocket API is just pushing data.
|
||||
|
||||
.. note::
|
||||
Currently Security is not enabled. That means you need no password to connect to th Web APIs
|
Loading…
Reference in a new issue