{
  "name": "Remote IOT sensor monitoring via MQTT and InfluxDB",
  "nodes": [
    {
      "id": "4997f226-f236-4d27-bea4-904744d9ff07",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -700,
        -360
      ],
      "parameters": {
        "width": 340,
        "height": 120,
        "content": "MQTT trigger subscribed to a topic called wokwi-weather via a Mosquitto MQTT broker. The trigger receives the temperature and humidity payloads from a DHT22 sensor connected to a remote ESP32 microcon"
      }
    },
    {
      "id": "9d4f1da6-fda3-4312-a6b1-bd0ac499dde7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -360
      ],
      "parameters": {
        "width": null,
        "height": 100,
        "content": "Javascript code to extract the temperature and humidity values to ensure correct JSON format for the database"
      }
    },
    {
      "id": "d8f01dba-5019-457e-8c1a-99c802282fdf",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        140,
        -360
      ],
      "parameters": {
        "width": 260,
        "height": 120,
        "content": "HTTP request node posts temperature and humidity data from the DHT22 sensor to the InfluxDB data bucket running on a local host http://localhost:8086"
      }
    },
    {
      "id": "020858a6-7771-4322-8eb6-b83e99b3563d",
      "name": "Remote Sensor MQTT Trigger",
      "type": "n8n-nodes-base.mqttTrigger",
      "position": [
        -580,
        -220
      ]
    },
    {
      "id": "51e6f59f-9b93-4121-8db4-7f47b929fdf5",
      "name": "Data ingest to InfluxDB bucket",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        200,
        -220
      ]
    },
    {
      "id": "6abe1212-b128-492f-b485-401a4315fcbc",
      "name": "Payload data preparation node",
      "type": "n8n-nodes-base.code",
      "position": [
        -180,
        -220
      ]
    }
  ],
  "connections": {
    "Remote Sensor MQTT Trigger": {
      "main": [
        [
          {
            "node": "Payload data preparation node",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Payload data preparation node": {
      "main": [
        [
          {
            "node": "Data ingest to InfluxDB bucket",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}