Home metrics
Home metrics
Home metrics from IoT sensors, stored in influxDB using Node-RED
Node-Red flow
[
{
"id": "d763cdc1.4ee26",
"type": "tab",
"label": "Sensors",
"disabled": false,
"info": ""
},
{
"id": "deb53247.63756",
"type": "mqtt in",
"z": "d763cdc1.4ee26",
"name": "",
"topic": "indoorWeatherStation/temperature",
"qos": "1",
"broker": "44f2079.480e2f8",
"x": 260,
"y": 140,
"wires": [
[
"ee497f11.f718",
"c3393cb4.62841",
"d93c4240.2e5a3",
"fe76258f.0b7108"
]
]
},
{
"id": "3622902c.b82ce",
"type": "mqtt in",
"z": "d763cdc1.4ee26",
"name": "",
"topic": "indoorWeatherStation/humidity",
"qos": "1",
"datatype": "auto",
"broker": "44f2079.480e2f8",
"x": 250,
"y": 320,
"wires": [
[
"9851d759.7d25a8",
"496fdfaa.e5283",
"2dfe8383.c9c93c"
]
]
},
{
"id": "b55e50b5.ca679",
"type": "mqtt in",
"z": "d763cdc1.4ee26",
"name": "",
"topic": "indoorWeatherStation/pressure",
"qos": "1",
"datatype": "auto",
"broker": "44f2079.480e2f8",
"x": 250,
"y": 440,
"wires": [
[
"c7bd98c5.2aa738",
"5dd5e12f.77f8f"
]
]
},
{
"id": "9851d759.7d25a8",
"type": "ui_gauge",
"z": "d763cdc1.4ee26",
"name": "Humidity gauge",
"group": "e805c221.be268",
"order": 3,
"width": "3",
"height": "3",
"gtype": "wave",
"title": "Humidity",
"label": "%",
"format": "{{value|number:1}}",
"min": 0,
"max": "100",
"colors": [
"#5a5a5a",
"#34b92d",
"#0202ff"
],
"seg1": "",
"seg2": "",
"x": 900,
"y": 320,
"wires": []
},
{
"id": "ee497f11.f718",
"type": "ui_gauge",
"z": "d763cdc1.4ee26",
"name": "Temperature gauge",
"group": "e805c221.be268",
"order": 2,
"width": "3",
"height": "3",
"gtype": "gage",
"title": "Temperature",
"label": "°C",
"format": "{{value|number:1}}",
"min": "-20",
"max": "50",
"colors": [
"#0000ff",
"#00bb00",
"#ca3838"
],
"seg1": "0",
"seg2": "30",
"x": 910,
"y": 140,
"wires": []
},
{
"id": "8d568429.a0ce38",
"type": "ui_gauge",
"z": "d763cdc1.4ee26",
"name": "Pressure gauge",
"group": "e805c221.be268",
"order": 4,
"width": "3",
"height": "3",
"gtype": "gage",
"title": "Pressure",
"label": "hPa",
"format": "{{value|number:2}}",
"min": "900",
"max": "1100",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"x": 900,
"y": 440,
"wires": []
},
{
"id": "3c4542f3.211b9e",
"type": "mqtt in",
"z": "d763cdc1.4ee26",
"name": "",
"topic": "indoorWeatherStation/light",
"qos": "1",
"broker": "44f2079.480e2f8",
"x": 230,
"y": 560,
"wires": [
[
"a49b57db.c8b2e8",
"4cd973ee.27667c",
"58fcdf65.c4efe"
]
]
},
{
"id": "a49b57db.c8b2e8",
"type": "ui_gauge",
"z": "d763cdc1.4ee26",
"name": "Light gauge",
"group": "e805c221.be268",
"order": 5,
"width": "3",
"height": "3",
"gtype": "gage",
"title": "Light",
"label": "",
"format": "{{value|number:2}}",
"min": "0",
"max": "1",
"colors": [
"#000080",
"#c0c0c0",
"#ffff80"
],
"seg1": "",
"seg2": "",
"x": 890,
"y": 560,
"wires": []
},
{
"id": "d56433d1.f1006",
"type": "ui_chart",
"z": "d763cdc1.4ee26",
"name": "Light Chart",
"group": "e805c221.be268",
"order": 9,
"width": "0",
"height": "0",
"label": "Light, 24h",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "0",
"ymax": "1",
"removeOlder": "24",
"removeOlderPoints": "200",
"removeOlderUnit": "3600",
"cutout": 0,
"useOneColor": false,
"colors": [
"#3f6489",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"outputs": 2,
"x": 890,
"y": 600,
"wires": [
[],
[]
]
},
{
"id": "6749f7.bda72608",
"type": "comment",
"z": "d763cdc1.4ee26",
"name": "Living room sensor",
"info": "",
"x": 150,
"y": 60,
"wires": []
},
{
"id": "496fdfaa.e5283",
"type": "delay",
"z": "d763cdc1.4ee26",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "5",
"rateUnits": "minute",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"x": 540,
"y": 360,
"wires": [
[
"e007047c.3174d8"
]
]
},
{
"id": "c3393cb4.62841",
"type": "delay",
"z": "d763cdc1.4ee26",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "5",
"rateUnits": "minute",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"x": 540,
"y": 180,
"wires": [
[
"80773e77.0b15a"
]
]
},
{
"id": "64b26dad.db2e64",
"type": "delay",
"z": "d763cdc1.4ee26",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "5",
"rateUnits": "minute",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"x": 720,
"y": 480,
"wires": [
[
"4036dadb.5f9824"
]
]
},
{
"id": "4cd973ee.27667c",
"type": "delay",
"z": "d763cdc1.4ee26",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "5",
"rateUnits": "minute",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"x": 720,
"y": 600,
"wires": [
[
"d56433d1.f1006"
]
]
},
{
"id": "2f3d8ba0.6d4684",
"type": "mqtt in",
"z": "d763cdc1.4ee26",
"name": "",
"topic": "indoorWeatherStation/voltage",
"qos": "1",
"broker": "a3428f90.a1f0d",
"x": 240,
"y": 1020,
"wires": [
[
"25559cd7.4c6414"
]
]
},
{
"id": "25559cd7.4c6414",
"type": "function",
"z": "d763cdc1.4ee26",
"name": "scale",
"func": "msg.payload *= 3.304 / 2788;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 450,
"y": 1020,
"wires": [
[]
]
},
{
"id": "c7bd98c5.2aa738",
"type": "function",
"z": "d763cdc1.4ee26",
"name": "pascal to hecto",
"func": "msg.payload *= 0.01;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 540,
"y": 440,
"wires": [
[
"64b26dad.db2e64",
"8d568429.a0ce38"
]
]
},
{
"id": "4036dadb.5f9824",
"type": "ui_chart",
"z": "d763cdc1.4ee26",
"name": "Pressure Chart",
"group": "e805c221.be268",
"order": 8,
"width": "0",
"height": "0",
"label": "hPa last 24h",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "",
"ymax": "",
"removeOlder": "24",
"removeOlderPoints": "200",
"removeOlderUnit": "3600",
"cutout": 0,
"useOneColor": false,
"colors": [
"#00c59a",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"outputs": 2,
"x": 900,
"y": 480,
"wires": [
[],
[]
]
},
{
"id": "f80b0c55.499df",
"type": "ui_text",
"z": "d763cdc1.4ee26",
"group": "e805c221.be268",
"order": 1,
"width": "0",
"height": "0",
"name": "",
"label": "Last Update",
"format": "{{msg.payload}}",
"layout": "row-spread",
"x": 890,
"y": 680,
"wires": []
},
{
"id": "d93c4240.2e5a3",
"type": "function",
"z": "d763cdc1.4ee26",
"name": "last updated",
"func": "var time = new Date();\nvar year = time.getFullYear();\nvar month = time.getMonth()+1;\nvar date1 = time.getDate();\nvar hour = time.getHours();\nvar minutes = time.getMinutes();\nvar seconds = time.getSeconds();\n\nmsg.payload = (year + \"-\" + month + \"-\"+date1+\" \"+hour+\":\"+minutes+\":\"+seconds + \" UTC\");\n\n\n\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 530,
"y": 680,
"wires": [
[
"f80b0c55.499df"
]
]
},
{
"id": "80773e77.0b15a",
"type": "function",
"z": "d763cdc1.4ee26",
"name": "format",
"func": "\nmsg.topic = '°C';\n\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"x": 730,
"y": 220,
"wires": [
[
"17daaa36.364c76"
]
]
},
{
"id": "e007047c.3174d8",
"type": "function",
"z": "d763cdc1.4ee26",
"name": "format",
"func": "\nmsg.topic = 'RH %';\n\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"x": 730,
"y": 260,
"wires": [
[
"17daaa36.364c76"
]
]
},
{
"id": "17daaa36.364c76",
"type": "ui_chart",
"z": "d763cdc1.4ee26",
"name": "Temp and RH Chart",
"group": "e805c221.be268",
"order": 6,
"width": "6",
"height": "6",
"label": "Temperature and Humidity, last 24h",
"chartType": "line",
"legend": "true",
"xformat": "HH:mm",
"interpolate": "linear",
"nodata": "",
"dot": true,
"ymin": "",
"ymax": "",
"removeOlder": "24",
"removeOlderPoints": "200",
"removeOlderUnit": "3600",
"cutout": 0,
"useOneColor": false,
"colors": [
"#3f6489",
"#00c59a",
"#ff7f0e",
"#2ca02c",
"#54cd5e",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": true,
"outputs": 2,
"x": 920,
"y": 240,
"wires": [
[],
[]
]
},
{
"id": "1fdacae6.795275",
"type": "influxdb out",
"z": "d763cdc1.4ee26",
"influxdb": "113c5fc6.51374",
"name": "indoor01",
"measurement": "indoor01",
"precision": "",
"retentionPolicy": "",
"x": 880,
"y": 820,
"wires": []
},
{
"id": "fe76258f.0b7108",
"type": "function",
"z": "d763cdc1.4ee26",
"name": "format temp",
"func": "\nvar value = Math.round(msg.payload * 1e1) / 1e1;\n\nmsg.payload = {\n temperature: value\n};\n\nif (!isNaN(value)) {\n return msg;\n}\n",
"outputs": 1,
"noerr": 0,
"x": 490,
"y": 820,
"wires": [
[
"8187ca2e.683b08"
]
]
},
{
"id": "2dfe8383.c9c93c",
"type": "function",
"z": "d763cdc1.4ee26",
"name": "format humidity",
"func": "\nvar value = Math.round(msg.payload * 1e1) / 1e1;\n\nmsg.payload = {\n humidity: value\n};\n\nif (!isNaN(value)) {\n return msg;\n}\n\n",
"outputs": 1,
"noerr": 0,
"x": 500,
"y": 860,
"wires": [
[
"8187ca2e.683b08"
]
]
},
{
"id": "5dd5e12f.77f8f",
"type": "function",
"z": "d763cdc1.4ee26",
"name": "format pressure",
"func": "var value = Math.round(msg.payload * 1e1) / 1e1;\n\nmsg.payload = {\n pressure: value\n};\n\nif (!isNaN(value)) {\n return msg;\n}\n",
"outputs": 1,
"noerr": 0,
"x": 500,
"y": 900,
"wires": [
[
"8187ca2e.683b08"
]
]
},
{
"id": "58fcdf65.c4efe",
"type": "function",
"z": "d763cdc1.4ee26",
"name": "format pressure",
"func": "var value = Math.round(msg.payload * 1e1) / 1e1;\n\nmsg.payload = {\n light: value\n};\n\nif (!isNaN(value)) {\n return msg;\n}\n",
"outputs": 1,
"noerr": 0,
"x": 500,
"y": 940,
"wires": [
[
"8187ca2e.683b08"
]
]
},
{
"id": "8187ca2e.683b08",
"type": "join",
"z": "d763cdc1.4ee26",
"name": "",
"mode": "custom",
"build": "merged",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "4",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 710,
"y": 820,
"wires": [
[
"1fdacae6.795275"
]
]
},
{
"id": "44f2079.480e2f8",
"type": "mqtt-broker",
"z": "",
"broker": "localhost",
"port": "1883",
"clientid": "",
"usetls": false,
"compatmode": true,
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"willTopic": "",
"willQos": "0",
"willPayload": ""
},
{
"id": "e805c221.be268",
"type": "ui_group",
"z": "",
"name": "Living room",
"tab": "bdac26a0.d77d38",
"order": 2,
"disp": true,
"width": "6",
"collapse": true
},
{
"id": "a3428f90.a1f0d",
"type": "mqtt-broker",
"z": "",
"broker": "localhost",
"port": "1883",
"clientid": "",
"usetls": false,
"compatmode": true,
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"willTopic": "",
"willQos": "0",
"willPayload": ""
},
{
"id": "113c5fc6.51374",
"type": "influxdb",
"z": "",
"hostname": "192.168.0.200",
"port": "8086",
"protocol": "http",
"database": "home",
"name": "",
"usetls": false,
"tls": ""
},
{
"id": "bdac26a0.d77d38",
"type": "ui_tab",
"z": "",
"name": "Sensors",
"icon": "fa-rss",
"order": 4
}
]
Data source config
Collector config:
Upload an updated version of an exported dashboard.json file from Grafana
Revision | Description | Created | |
---|---|---|---|
Download |
Home Assistant
Easily monitor Home Assistant, an open source software platform designed for home automation, with Grafana Cloud's out-of-the-box monitoring solution.
Learn more