[
    {
        "id": "8145e77bde5dc885",
        "type": "inject",
        "z": "388091ebc646cfb8",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 320,
        "y": 340,
        "wires": [
            [
                "dcbe52fbd76e9f5f"
            ]
        ]
    },
    {
        "id": "dcbe52fbd76e9f5f",
        "type": "function",
        "z": "388091ebc646cfb8",
        "name": "Create Table",
        "func": "msg.topic= \"CREATE TABLE Drives (id SERIAL PRIMARY KEY, device_id VARCHAR(50) NOT NULL, timestamp TIMESTAMP NOT NULL, velocity FLOAT, position FLOAT, torque FLOAT, status VARCHAR(20));\"\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 550,
        "y": 340,
        "wires": [
            [
                "28096233281177f6"
            ]
        ]
    },
    {
        "id": "4b3f6e61046e4855",
        "type": "debug",
        "z": "388091ebc646cfb8",
        "name": "debug 1",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1000,
        "y": 340,
        "wires": []
    },
    {
        "id": "79c6b7e2bc7f8615",
        "type": "inject",
        "z": "388091ebc646cfb8",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 320,
        "y": 420,
        "wires": [
            [
                "c66308eb7e9ce199"
            ]
        ]
    },
    {
        "id": "c66308eb7e9ce199",
        "type": "function",
        "z": "388091ebc646cfb8",
        "name": "Insert",
        "func": "msg.topic= \"INSERT INTO Drives (device_id, timestamp, velocity, position, torque, status) VALUES ('HCS01', NOW(), RAND() * 1000, RAND() * 10000, RAND() * 20, 'OK');\"\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 530,
        "y": 420,
        "wires": [
            [
                "af57c0ebf9ed4c95"
            ]
        ]
    },
    {
        "id": "c56fdf4a051d0e6b",
        "type": "debug",
        "z": "388091ebc646cfb8",
        "name": "debug 2",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1000,
        "y": 420,
        "wires": []
    },
    {
        "id": "355a79275d6a9b1a",
        "type": "inject",
        "z": "388091ebc646cfb8",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 320,
        "y": 520,
        "wires": [
            [
                "1e3b6127a1a36218"
            ]
        ]
    },
    {
        "id": "1e3b6127a1a36218",
        "type": "function",
        "z": "388091ebc646cfb8",
        "name": "SelectAll",
        "func": "msg.topic= \"SELECT *From Drives;\"\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 540,
        "y": 520,
        "wires": [
            [
                "f7ce0803f92621a7"
            ]
        ]
    },
    {
        "id": "f90c532ce825d2d5",
        "type": "debug",
        "z": "388091ebc646cfb8",
        "name": "debug 3",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1000,
        "y": 520,
        "wires": []
    },
    {
        "id": "28096233281177f6",
        "type": "mysql",
        "z": "388091ebc646cfb8",
        "mydb": "03a85ce256ca9d57",
        "name": "",
        "x": 780,
        "y": 340,
        "wires": [
            [
                "4b3f6e61046e4855"
            ]
        ]
    },
    {
        "id": "af57c0ebf9ed4c95",
        "type": "mysql",
        "z": "388091ebc646cfb8",
        "mydb": "03a85ce256ca9d57",
        "name": "",
        "x": 780,
        "y": 420,
        "wires": [
            [
                "c56fdf4a051d0e6b"
            ]
        ]
    },
    {
        "id": "f7ce0803f92621a7",
        "type": "mysql",
        "z": "388091ebc646cfb8",
        "mydb": "03a85ce256ca9d57",
        "name": "",
        "x": 780,
        "y": 520,
        "wires": [
            [
                "f90c532ce825d2d5"
            ]
        ]
    },
    {
        "id": "03a85ce256ca9d57",
        "type": "MySQLdatabase",
        "name": "MySQL Server",
        "host": "10.195.70.29",
        "port": "3306",
        "db": "db1",
        "tz": "",
        "charset": "UTF8"
    }
]