Skip to main content

Hippasos plays preconfigured sound files upon reception of predefined mqtt messages.

Project description

Πηααος [1] (Hippasos) plays preconfigured sound files upon reception of predefined mqtt messages.

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 pygame pelops

Install via pip:

sudo pip3 install epidaurus

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/hippasos.git
cd hippasos
sudo python3 setup.py install

This will install the following shell scripts: * hippasoss

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 [2] 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
* sound-mappings - list of sound events
mqtt:
    mqtt-address: localhost
    mqtt-port: 1883
    mqtt-credentials: ~/credentials.yaml
    log-level: WARNING

logger:
    log-level: DEBUG
    log-file: hippasos.log

sound-mappings:
    - name: bell_building  # unique name for sound event
      sound-file: ../resources/church_bell.ogg  # uri to sound file. must be ogg or wav.
      topic-sub: /test/button1  # react to published values on this channel
      message-value: PRESSED  # react to this message content
      volume: 0.1  # 0..1 - volume relative to system volume
      active: True  # entry ignored if set to False

systemd

  • add systemd example.

For Developers

Getting Started

The project consists of two main modules: * soundservice - Creates, starts and stops sound events. * soundevent - Subscribes to a topic and plays a sound file upon reception of a specific message.

Todos

  • Make maximum number of parallel playable sound configurable.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Hippasos-0.1.tar.gz (5.0 kB view details)

Uploaded Source

File details

Details for the file Hippasos-0.1.tar.gz.

File metadata

  • Download URL: Hippasos-0.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Hippasos-0.1.tar.gz
Algorithm Hash digest
SHA256 46a028247745c30fc0c16c33babc591472a5f49931680a8289324be0a463cf25
MD5 1d184649bb57abee4989a1cb2abc38a8
BLAKE2b-256 c27dd203fbfef7749260651c2a6e89d1b5b2c931c6f2be38706db4631994320c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page