MudPi has a central event system that it uses to communicate new data and toggle components. The event system is built on adatpers in order to broadcast events over different protocols. Your device running MudPi can run these systems or connect to them remotely
There are two adapters currently provided: redis
and mqtt
.
There are two options required in the redis settings: host
and port
.
"mudpi": {
"events": {
"redis": {
"host": "127.0.0.1",
"port": 6379
}}
}
Option | Type | Required | Description |
host | [String] | Yes | IP address of redis server. Usually 127.0.0.1 |
port | [Integer] | No | Port of redis server. Default 6379 |
There are a few options available in the mqtt configs: host
, port
, username
, and password
.
"mudpi": {
"events": {
"mqtt": {
"host": "localhost",
"username": "admin",
"password": "admin"
}}
}
Option | Type | Required | Description |
host | [String] | Yes | IP address of mqtt server. Default localhost |
port | [Integer] | No | Port of MQTT server. Default 1883 |
username | [String] | No | Username if logon required for MQTT server. |
password | [String] | No | Password if logon required for MQTT server. |