Skip to content

Latest commit

 

History

History
 
 

kafka2mqtt4yolo

kafka2mqtt4yolo - addon for Home Assistant

This Home Assistant add-on is for use with the Open Horizon pattern-service: yolo2msghub

About

This addon is designed to consume Kafka messages on the topic yolo2msghub and produce MQTT messages for consumption by the MQTT broker addon using the specified topic (see Options below).

Detailed documentation for the IBM Edge Fabric is available on-line. A Slack channel is also available.

Installation

Install addon

  1. Add this repository to your Hass.io addon store.
  2. Install the "yolo2msghub" add-on
  3. Setup the "yolo2msghub" add-on
  • Configure kafka with your Kafka API key
  • Optionally change mqtt for host, port, topic, username, and password
  1. Start the "yolo2msghub" add-on
  2. Check the logs of the add-on for failures :-(

Configuration

Option: kafka

Credentials required for sending and receiving messages using the IBM Cloud MessageHub.

  "kafka": {
    "api_key": "<Your IBM Edge Fabric MessageHub API key>",
    "brokers": "kafka03-prod02.messagehub.services.us-south.bluemix.net:9093,kafka04-prod02.messagehub.services.us-south.bluemix.net:9093,kafka01-prod02.messagehub.services.us-south.bluemix.net:9093,kafka02-prod02.messagehub.services.us-south.bluemix.net:9093,kafka05-prod02.messagehub.services.us-south.bluemix.net:9093"
  }

Option: mqtt

This option provides the information required for MQTT service; defaults are as specified below.

  "mqtt": {
    "host": "core-mosquitto",
    "port": 1883,
    "topic": "kafka/cpu-load"
    "username": "",
    "password": ""
  }

USE

Listen to the MQTT host and port to receive JSON payload of the processed YOLO image.

  1. kafka/yolo-image

Configuration examples are provided for processing the JSON:

  1. Edit your HomeAssistant configuration YAML to include yolo2msghub
  2. Edit your ui-lovelace.yaml configuration for display

Sample output

sample activity

Changelog & Releases

Releases are based on Semantic Versioning, and use the format of MAJOR.MINOR.PATCH. In a nutshell, the version will be incremented based on the following:

  • MAJOR: Incompatible or major changes.
  • MINOR: Backwards-compatible new features and enhancements.
  • PATCH: Backwards-compatible bugfixes and package updates.

Authors & contributors

David C Martin ([email protected])