Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Εὐρυδίκη/Eurydike [wiki] is a simple event detection. Reacts to above-threshold, below-threshold, and outside value-band.

Part of pelops.

For Users

Installation Core-Functionality

Prerequisites for the core functionality are:

sudo apt install python3 python3-pip
sudo pip3 install paho-mqtt pyyaml pelops

Install via pip:

sudo pip3 install eurydike

To update to the latest version add --upgrade as prefix to the pip3 line above.

Install via gitlab (might need additional packages):

git clone git@gitlab.com:pelops/eurydike.git
cd eurydike
sudo python3 setup.py install

This will install the following shell scripts: * eurydike

The script cli arguments are: * ‘-c’/’–config’ - config file (mandatory) * ‘-v’ - verbose output (optional) * ‘–version’ - show the version number and exit

YAML-Config

A yaml [1] file must contain four root blocks: * mqtt - mqtt-address, mqtt-port, and path to credentials file mqtt-credentials (a file consisting of two entries: mqtt-user, mqtt-password) * logger - which log level and which file to be used * eventdetectors - parameters for the controller and the embedded pid

mqtt:
    mqtt-address: localhost
    mqtt-port: 1883
    mqtt-credentials: ~/credentials.yaml
    log-level: INFO

logger:
    log-level: DEBUG  # DEBUG, INFO, WARNING, ERROR, CRITICAL
    log-file: test_eurydike.log

eventdetectors:
    - name: above  # unqiue name for event detector
      type: onthreshold  # detector type identifier
      comparator: gt  # GREATERTHAN/GT/>, LOWERTHAN/LT/<, EQUALTO/==
      threshold: 7  # threshold in combintation with comparator and value from topic-sub
      topic-sub: /test/value
      topic-pub: /test/above
      responses:  # leave value empty or remove line for no response
#          on-violation: event_detected  # on detection of a threshold violation send this value to topic-pub
          on-restoration: event_ended  # on the event of returning to valid values send this value to topic-pub
      active: False  # entry ignored if set to False

    - name: below  # unqiue name for event detector
      type: onthreshold  # detector type identifier
      comparator: lowerthan  # GREATERTHAN/GT/>, LOWERTHAN/LT/<, EQUALTO/==
      threshold: 7  # threshold in combintation with comparator and value from topic-sub
      topic-sub: /test/value
      topic-pub: /test/below
      responses:  # leave value empty or remove line for no response
          on-violation: event_detected  # on detection of a threshold violation send this value to topic-pub
          on-restoration: event_ended  # on the event of returning to valid values send this value to topic-pub
      active: True  # entry ignored if set to False

    - name: equal  # unqiue name for event detector
      type: onthreshold  # detector type identifier
      comparator: ==  # GREATERTHAN/GT/>, LOWERTHAN/LT/<, EQUALTO/==
      threshold: 7  # threshold in combintation with comparator and value from topic-sub
      topic-sub: /test/value
      topic-pub: /test/equal
      responses:  # leave value empty or remove line for no response
          on-violation: event_detected  # on detection of a threshold violation send this value to topic-pub
          on-restoration:  # on the event of returning to valid values send this value to topic-pub
      active: False  # entry ignored if set to False

    - name: outside  # unqiue name for event detector
      type: onband  # detector type identifier
      upper-threshold: 8  # upper threshold for on band detection
      lower-threshold: 7  # lower threshold for on band detection
      topic-sub: /test/value
      topic-pub: /test/band
      responses:  # leave value empty or remove line for no response
          on-violation: event_detected  # on detection of a threshold violation send this value to topic-pub
          on-restoration: event_ended  # on the event of returning to valid values send this value to topic-pub
      active: True  # entry ignored if set to False

systemd

  • add systemd example.

For Developers

Getting Started

The project consists of two main modules:

  • eventdetectionmanager - manages all configured event detectors

  • abstracteventdetector - base class for all event detectors

Todos

  • … ?

Misc

The code is written for python3 (and tested with python 3.5 on an Raspberry Pi Zero with Raspbian Stretch).

Merge requests / bug reports are always welcome.

Metadata

Release files for Eurydike 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Eurydike 0.1.2
File Size Uploaded
Eurydike-0.1.2.tar.gz 10.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Eurydike 0.1.2
File Interpreter ABI Platform
Eurydike-0.1.2-py3.5.egg Legacy Egg format - - Details

Total release size: 44.6 kB

Release files / Eurydike-0.1.2.tar.gz

Download URL Eurydike-0.1.2.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1304849395cfa437b40a79505b0b5d7e4ac893f698b4105e5395ea18861b4ab5
BLAKE2b-256 checksum
How to use checksums
6e8415c8fbad7530b15ba8ea6bc0aa1abff825870db415d0b2486f4a2594c916
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Eurydike-0.1.2-py3.5.egg

Download URL Eurydike-0.1.2-py3.5.egg
Size 34.6 kB
Tags Egg
SHA-256 checksum
How to use checksums
6e830e81bd8b01f47da3073abecd9999f90e6fe5968abbc086e5bb67b19a9b0d
BLAKE2b-256 checksum
How to use checksums
a855990740870cc231faf550c445476f83a778eea889118b122b4ba04fa65990
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page