[
  {
    "id": "503d4505e4a78faf",
    "type": "group",
    "style": {
      "stroke": "#999999",
      "stroke-opacity": "1",
      "fill": "none",
      "fill-opacity": "1",
      "label": true,
      "label-position": "nw",
      "color": "#a4a4a4"
    },
    "nodes": [
      "meter_demo",
      "inject_value1_100",
      "inject_value1_500",
      "inject_value1_1000",
      "inject_value2_25",
      "inject_value2_50",
      "inject_server_value1",
      "debug_value1",
      "debug_value2",
      "function_random_meter",
      "inject_random",
      "comment_meter_logic",
      "828b9dd20bb32ca7",
      "411b5de109ec7ff4",
      "70a73dc6470d0a9e"
    ],
    "x": 1414,
    "y": 3139,
    "w": 962,
    "h": 382
  },
  {
    "id": "meter_demo",
    "type": "widget-Meter",
    "g": "503d4505e4a78faf",
    "dropdownRoom": "",
    "dropdownCategory": "",
    "dropdownWidget": "",
    "displayName": "Meter (set device)",
    "x": 1880,
    "y": 3340,
    "wires": [
      [
        "debug_value1"
      ],
      [
        "debug_value2"
      ],
      [
        "70a73dc6470d0a9e"
      ],
      []
    ]
  },
  {
    "id": "inject_value1_100",
    "type": "inject",
    "g": "503d4505e4a78faf",
    "name": "Power 100W",
    "props": [
      {
        "p": "inputTarget",
        "v": "Power/Flow",
        "vt": "str"
      },
      {
        "p": "payload",
        "v": "100",
        "vt": "num"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "x": 1530,
    "y": 3240,
    "wires": [
      [
        "828b9dd20bb32ca7"
      ]
    ]
  },
  {
    "id": "inject_value1_500",
    "type": "inject",
    "g": "503d4505e4a78faf",
    "name": "Power 500W",
    "props": [
      {
        "p": "inputTarget",
        "v": "Power/Flow",
        "vt": "str"
      },
      {
        "p": "payload",
        "v": "500",
        "vt": "num"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "x": 1530,
    "y": 3280,
    "wires": [
      [
        "meter_demo"
      ]
    ]
  },
  {
    "id": "inject_value1_1000",
    "type": "inject",
    "g": "503d4505e4a78faf",
    "name": "Power 1000W",
    "props": [
      {
        "p": "inputTarget",
        "v": "Power/Flow",
        "vt": "str"
      },
      {
        "p": "payload",
        "v": "1000",
        "vt": "num"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "x": 1530,
    "y": 3320,
    "wires": [
      [
        "meter_demo"
      ]
    ]
  },
  {
    "id": "inject_value2_25",
    "type": "inject",
    "g": "503d4505e4a78faf",
    "name": "Energy 25 kWh",
    "props": [
      {
        "p": "inputTarget",
        "v": "Energy/Volume",
        "vt": "str"
      },
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "payload": "25",
    "payloadType": "num",
    "x": 1540,
    "y": 3360,
    "wires": [
      [
        "meter_demo"
      ]
    ]
  },
  {
    "id": "inject_value2_50",
    "type": "inject",
    "g": "503d4505e4a78faf",
    "name": "Energy 50 kWh",
    "props": [
      {
        "p": "inputTarget",
        "v": "Energy/Volume",
        "vt": "str"
      },
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "payload": "50",
    "payloadType": "num",
    "x": 1540,
    "y": 3400,
    "wires": [
      [
        "meter_demo"
      ]
    ]
  },
  {
    "id": "inject_server_value1",
    "type": "inject",
    "g": "503d4505e4a78faf",
    "name": "25",
    "props": [
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "payload": "25",
    "payloadType": "num",
    "x": 1510,
    "y": 3440,
    "wires": [
      [
        "411b5de109ec7ff4"
      ]
    ]
  },
  {
    "id": "debug_value1",
    "type": "debug",
    "g": "503d4505e4a78faf",
    "name": "1 · Power/Flow (float)",
    "active": false,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "targetType": "msg",
    "statusVal": "",
    "statusType": "auto",
    "x": 2200,
    "y": 3360,
    "wires": []
  },
  {
    "id": "debug_value2",
    "type": "debug",
    "g": "503d4505e4a78faf",
    "name": "2 · Energy/Volume (float)",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "targetType": "msg",
    "statusVal": "",
    "statusType": "auto",
    "x": 2210,
    "y": 3400,
    "wires": []
  },
  {
    "id": "function_random_meter",
    "type": "function",
    "g": "503d4505e4a78faf",
    "name": "Random Meter Values",
    "func": "// Generate random meter values\nlet value1 = Math.floor(Math.random() * 1000) + 100; // 100-1100W\nlet value2 = Math.floor(Math.random() * 100) + 10;   // 10-110L\n\nnode.status({\n    fill: \"blue\",\n    shape: \"dot\", \n    text: `📊 ${value1}W / ${value2}L`\n});\n\n// Send both values\nlet messages = [\n    {\n        inputTarget: \"Power/Flow\",\n        payload: value1\n    },\n    {\n        inputTarget: \"Energy/Volume\", \n        payload: value2\n    }\n];\n\nreturn [messages];",
    "outputs": 1,
    "timeout": 0,
    "noerr": 0,
    "initialize": "",
    "finalize": "",
    "libs": [],
    "x": 1760,
    "y": 3480,
    "wires": [
      [
        "meter_demo"
      ]
    ]
  },
  {
    "id": "inject_random",
    "type": "inject",
    "g": "503d4505e4a78faf",
    "name": "Random Values",
    "props": [],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "x": 1540,
    "y": 3480,
    "wires": [
      [
        "function_random_meter"
      ]
    ]
  },
  {
    "id": "comment_meter_logic",
    "type": "comment",
    "g": "503d4505e4a78faf",
    "name": "Communication Meter Widget",
    "info": "## Meter node\nDevice: double-click the device node and choose the device of your installation, then Deploy.\n\n### Input targets\n`Power/Flow`, `Energy/Volume`, `Exported Energy`, `State Of Charge` — numbers. Without a target, the value goes to Power/Flow. A meter only has the objects of its sub-type (this one has no State Of Charge).\n\n### Outputs\n1. Power/Flow · 2. Energy/Volume · 3. Exported Energy · 4. State Of Charge — each time the device reports a value. Nothing leaves the outputs at the moment the flow writes; the value comes out once the server has stored it.",
    "x": 1670,
    "y": 3180,
    "wires": []
  },
  {
    "id": "828b9dd20bb32ca7",
    "type": "hypervisu-input-target",
    "g": "503d4505e4a78faf",
    "selectedWidget": "21",
    "selectedInput": "Power/Flow",
    "displayName": "Input Target",
    "x": 1710,
    "y": 3240,
    "wires": [
      [
        "meter_demo"
      ]
    ]
  },
  {
    "id": "411b5de109ec7ff4",
    "type": "hypervisu-input-target",
    "g": "503d4505e4a78faf",
    "selectedWidget": "21",
    "selectedInput": "Energy/Volume",
    "displayName": "Input Target",
    "x": 1760,
    "y": 3420,
    "wires": [
      [
        "meter_demo"
      ]
    ]
  },
  {
    "id": "70a73dc6470d0a9e",
    "type": "debug",
    "g": "503d4505e4a78faf",
    "name": "3 · Exported Energy (float)",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "targetType": "msg",
    "x": 2210,
    "y": 3440,
    "wires": []
  }
]