Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dabamos/openadms
Browse files Browse the repository at this point in the history
  • Loading branch information
interkosmos committed Sep 5, 2017
2 parents 61e012b + 5de68dd commit 9b6c48c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,23 @@ The current development version of OpenADMS is 0.5 (code name
more information, please see https://www.dabamos.de/.

## Installation
To run OpenADMS, clone the master branch, install the dependencies and execute
`openadms.py`:

Before you can start OpenADMS, you have to clone the master branch and install
all dependencies:
```
$ git clone https://github.com/dabamos/openadms.git
$ cd openadms
$ python3 -m pip install -U -r requirements.txt
$ python3 openadms.py --config ./config/myconfig.json --with-mqtt-broker --debug
```
Run OpenADMS from the command line:
```
$ python3 openadms.py --config ./config/my_config.json --with-mqtt-broker --debug
```
OpenADMS also features a graphical launcher. At first, run `win_install.bat` on
Microsoft Windows or install the dependencies manually:
```
$ python3 -m pip install Gooey
```
Execute `openadms-gui.pyw` to start the graphical launcher.

### Dependencies
OpenADMS depends on the following Python libraries:
Expand All @@ -47,6 +55,9 @@ OpenADMS depends on the following Python libraries:
* [pyserial](https://pypi.python.org/pypi/pyserial) (Python Software Foundation Licence)
* [uptime](https://pypi.python.org/pypi/uptime) (BSD-2-Clause Licence)

The graphical launcher uses [Gooey](https://pypi.python.org/pypi/Gooey) (MIT
Licence).

## Message Broker
The MQTT protocol is used for the message exchange in OpenADMS. You can either
use an external MQTT message broker, like
Expand All @@ -64,15 +75,13 @@ The configuration of OpenADMS is done by using a JSON-based text file, located
in the directory `./config`. Please define modules, serial ports, sensors, and
so on there. OpenADMS takes the file name of your custom configuration as an
argument. For instance, run:

```
$ python3 openadms.py --config ./config/myconfig.json --with-mqtt-broker --debug
```

## Virtual Environment
The Python tool `venv` can create a virtual Python environment for development
(with `csh`/`tcsh` on Unix):

```
$ python3 -m venv virtual-environment
$ source ./virtual-environment/bin/activate.csh
Expand All @@ -89,4 +98,3 @@ the project website.
## Licence
OpenADMS is licenced under the [European Union Public
Licence](https://joinup.ec.europa.eu/community/eupl/og_page/eupl) (EUPL) v1.1.

File renamed without changes.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

executables = [
Executable('openadms.py', base=base),
Executable('openadmsw.pyw', base=base)
Executable('openadms-gui.pyw', base=base)
]

setup(name='OpenADMS',
Expand Down
4 changes: 2 additions & 2 deletions win_make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
echo Creating executables with Python 3.6 ...

:: PyInstaller does not support Python 3.6 yet
:: "C:\Program Files\Python\Python36-64\Scripts\pyinstaller-script.py" --clean --noconfirm --icon="res\img\dabamos.ico" --hidden-import "openadms" --hidden-import "module.database" --hidden-import "module.export" --hidden-import "module.linux" --hidden-import "module.notification" --hidden-import "module.port" --hidden-import "module.processing" --hidden-import "module.prototype" --hidden-import "module.schedule" --hidden-import "module.server" --hidden-import "module.totalstation" --hidden-import "module.virtual" openadmsw.pyw
:: "C:\Program Files\Python\Python36-64\Scripts\pyinstaller-script.py" --clean --noconfirm --icon="res\img\dabamos.ico" --hidden-import "openadms" --hidden-import "module.database" --hidden-import "module.export" --hidden-import "module.linux" --hidden-import "module.notification" --hidden-import "module.port" --hidden-import "module.processing" --hidden-import "module.prototype" --hidden-import "module.schedule" --hidden-import "module.server" --hidden-import "module.totalstation" --hidden-import "module.virtual" openadms-gui.pyw

:: Using cx_Freeze instead ...
python setup.py build

echo Done.
pause
pause

0 comments on commit 9b6c48c

Please sign in to comment.