Smart Energy Monitoring System

📝 Copy-Paste Description for Node-RED Flow Creation

For flows.nodered.org or Node-RED Editor

Paste this EXACT description when creating/importing the flow:

🏭 Smart Energy Monitoring System - Manufacturing Unit

Factory I/O Integration Dashboard

Purpose

Real-time energy waste detection for manufacturing unit simulation. Monitors voltage, current, power usage across 4 machines + calculates:

  • Energy Waste (Actual vs Ideal power)
  • Burn Risk % (Overvoltage detection)
  • Cost Savings potential
  • Critical Alerts (Risk >50%)

Monitored Components

1. Lighting Circuit (Bulb1-4): 3.2V supplied (2V ideal) → 140% waste
2. Conveyor Motor: 3.2V supplied (2.5V ideal) → 76% waste  
3. CNC Spindle: 5.5V supplied (4V ideal) → 45% waste
4. Assembly Robot: 13.8V supplied (12V ideal) → 15% waste

Key Metrics Displayed

🔴 GAUGE: Risk % (0-100, Red>50)
📈 CHART: Power usage over time
💰 VALUE: Daily waste cost ($0.34)
🚨 ALERT: Critical machines list

Data Source

Factory I/O OPC UA Server (localhost:4840)
OR Manual CSV input from simulation
Tags: /Energy/Bulb1/Voltage, /Energy/Bulb1/Waste, etc.

Outputs/Alerts

• Email/SMS when Risk > 50%
• CSV Export for reports
• Mobile dashboard (ui)

Setup Instructions

1. Factory I/O → Enable OPC UA (Port 4840)
2. Deploy this flow
3. View dashboard: http://instance/ui
4. Watch waste detection live!

Author: Industrial IoT Simulation
Version: 1.0
Compatible: Factory I/O, ThingSpeak, Grafana


🎨 Complete Node-RED Flow JSON (Copy-Paste)

Copy this into Node-RED → Import → Deploy:
[
    {
        "id": "energy_dashboard",
        "type": "ui_tab",
        "name": "🏭 Energy Monitor",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    },
    {
        "id": "waste_gauge",
        "type": "ui_gauge",
        "z": "flow1",
        "name": "Risk %",
        "group": "default",
        "order": 1,
        "width": 6,
        "height": 8,
        "gtype": "gage",
        "title": "🔴 Burn Risk",
        "label": "%",
        "format": "{{value}}",
        "min": 0,
        "max": 100,
        "colors": ["#00b500", "#e77a00", "#e73525"],
        "seg1": 50,
        "seg2": 75,
        "x": 120,
        "y": 80,
        "wires": []
    },
    {
        "id": "power_chart",
        "type": "ui_chart",
        "z": "flow1",
        "name": "Power Usage",
        "group": "default",
        "order": 2,
        "width": 12,
        "height": 8,
        "label": "Power (W)",
        "chartType": "line",
        "legend": "false",
        "xformat": "HH:mm:ss",
        "interpolate": "linear",
        "nodata": "No data received",
        "dot": false,
        "ymin": "0",
        "ymax": "",
        "removeOlder": 1,
        "removeOlderPoints": "",
        "removeOlderUnit": "3600",
        "cutout": 0,
        "useOneColor": false,
        "useUTC": false,
        "colors": ["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],
        "outputs": 0,
        "useDifferentColor": false,
        "x": 120,
        "y": 200,
        "wires": []
    },
    {
        "id": "inject_factory",
        "type": "inject",
        "z": "flow1",
        "name": "Factory I/O Data",
        "props": [{"p":"payload"},{"p":"topic","vt":"str"}],
        "repeat": "5",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"bulb1\":{\"v\":3.2,\"i\":0.15,\"waste\":0.28,\"risk\":60},\"conveyor\":{\"v\":3.2,\"i\":1.1,\"waste\":1.52,\"risk\":28}}",
        "payloadType": "json",
        "x": 130,
        "y": 40,
        "wires": [["waste_calc","power_chart"]]
    },
    {
        "id": "waste_calc",
        "type": "function",
        "z": "flow1",
        "name": "Calculate Waste",
        "func": "var data = msg.payload;\nfor(var machine in data){\n  var idealP = 0.2; // Bulb ideal\n  data[machine].efficiency = Math.round((idealP/(data[machine].v*data[machine].i))*100);\n  if(data[machine].risk > 50){\n    data[machine].status = \"🔴 CRITICAL\";\n  } else {\n    data[machine].status = \"🟢 OK\";\n  }\n}\nmsg.payload = data.bulb1.risk;\nreturn msg;",
        "outputs": 2,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 360,
        "y": 80,
        "wires": [["waste_gauge"],["status_table"]]
    },
    {
        "id": "status_table",
        "type": "ui_table",
        "z": "flow1",
        "group": "default",
        "name": "Machine Status",
        "order": 3,
        "width": 12,
        "height": "4",
        "columns": [{"field":"machine","title":"Machine","width":"25%"},{"field":"risk","title":"Risk %","width":"25%"},{"field":"status","title":"Status","width":"25%"},{"field":"waste","title":"Waste (W)","width":"25%"}],
        "x": 590,
        "y": 120,
        "wires": []
    }
]

📋 How to Use:

1. flows.nodered.org → "Try Node-RED"
2. Menu → Import → Paste JSON above
3. Add description (copy text above)
4. Deploy (5 seconds)
5. Click Dashboard link → LIVE ENERGY MONITOR!

Result: Professional industrial dashboard with gauges, charts, alerts - zero downloads required!

Paste → Deploy → Done! Need help with any step? Screenshot it! ⚡📊

[{"id":"dashboard","type":"ui_tab","name":"Energy Monitor","icon":"dashboard"},{"id":"waste_gauge","type":"ui_gauge","group":"default","name":"Waste %","label":"unit: %","format":"{{value | number:1}}","min":0,"max":100,"colors":["#00b500","#e77a00","#e73525"]}]

Flow Info

Created 3 weeks, 5 days ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Other
  • ui_gauge (x1)
  • ui_tab (x1)

Tags

  • smart
  • energy
  • monitoring
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option