{
  "_id": "648069a416f95c2a5a518ffd",
  "name": "MQTTExample",
  "config": {
    "arguments": {
      "Player": {
        "collection": "players"
      }
    }
  },
  "states": {
    "_state_0": {
      "name": "START",
      "view": {
        "position": {
          "x": 40,
          "y": 40
        }
      },
      "comments": [
        "When a new session is created, the START state starts."
      ],
      "run": [
        "_action_0"
      ],
      "listen": [],
      "path": [
        "start"
      ]
    },
    "_state_1": {
      "name": "QUIT",
      "view": {
        "position": {
          "x": 1306.6666666666665,
          "y": 785.3333333333334
        }
      },
      "comments": [],
      "run": [
        "_action_1"
      ],
      "listen": [],
      "path": []
    },
    "_state_ZYuUioxr": {
      "name": "Hello",
      "view": {
        "position": {
          "x": 68,
          "y": 342.66666666666663
        }
      },
      "run": [
        "sendMQTTMessage_ipJZ5ULIbU"
      ],
      "listen": [],
      "path": []
    },
    "_state_2XNntP1j": {
      "name": "AwaitHello",
      "view": {
        "position": {
          "x": 447.66666666666663,
          "y": 166.33333333333334
        }
      },
      "run": [],
      "listen": [
        "onMQTTMessage_xdYZbiMHWX"
      ],
      "path": [
        "start"
      ]
    },
    "_state_oLRoWx5d": {
      "name": "HumidityMonitor",
      "view": {
        "position": {
          "x": 279,
          "y": 782
        }
      },
      "run": [],
      "listen": [
        "onMQTTMessage_XsD7Omr7wc"
      ],
      "path": []
    },
    "_state_FeVxyjrE": {
      "name": "GardenPHMonitor",
      "view": {
        "position": {
          "x": 418,
          "y": 1021
        }
      },
      "run": [],
      "listen": [
        "onMQTTMessage_LGC5iPuXqj"
      ],
      "path": []
    },
    "_state__raw_6I2": {
      "name": "IncomingHelloMessage",
      "view": {
        "position": {
          "x": 816,
          "y": 245.33333333333331
        }
      },
      "run": [
        "log_cq7HIEGP8_"
      ],
      "listen": [],
      "path": [
        "start"
      ]
    }
  },
  "actions": {
    "_action_0": {
      "action": "next",
      "name": "next_1",
      "plugin": "control",
      "payload": {
        "next": "AwaitHello"
      },
      "mode": "run"
    },
    "_action_1": {
      "action": "quit",
      "name": "quit_1",
      "plugin": "control",
      "payload": null,
      "mode": "run"
    },
    "sendMQTTMessage_ipJZ5ULIbU": {
      "action": "sendMQTTMessage",
      "plugin": "mqtt",
      "mode": "run",
      "name": "sendMQTTMessage_1",
      "payload": {
        "topic": "echo/chamber",
        "message": "Hello adaptor"
      }
    },
    "onMQTTMessage_xdYZbiMHWX": {
      "action": "onMQTTMessage",
      "plugin": "mqtt",
      "mode": "listen",
      "name": "onMQTTMessage_1",
      "payload": {
        "topic": "echo/chamber",
        "if": [
          {
            "equals": [
              "Hello adaptor"
            ],
            "next": "IncomingHelloMessage"
          }
        ]
      }
    },
    "onMQTTMessage_XsD7Omr7wc": {
      "action": "onMQTTMessage",
      "plugin": "mqtt",
      "mode": "listen",
      "name": "onMQTTMessage_1",
      "payload": {
        "topic": "balkony/basil",
        "if": [
          {
            "field": "sensor.humidity",
            "lessThan": [
              "100"
            ],
            "next": "BasilNeedsWater"
          }
        ]
      }
    },
    "onMQTTMessage_LGC5iPuXqj": {
      "action": "onMQTTMessage",
      "plugin": "mqtt",
      "mode": "listen",
      "name": "onMQTTMessage_1",
      "payload": {
        "topic": "garden/#",
        "if": [
          {
            "topic_contains": "ph-value$",
            "greaterThan": [
              "7"
            ],
            "next": "AlcalineSoil"
          },
          {
            "topic_contains": "ph-value$",
            "lessThan": [
              "7"
            ],
            "next": "AcidSoil"
          }
        ]
      }
    },
    "log_cq7HIEGP8_": {
      "action": "log",
      "plugin": "control",
      "mode": "run",
      "name": "log_1",
      "payload": {
        "level": "info",
        "message": "Incoming MQTT Message: [[state.AwaitHello.onMQTTMessage_1.message]] on Topic [[state.AwaitHello.onMQTTMessage_1.topic]]"
      }
    }
  },
  "contents": {},
  "created_at": "2023-06-07T11:27:32.525Z",
  "modified_at": "2023-06-13T09:09:38.461Z",
  "created_by": "lasse",
  "modified_by": "lasse",
  "inserted": {
    "states": {},
    "actions": {},
    "contents": {}
  },
  "paths": [
    [
      "start"
    ]
  ],
  "removed": {
    "states": [],
    "actions": [],
    "contents": []
  },
  "updated": {
    "states": {
      "_state_oLRoWx5d": {
        "name": "HumidityMonitor"
      }
    },
    "actions": {},
    "contents": {}
  }
}