Fork me on GitHub

pimatic-mqtt-simple by Andre Miller (andremiller) | github | npm

pimatic-mqtt-simple

A very basic mqtt plugin for Pimatic

Installation

Edit your config.json as below, and once you restart pimatic the plugin will be downloaded automatically from npm.

Usage

In your plugins section of pimatic's config.json file add:

{
  "plugin": "mqtt-simple"
}

In the devices section:

{
  "class": "MqttSimpleSensor",
  "id": "powerusage",
  "name": "Power Usage",
  "mqtturl": "mqtt://localhost",
  "attributes": [
    {
      "name": "PowerUsage",
      "topic": "power/usage",
      "type": "number",
      "unit": "W",
      "acronym": "P.Usage"
    }
  ]
}

Plugin Config Options

Simple MQTT plugin config options

Device Config Options

MqttSimpleSensor device config schema

MqttSimpleSensor

MqttSimpleSensor config options
OptionDescriptionDefault
mqtturl
string
MQTT Server URL, for example mqtt://localhost
attributes
array
Attributes of device
pimatic-mqtt-simple is written by Andre Miller (andremiller)