wutu / pimatic-mqtt

MQTT plugin for Pimatic
https://pimatic.org/plugins/pimatic-mqtt/
GNU Affero General Public License v3.0
9 stars 13 forks source link

Added predicates #44

Closed crycode-de closed 4 years ago

crycode-de commented 5 years ago

This PR adds predicates to trigger rules by a received mqtt message.

Example: mqtt received "<message>" on topic "<topic>" [via broker ListOfBrokers] [qos: 0|1|2]

    "rules": [
      {
        "id": "my-rule-2",
        "name": "Receive mqtt",
        "rule": "when mqtt received \"1\" on topic \"topic\" via broker default qos: 0 then log \"Yeah!\"",
        "active": true,
        "logging": true
      }
    ]