oremi-ohunerin-mqtt


Nameoremi-ohunerin-mqtt JSON
Version 1.0.4 PyPI version JSON
download
home_pagehttps://gitlab.com/demsking/oremi-ohunerin-mqtt
SummaryOremi Ohunerin MQTT bridges Oremi Ohunerin's real-time audio detection with MQTT, enabling seamless integration into home automation systems like Home Assistant
upload_time2025-01-20 06:28:41
maintainerNone
docs_urlNone
authorSébastien Demanou
requires_python<3.12,>=3.11
licenseApache-2.0
keywords sound detection wakeword mqtt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Oremi Ohunerin MQTT

[![Buy me a beer](https://img.shields.io/badge/Buy%20me-a%20beer-1f425f.svg)](https://www.buymeacoffee.com/demsking)

Oremi Ohunerin MQTT is an MQTT implementation of **[Oremi Ohunerin](https://gitlab.com/demsking/oremi-ohunerin)**,
the real-time audio detection component of the **Oremi Personal Assistant**
project. It connects to the Oremi Ohunerin WebSocket server, detects
environmental sounds and wake words, and publishes the results to an MQTT
broker.

This project is designed to integrate seamlessly with home automation systems
like **Home Assistant**, IoT platforms, or any application that uses MQTT for
communication. It is available as a Docker image for both `linux/amd64` and
`linux/arm64` architectures.

## Overview

### What is Oremi Ohunerin?

[Oremi Ohunerin](https://gitlab.com/demsking/oremi-ohunerin) is the real-time
audio detection component of the **Oremi Personal Assistant** project. It
operates as a WebSocket server and is capable of identifying environmental
sounds and specific wake words to activate Oremi. It leverages cutting-edge
technologies such as:

- **Tensorflow YAMNet**: For comprehensive audio detection.
- **PocketSphinx**: For precise wake word identification.

It can recognize various sound categories, including but not limited to:
- Shouts
- Laughter
- Crying
- Snoring
- Coughing
- And more.

### What is Oremi Ohunerin MQTT?

Oremi Ohunerin MQTT bridges the gap between Oremi Ohunerin and MQTT-based
systems. It:

1. Connects to the Oremi Ohunerin WebSocket server.
2. Listens for detected sounds and wake words.
3. Publishes the results to an MQTT topic.

This allows you to integrate Oremi Ohunerin's audio detection capabilities into
your MQTT-enabled ecosystem, such as **Home Assistant**, for advanced home
automation and monitoring.

## Features

- **Real-Time Audio Detection**: Detects environmental sounds and wake words in
  real time.
- **MQTT Integration**: Publishes detected sounds and wake words to an MQTT
  broker.
- **Home Assistant Compatibility**: Easily integrates with Home Assistant for
  automations, notifications, and dashboards.
- **Customizable Threshold**: Set a confidence score threshold for sound
  detection.
- **Cooldown Period**: Avoids publishing the same sound repeatedly within a
  specified delay.
- **Docker Support**: Available as a Docker image for easy deployment.
- **Cross-Platform**: Supports both `linux/amd64` and `linux/arm64`
  architectures.

## Quick Start

### Prerequisites

1. **Docker**: Ensure Docker is installed on your system.
2. **MQTT Broker**: An MQTT broker (e.g., Mosquitto) must be running and
   accessible.
3. **Home Assistant**: For integration and automation (optional but
   recommended).

### Docker Compose Example

Here’s a quick example of how to use Oremi Ohunerin MQTT with Docker Compose:

```yaml
services:
  detector:
    image: demsking/oremi-ohunerin

  listener:
    image: demsking/oremi-ohunerin-mqtt
    devices:
      - /dev/snd:/dev/snd # Mount the microphone device
    volumes:
      - $XDG_RUNTIME_DIR/pulse/native:/var/config/pulse/native
      - ~/.config/pulse/cookie:/var/config/pulse/cookie
    env_file:
      - .env
    command: listen --host detector --mqtt-broker mqtt.eclipseprojects.io --mqtt-port 1883
```

### Explanation

- **`detector`**: The Oremi Ohunerin WebSocket server.
- **`listener`**: The Oremi Ohunerin MQTT client.
  - Mounts the microphone device for audio input.
  - Connects to the MQTT broker at `mqtt.eclipseprojects.io:1883`.
  - Publishes detected sounds and wake words to the MQTT topic `oremi/ohunerin`.

## Command-Line Arguments

### General Usage

To see the general usage and available commands, run:

```bash
docker run -it --rm demsking/oremi-ohunerin-mqtt -h
```

Output:

```
usage: oremi-ohunerin-mqtt [-h] [-v] {listen} ...

Real-time ambient sound and wake word detection

positional arguments:
  {listen}
    listen       Start listening

options:
  -h, --help     show this help message and exit
  -v, --version  Show the version of the application.
  --list-devices List available input devices.
```

### Listen Command

To see the options for the `listen` command, run:

```bash
docker run -it --rm demsking/oremi-ohunerin-mqtt listen -h
```

Output:

```
usage: oremi-ohunerin-mqtt listen [-h] [-l LANGUAGE] [-i DEVICE_INDEX] [-d DEVICE] [-t THRESHOLD] [--delay DELAY] [--host HOST]
                                  [-p PORT] [--cert-file CERT_FILE] --mqtt-broker MQTT_BROKER [--mqtt-port MQTT_PORT]
                                  [--mqtt-username MQTT_USERNAME] [--mqtt-password MQTT_PASSWORD] [--mqtt-topic MQTT_TOPIC]

options:
  -h, --help            show this help message and exit
  -l LANGUAGE, --language LANGUAGE
                        The language to use for wake word detection and audio processing. Default is "fr" (French).
  -i DEVICE_INDEX, --device-index DEVICE_INDEX
                        Index of the audio device to be used for recording audio.
  -d DEVICE, --device DEVICE
                        Name of the device.
  -t THRESHOLD, --threshold THRESHOLD
                        The minimum confidence score required to process a sound event (default: 0.85).
  --delay DELAY         The cooldown period (in seconds) to wait before sending the same sound event again (default: 3).
  --host HOST           Host address to connect to.
  -p PORT, --port PORT  Port number to connect to (default: 5023).
  --cert-file CERT_FILE
                        Path to the certificate file for secure connection.
  --mqtt-broker MQTT_BROKER
                        The address of the MQTT broker.
  --mqtt-port MQTT_PORT
                        The port of the MQTT broker. Default is 1883.
  --mqtt-username MQTT_USERNAME
                        The username for authenticating with the MQTT broker. Default is None.
  --mqtt-password MQTT_PASSWORD
                        The password for authenticating with the MQTT broker. Default is None.
  --mqtt-topic MQTT_TOPIC
                        The MQTT topic to publish audio detection events to. Default is "oremi/ohunerin".
```

## MQTT Topics

Oremi Ohunerin MQTT publishes detected sounds and wake words to the following MQTT topics:

- **`oremi/ohunerin/sound`**: For environmental sound detection events.
- **`oremi/ohunerin/wakeword`**: For wake word detection events.
- **`oremi/ohunerin/available`**: For availability status (`online` or `offline`).

Each message is published as a JSON object with the following structure:

```json
{
  "type": "sound" | "wakeword",
  "sound": "detected_sound",
  "score": 0.85,
  "date": "2023-10-05T12:34:56Z"
}
```

## Home Assistant Integration

Oremi Ohunerin MQTT is an excellent tool for integrating real-time audio
detection into **Home Assistant**. By publishing detected sounds and wake words
to MQTT topics, you can create automations, notifications, and dashboards in
Home Assistant based on audio events.

### Example Use Case

Imagine you want to:
1. Detect when someone is snoring in a room.
2. Trigger a notification if a baby is crying.
3. Activate a wake word to start a specific automation.

With Oremi Ohunerin MQTT and Home Assistant, you can achieve this seamlessly.

### Home Assistant Configuration

Here’s an example of how to configure Home Assistant to work with Oremi Ohunerin
MQTT:

#### `configuration.yaml`

```yaml
mqtt:
  sensor:
    - name: "Wakeword"
      unique_id: "oremi_ohunerin_wakeword"
      state_topic: "oremi/ohunerin/wakeword"
      enabled_by_default: true
      icon: "mdi:waveform"
      device_class: "enum"
      options:
        - detected
        - 💤
      value_template: >-
        {% if value_json.sound == '...' %}
          💤
        {% else %}
          detected
        {% endif %}
      availability: &oremi-ohunerin-availability
        - topic: "oremi/ohunerin/available"
          payload_available: "online"
          payload_not_available: "offline"
      device: &oremi-ohunerin-device
        name: "Oremi Ohunerin"
        manufacturer: "Sébastien Demanou"
        configuration_url: "https://gitlab.com/demsking/oremi-ohunerin"
        identifiers: "oremi-ohunerin-1.0.0"
        sw_version: "1.0.0"

    - name: "Sound Detector"
      unique_id: "oremi_ohunerin_sound"
      state_topic: "oremi/ohunerin/sound"
      enabled_by_default: true
      icon: "mdi:waveform"
      device_class: "enum"
      options:
        - shout
        - bellows
        - children-shouting
        - laughter
        - baby-laughter
        - crying-sobbing
        - baby-cry-infant-cry
        - whistling
        - wheeze
        - snoring
        - cough
        - sneeze
        - burping
        - hiccup
        - 💤
      value_template: >-
        {% if value_json.sound == '...' %}
          💤
        {% else %}
          {{ value_json.sound }}
        {% endif %}
      availability: *oremi-ohunerin-availability
      device: *oremi-ohunerin-device
```

### Example Automations

#### 1. Snoring Detection

Send a notification when snoring is detected:

```yaml
automation:
  - alias: "Notify on Snoring"
    description: Sends a notification with advice when snoring is detected.
    triggers:
      - trigger: state
        entity_id:
          - sensor.oremi_ohunerin_snoring_detector
    action:
      service: notify.notify
      data:
        title: "Snoring Detected"
        message: >
          Snoring detected! Consider elevating your head while sleeping,
          avoiding alcohol before bed, or trying nasal strips to improve airflow.
          Consult a healthcare professional if snoring persists.
    mode: single
```

#### 2. Baby Cry Alert

Send an urgent notification when a baby cry is detected:

```yaml
automation:
  - alias: Notify on Baby Cry
    description: Sends an urgent notification with soothing tips when a baby cry is detected.
    triggers:
      - trigger: state
        entity_id:
          - sensor.oremi_ohunerin_baby_cry_infant_cry_detector
    actions:
      - action: notify.notify
        data:
          title: "Baby Cry Detected"
          message: >
            Baby is crying! Check immediately. Try soothing techniques like
            gentle rocking, singing, or offering a pacifier. Ensure the baby
            is fed, dry, and comfortable.
    mode: single
```

#### 3. Cough Detection

Send a notification with naturopathic advice when a cough is detected:

```yaml
automation:
  - alias: Notify on Cough
    description: Sends a notification with naturopathic advice when a cough is detected.
    triggers:
      - trigger: state
        entity_id:
          - sensor.oremi_ohunerin_cough_detector
    actions:
      - action: notify.notify
        data:
          title: "Cough Detected"
          message: >
            Cough detected! Consider drinking warm water with honey and lemon,
            or try herbal teas like thyme or ginger to soothe your throat.
            Rest and stay hydrated!
    mode: single
```

#### 4. Wake Word Activation

Trigger an automation when the wake word is detected:

```yaml
automation:
  - alias: Wake Word Detected
    description: Triggered when the wake word is detected. Activates the Oremi Assistant script.
    triggers:
      - trigger: state
        entity_id:
          - sensor.oremi_ohunerin_wake_word
        to: detected
    actions:
      - target:
          entity_id: script.start_oremi_assistant
        action: script.turn_on
        data: {}
    mode: single
```

### Benefits of This Integration

- **Real-Time Alerts**: Get instant notifications for specific sounds.
- **Automations**: Trigger actions based on detected sounds or wake words.
- **Dashboards**: Display sound detection states on your Home Assistant
  dashboard.
- **Customizable**: Easily adapt to your specific needs by modifying the
  configuration.

This integration makes Oremi Ohunerin MQTT a powerful tool for enhancing your
smart home with advanced audio detection capabilities.

## Contribute

Please follow [CONTRIBUTING.md](https://gitlab.com/demsking/oremi-ohunerin-mqtt/blob/main/CONTRIBUTING.md).

## Versioning

Given a version number `MAJOR.MINOR.PATCH`, increment the:

- `MAJOR` version when you make incompatible API changes,
- `MINOR` version when you add functionality in a backwards-compatible manner,
  and
- `PATCH` version when you make backwards-compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions
to the `MAJOR.MINOR.PATCH` format.

See [SemVer.org](https://semver.org/) for more details.

## License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License.
You may obtain a copy of the License at [LICENSE](https://gitlab.com/demsking/oremi-ohunerin-mqtt/blob/main/LICENSE).


            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/demsking/oremi-ohunerin-mqtt",
    "name": "oremi-ohunerin-mqtt",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.12,>=3.11",
    "maintainer_email": null,
    "keywords": "sound, detection, wakeword, mqtt",
    "author": "S\u00e9bastien Demanou",
    "author_email": "demsking@gmail.com",
    "download_url": null,
    "platform": null,
    "description": "# Oremi Ohunerin MQTT\n\n[![Buy me a beer](https://img.shields.io/badge/Buy%20me-a%20beer-1f425f.svg)](https://www.buymeacoffee.com/demsking)\n\nOremi Ohunerin MQTT is an MQTT implementation of **[Oremi Ohunerin](https://gitlab.com/demsking/oremi-ohunerin)**,\nthe real-time audio detection component of the **Oremi Personal Assistant**\nproject. It connects to the Oremi Ohunerin WebSocket server, detects\nenvironmental sounds and wake words, and publishes the results to an MQTT\nbroker.\n\nThis project is designed to integrate seamlessly with home automation systems\nlike **Home Assistant**, IoT platforms, or any application that uses MQTT for\ncommunication. It is available as a Docker image for both `linux/amd64` and\n`linux/arm64` architectures.\n\n## Overview\n\n### What is Oremi Ohunerin?\n\n[Oremi Ohunerin](https://gitlab.com/demsking/oremi-ohunerin) is the real-time\naudio detection component of the **Oremi Personal Assistant** project. It\noperates as a WebSocket server and is capable of identifying environmental\nsounds and specific wake words to activate Oremi. It leverages cutting-edge\ntechnologies such as:\n\n- **Tensorflow YAMNet**: For comprehensive audio detection.\n- **PocketSphinx**: For precise wake word identification.\n\nIt can recognize various sound categories, including but not limited to:\n- Shouts\n- Laughter\n- Crying\n- Snoring\n- Coughing\n- And more.\n\n### What is Oremi Ohunerin MQTT?\n\nOremi Ohunerin MQTT bridges the gap between Oremi Ohunerin and MQTT-based\nsystems. It:\n\n1. Connects to the Oremi Ohunerin WebSocket server.\n2. Listens for detected sounds and wake words.\n3. Publishes the results to an MQTT topic.\n\nThis allows you to integrate Oremi Ohunerin's audio detection capabilities into\nyour MQTT-enabled ecosystem, such as **Home Assistant**, for advanced home\nautomation and monitoring.\n\n## Features\n\n- **Real-Time Audio Detection**: Detects environmental sounds and wake words in\n  real time.\n- **MQTT Integration**: Publishes detected sounds and wake words to an MQTT\n  broker.\n- **Home Assistant Compatibility**: Easily integrates with Home Assistant for\n  automations, notifications, and dashboards.\n- **Customizable Threshold**: Set a confidence score threshold for sound\n  detection.\n- **Cooldown Period**: Avoids publishing the same sound repeatedly within a\n  specified delay.\n- **Docker Support**: Available as a Docker image for easy deployment.\n- **Cross-Platform**: Supports both `linux/amd64` and `linux/arm64`\n  architectures.\n\n## Quick Start\n\n### Prerequisites\n\n1. **Docker**: Ensure Docker is installed on your system.\n2. **MQTT Broker**: An MQTT broker (e.g., Mosquitto) must be running and\n   accessible.\n3. **Home Assistant**: For integration and automation (optional but\n   recommended).\n\n### Docker Compose Example\n\nHere\u2019s a quick example of how to use Oremi Ohunerin MQTT with Docker Compose:\n\n```yaml\nservices:\n  detector:\n    image: demsking/oremi-ohunerin\n\n  listener:\n    image: demsking/oremi-ohunerin-mqtt\n    devices:\n      - /dev/snd:/dev/snd # Mount the microphone device\n    volumes:\n      - $XDG_RUNTIME_DIR/pulse/native:/var/config/pulse/native\n      - ~/.config/pulse/cookie:/var/config/pulse/cookie\n    env_file:\n      - .env\n    command: listen --host detector --mqtt-broker mqtt.eclipseprojects.io --mqtt-port 1883\n```\n\n### Explanation\n\n- **`detector`**: The Oremi Ohunerin WebSocket server.\n- **`listener`**: The Oremi Ohunerin MQTT client.\n  - Mounts the microphone device for audio input.\n  - Connects to the MQTT broker at `mqtt.eclipseprojects.io:1883`.\n  - Publishes detected sounds and wake words to the MQTT topic `oremi/ohunerin`.\n\n## Command-Line Arguments\n\n### General Usage\n\nTo see the general usage and available commands, run:\n\n```bash\ndocker run -it --rm demsking/oremi-ohunerin-mqtt -h\n```\n\nOutput:\n\n```\nusage: oremi-ohunerin-mqtt [-h] [-v] {listen} ...\n\nReal-time ambient sound and wake word detection\n\npositional arguments:\n  {listen}\n    listen       Start listening\n\noptions:\n  -h, --help     show this help message and exit\n  -v, --version  Show the version of the application.\n  --list-devices List available input devices.\n```\n\n### Listen Command\n\nTo see the options for the `listen` command, run:\n\n```bash\ndocker run -it --rm demsking/oremi-ohunerin-mqtt listen -h\n```\n\nOutput:\n\n```\nusage: oremi-ohunerin-mqtt listen [-h] [-l LANGUAGE] [-i DEVICE_INDEX] [-d DEVICE] [-t THRESHOLD] [--delay DELAY] [--host HOST]\n                                  [-p PORT] [--cert-file CERT_FILE] --mqtt-broker MQTT_BROKER [--mqtt-port MQTT_PORT]\n                                  [--mqtt-username MQTT_USERNAME] [--mqtt-password MQTT_PASSWORD] [--mqtt-topic MQTT_TOPIC]\n\noptions:\n  -h, --help            show this help message and exit\n  -l LANGUAGE, --language LANGUAGE\n                        The language to use for wake word detection and audio processing. Default is \"fr\" (French).\n  -i DEVICE_INDEX, --device-index DEVICE_INDEX\n                        Index of the audio device to be used for recording audio.\n  -d DEVICE, --device DEVICE\n                        Name of the device.\n  -t THRESHOLD, --threshold THRESHOLD\n                        The minimum confidence score required to process a sound event (default: 0.85).\n  --delay DELAY         The cooldown period (in seconds) to wait before sending the same sound event again (default: 3).\n  --host HOST           Host address to connect to.\n  -p PORT, --port PORT  Port number to connect to (default: 5023).\n  --cert-file CERT_FILE\n                        Path to the certificate file for secure connection.\n  --mqtt-broker MQTT_BROKER\n                        The address of the MQTT broker.\n  --mqtt-port MQTT_PORT\n                        The port of the MQTT broker. Default is 1883.\n  --mqtt-username MQTT_USERNAME\n                        The username for authenticating with the MQTT broker. Default is None.\n  --mqtt-password MQTT_PASSWORD\n                        The password for authenticating with the MQTT broker. Default is None.\n  --mqtt-topic MQTT_TOPIC\n                        The MQTT topic to publish audio detection events to. Default is \"oremi/ohunerin\".\n```\n\n## MQTT Topics\n\nOremi Ohunerin MQTT publishes detected sounds and wake words to the following MQTT topics:\n\n- **`oremi/ohunerin/sound`**: For environmental sound detection events.\n- **`oremi/ohunerin/wakeword`**: For wake word detection events.\n- **`oremi/ohunerin/available`**: For availability status (`online` or `offline`).\n\nEach message is published as a JSON object with the following structure:\n\n```json\n{\n  \"type\": \"sound\" | \"wakeword\",\n  \"sound\": \"detected_sound\",\n  \"score\": 0.85,\n  \"date\": \"2023-10-05T12:34:56Z\"\n}\n```\n\n## Home Assistant Integration\n\nOremi Ohunerin MQTT is an excellent tool for integrating real-time audio\ndetection into **Home Assistant**. By publishing detected sounds and wake words\nto MQTT topics, you can create automations, notifications, and dashboards in\nHome Assistant based on audio events.\n\n### Example Use Case\n\nImagine you want to:\n1. Detect when someone is snoring in a room.\n2. Trigger a notification if a baby is crying.\n3. Activate a wake word to start a specific automation.\n\nWith Oremi Ohunerin MQTT and Home Assistant, you can achieve this seamlessly.\n\n### Home Assistant Configuration\n\nHere\u2019s an example of how to configure Home Assistant to work with Oremi Ohunerin\nMQTT:\n\n#### `configuration.yaml`\n\n```yaml\nmqtt:\n  sensor:\n    - name: \"Wakeword\"\n      unique_id: \"oremi_ohunerin_wakeword\"\n      state_topic: \"oremi/ohunerin/wakeword\"\n      enabled_by_default: true\n      icon: \"mdi:waveform\"\n      device_class: \"enum\"\n      options:\n        - detected\n        - \ud83d\udca4\n      value_template: >-\n        {% if value_json.sound == '...' %}\n          \ud83d\udca4\n        {% else %}\n          detected\n        {% endif %}\n      availability: &oremi-ohunerin-availability\n        - topic: \"oremi/ohunerin/available\"\n          payload_available: \"online\"\n          payload_not_available: \"offline\"\n      device: &oremi-ohunerin-device\n        name: \"Oremi Ohunerin\"\n        manufacturer: \"S\u00e9bastien Demanou\"\n        configuration_url: \"https://gitlab.com/demsking/oremi-ohunerin\"\n        identifiers: \"oremi-ohunerin-1.0.0\"\n        sw_version: \"1.0.0\"\n\n    - name: \"Sound Detector\"\n      unique_id: \"oremi_ohunerin_sound\"\n      state_topic: \"oremi/ohunerin/sound\"\n      enabled_by_default: true\n      icon: \"mdi:waveform\"\n      device_class: \"enum\"\n      options:\n        - shout\n        - bellows\n        - children-shouting\n        - laughter\n        - baby-laughter\n        - crying-sobbing\n        - baby-cry-infant-cry\n        - whistling\n        - wheeze\n        - snoring\n        - cough\n        - sneeze\n        - burping\n        - hiccup\n        - \ud83d\udca4\n      value_template: >-\n        {% if value_json.sound == '...' %}\n          \ud83d\udca4\n        {% else %}\n          {{ value_json.sound }}\n        {% endif %}\n      availability: *oremi-ohunerin-availability\n      device: *oremi-ohunerin-device\n```\n\n### Example Automations\n\n#### 1. Snoring Detection\n\nSend a notification when snoring is detected:\n\n```yaml\nautomation:\n  - alias: \"Notify on Snoring\"\n    description: Sends a notification with advice when snoring is detected.\n    triggers:\n      - trigger: state\n        entity_id:\n          - sensor.oremi_ohunerin_snoring_detector\n    action:\n      service: notify.notify\n      data:\n        title: \"Snoring Detected\"\n        message: >\n          Snoring detected! Consider elevating your head while sleeping,\n          avoiding alcohol before bed, or trying nasal strips to improve airflow.\n          Consult a healthcare professional if snoring persists.\n    mode: single\n```\n\n#### 2. Baby Cry Alert\n\nSend an urgent notification when a baby cry is detected:\n\n```yaml\nautomation:\n  - alias: Notify on Baby Cry\n    description: Sends an urgent notification with soothing tips when a baby cry is detected.\n    triggers:\n      - trigger: state\n        entity_id:\n          - sensor.oremi_ohunerin_baby_cry_infant_cry_detector\n    actions:\n      - action: notify.notify\n        data:\n          title: \"Baby Cry Detected\"\n          message: >\n            Baby is crying! Check immediately. Try soothing techniques like\n            gentle rocking, singing, or offering a pacifier. Ensure the baby\n            is fed, dry, and comfortable.\n    mode: single\n```\n\n#### 3. Cough Detection\n\nSend a notification with naturopathic advice when a cough is detected:\n\n```yaml\nautomation:\n  - alias: Notify on Cough\n    description: Sends a notification with naturopathic advice when a cough is detected.\n    triggers:\n      - trigger: state\n        entity_id:\n          - sensor.oremi_ohunerin_cough_detector\n    actions:\n      - action: notify.notify\n        data:\n          title: \"Cough Detected\"\n          message: >\n            Cough detected! Consider drinking warm water with honey and lemon,\n            or try herbal teas like thyme or ginger to soothe your throat.\n            Rest and stay hydrated!\n    mode: single\n```\n\n#### 4. Wake Word Activation\n\nTrigger an automation when the wake word is detected:\n\n```yaml\nautomation:\n  - alias: Wake Word Detected\n    description: Triggered when the wake word is detected. Activates the Oremi Assistant script.\n    triggers:\n      - trigger: state\n        entity_id:\n          - sensor.oremi_ohunerin_wake_word\n        to: detected\n    actions:\n      - target:\n          entity_id: script.start_oremi_assistant\n        action: script.turn_on\n        data: {}\n    mode: single\n```\n\n### Benefits of This Integration\n\n- **Real-Time Alerts**: Get instant notifications for specific sounds.\n- **Automations**: Trigger actions based on detected sounds or wake words.\n- **Dashboards**: Display sound detection states on your Home Assistant\n  dashboard.\n- **Customizable**: Easily adapt to your specific needs by modifying the\n  configuration.\n\nThis integration makes Oremi Ohunerin MQTT a powerful tool for enhancing your\nsmart home with advanced audio detection capabilities.\n\n## Contribute\n\nPlease follow [CONTRIBUTING.md](https://gitlab.com/demsking/oremi-ohunerin-mqtt/blob/main/CONTRIBUTING.md).\n\n## Versioning\n\nGiven a version number `MAJOR.MINOR.PATCH`, increment the:\n\n- `MAJOR` version when you make incompatible API changes,\n- `MINOR` version when you add functionality in a backwards-compatible manner,\n  and\n- `PATCH` version when you make backwards-compatible bug fixes.\n\nAdditional labels for pre-release and build metadata are available as extensions\nto the `MAJOR.MINOR.PATCH` format.\n\nSee [SemVer.org](https://semver.org/) for more details.\n\n## License\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License.\nYou may obtain a copy of the License at [LICENSE](https://gitlab.com/demsking/oremi-ohunerin-mqtt/blob/main/LICENSE).\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Oremi Ohunerin MQTT bridges Oremi Ohunerin's real-time audio detection with MQTT, enabling seamless integration into home automation systems like Home Assistant",
    "version": "1.0.4",
    "project_urls": {
        "Documentation": "https://gitlab.com/demsking/oremi-ohunerin-mqtt/-/blob/main/README.md",
        "Homepage": "https://gitlab.com/demsking/oremi-ohunerin-mqtt",
        "Repository": "https://gitlab.com/demsking/oremi-ohunerin-mqtt",
        "Say Thanks!": "https://www.buymeacoffee.com/demsking",
        "Source": "https://gitlab.com/demsking/oremi-ohunerin-mqtt",
        "Tracker": "https://gitlab.com/demsking/oremi-ohunerin-mqtt/-/issues"
    },
    "split_keywords": [
        "sound",
        " detection",
        " wakeword",
        " mqtt"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ac9bb642cf4c49e0cdecdd7f1a7e40b3c731a4a39f5912d0251f2d06e8393d0e",
                "md5": "f709f543e6a78959ddce0044f8b0f6ff",
                "sha256": "817a54917f95f838981bc7ff78fe5347b2b563b877a03ad15a1e3d0d775223aa"
            },
            "downloads": -1,
            "filename": "oremi_ohunerin_mqtt-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f709f543e6a78959ddce0044f8b0f6ff",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.12,>=3.11",
            "size": 22754,
            "upload_time": "2025-01-20T06:28:41",
            "upload_time_iso_8601": "2025-01-20T06:28:41.909245Z",
            "url": "https://files.pythonhosted.org/packages/ac/9b/b642cf4c49e0cdecdd7f1a7e40b3c731a4a39f5912d0251f2d06e8393d0e/oremi_ohunerin_mqtt-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-20 06:28:41",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "demsking",
    "gitlab_project": "oremi-ohunerin-mqtt",
    "lcname": "oremi-ohunerin-mqtt"
}
        
Elapsed time: 4.18690s