Node-Red with MQTTsaving data to Postgres

Hello, I have to create a flow with node-red that through communication with Mqtt then saves me the data of temp and hum on the db of postgres
But I don’t know if I’m doing things right

[
    {
        "id": "0e83a1d2493ecf2e",
        "type": "tab",
        "label": "Flow 6",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "99d5fc2abc7ad1b7",
        "type": "mqtt in",
        "z": "0e83a1d2493ecf2e",
        "name": "",
        "topic": "temp/sensor",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "78975b76.6ffa84",
        "nl": false,
        "rap": false,
        "inputs": 0,
        "x": 150,
        "y": 280,
        "wires": [
            [
                "a759dac4aa151764",
                "32a6f7bf6f34c9d0",
                "f1eefa9952686fa5",
                "dff47294007fdedd"
            ]
        ]
    },
    {
        "id": "a759dac4aa151764",
        "type": "debug",
        "z": "0e83a1d2493ecf2e",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "complete": "payload",
        "statusVal": "",
        "statusType": "auto",
        "x": 390,
        "y": 220,
        "wires": []
    },
    {
        "id": "32a6f7bf6f34c9d0",
        "type": "ui_gauge",
        "z": "0e83a1d2493ecf2e",
        "name": "",
        "group": "4e2af753.086688",
        "order": 2,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "Temperature",
        "label": "°C",
        "format": "{{value}}",
        "min": "0",
        "max": "100",
        "colors": [
            "#00b500",
            "#e6e600",
            "#ca3838"
        ],
        "seg1": "",
        "seg2": "",
        "className": "",
        "x": 390,
        "y": 260,
        "wires": []
    },
    {
        "id": "f1eefa9952686fa5",
        "type": "debug",
        "z": "0e83a1d2493ecf2e",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "complete": "payload",
        "statusVal": "",
        "statusType": "auto",
        "x": 390,
        "y": 320,
        "wires": []
    },
    {
        "id": "dff47294007fdedd",
        "type": "ui_gauge",
        "z": "0e83a1d2493ecf2e",
        "name": "",
        "group": "4e2af753.086688",
        "order": 2,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "humidity",
        "label": "C",
        "format": "{{value}}",
        "min": "0",
        "max": "100",
        "colors": [
            "#00b500",
            "#e6e600",
            "#ca3838"
        ],
        "seg1": "",
        "seg2": "",
        "className": "",
        "x": 380,
        "y": 360,
        "wires": []
    },
    {
        "id": "cc549fdc3bfd4e7e",
        "type": "comment",
        "z": "0e83a1d2493ecf2e",
        "name": "ESP8266 MQTT Temperature&Humidity ",
        "info": "",
        "x": 230,
        "y": 120,
        "wires": []
    },
    {
        "id": "78975b76.6ffa84",
        "type": "mqtt-broker",
        "name": "",
        "broker": "localhost",
        "port": "1883",
        "clientid": "TEST",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    },
    {
        "id": "4e2af753.086688",
        "type": "ui_group",
        "name": "ESP8266 MQTT",
        "tab": "e0a394f8.695aa8",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "e0a394f8.695aa8",
        "type": "ui_tab",
        "name": "ESP8266",
        "icon": "dashboard",
        "order": 2
    }
]

What part is not working for you?

Is the data from MQTT showing correctly in a debug node?
Show us what you see in the debug node. You can paste a screenshot here directly.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.