Documentation

Event Configuration

Configure the event system adapters that MudPi uses to communicate data and toggle components.

Overview

MudPi has a central event system used to communicate new data and toggle components. The event system is built on adapters that broadcast events over different protocols. Your device can run these systems locally or connect to them remotely.

There are two adapters currently provided: redis and mqtt.

Redis Adapter

The Redis adapter requires host and port settings:

JSON
{
  "mudpi": {
    "events": {
      "redis": {
        "host": "127.0.0.1",
        "port": 6379
      }
    }
  }
}

Redis Settings

Option Type Required Description
`host` String Yes IP address of the Redis server. Usually `127.0.0.1`.
`port` Integer No Port of the Redis server. Default: `6379`.

MQTT Adapter

The MQTT adapter supports host, port, username, and password:

JSON
{
  "mudpi": {
    "events": {
      "mqtt": {
        "host": "localhost",
        "username": "admin",
        "password": "admin"
      }
    }
  }
}

MQTT Settings

Option Type Required Description
`host` String Yes IP address of the MQTT server. Default: `localhost`.
`port` Integer No Port of the MQTT server. Default: `1883`.
`username` String No Username if logon is required for the MQTT server.
`password` String No Password if logon is required for the MQTT server.