[
    {
        "id": "f68b8258b4fd501c",
        "type": "tab",
        "label": "MUST v 1.20",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "96316d2f15eaba63",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "95317754fdfaa7df",
        "type": "ui_base",
        "theme": {
            "name": "theme-light",
            "lightTheme": {
                "default": "#0094CE",
                "baseColor": "#0094CE",
                "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
                "edited": true,
                "reset": false
            },
            "darkTheme": {
                "default": "#097479",
                "baseColor": "#097479",
                "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
                "edited": true,
                "reset": false
            },
            "customTheme": {
                "name": "Untitled Theme 1",
                "default": "#4B7930",
                "baseColor": "#4B7930",
                "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
                "reset": false
            },
            "themeState": {
                "base-color": {
                    "default": "#0094CE",
                    "value": "#0094CE",
                    "edited": false
                },
                "page-titlebar-backgroundColor": {
                    "value": "#0094CE",
                    "edited": false
                },
                "page-backgroundColor": {
                    "value": "#fafafa",
                    "edited": false
                },
                "page-sidebar-backgroundColor": {
                    "value": "#ffffff",
                    "edited": false
                },
                "group-textColor": {
                    "value": "#1bbfff",
                    "edited": false
                },
                "group-borderColor": {
                    "value": "#ffffff",
                    "edited": false
                },
                "group-backgroundColor": {
                    "value": "#ffffff",
                    "edited": false
                },
                "widget-textColor": {
                    "value": "#111111",
                    "edited": false
                },
                "widget-backgroundColor": {
                    "value": "#0094ce",
                    "edited": false
                },
                "widget-borderColor": {
                    "value": "#ffffff",
                    "edited": false
                },
                "base-font": {
                    "value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
                }
            },
            "angularTheme": {
                "primary": "indigo",
                "accents": "blue",
                "warn": "red",
                "background": "grey",
                "palette": "light"
            }
        },
        "site": {
            "name": "FVE Bezručova",
            "hideToolbar": "false",
            "allowSwipe": "false",
            "lockMenu": "false",
            "allowTempTheme": "true",
            "dateFormat": "DD MM YYYY",
            "sizes": {
                "sx": 48,
                "sy": 48,
                "gx": 6,
                "gy": 6,
                "cx": 6,
                "cy": 6,
                "px": 0,
                "py": 0
            }
        }
    },
    {
        "id": "01f0a60623d9c6c4",
        "type": "ui_group",
        "name": "MUST",
        "tab": "1f51881fac00ed63",
        "order": 1,
        "disp": true,
        "width": 22,
        "collapse": false,
        "className": ""
    },
    {
        "id": "a56cc8d7cea6218d",
        "type": "ui_group",
        "name": "MUST MPPT",
        "tab": "1f51881fac00ed63",
        "order": 2,
        "disp": true,
        "width": 20,
        "collapse": false,
        "className": ""
    },
    {
        "id": "c6ef0b286d09dd7b",
        "type": "ui_group",
        "name": "Grafy",
        "tab": "5a73e1541b238292",
        "order": 1,
        "disp": true,
        "width": "16",
        "collapse": false,
        "className": ""
    },
    {
        "id": "1f51881fac00ed63",
        "type": "ui_tab",
        "z": "f68b8258b4fd501c",
        "name": "FVE Bezručova",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    },
    {
        "id": "5a73e1541b238292",
        "type": "ui_tab",
        "z": "f68b8258b4fd501c",
        "name": "FVE Bezručova Grafy",
        "icon": "dashboard",
        "order": 2,
        "disabled": false,
        "hidden": false
    },
    {
        "id": "c1cd664e6dd129bc",
        "type": "ui_tab",
        "name": "Nastavení",
        "icon": "dashboard",
        "order": 3,
        "disabled": false,
        "hidden": false
    },
    {
        "id": "8da71f487df38098",
        "type": "ui_group",
        "name": "Nastavení",
        "tab": "c1cd664e6dd129bc",
        "order": 1,
        "disp": true,
        "width": 10,
        "collapse": false,
        "className": ""
    },
    {
        "id": "d997fd77af193c4a",
        "type": "modbus-client",
        "name": "",
        "clienttype": "serial",
        "bufferCommands": true,
        "stateLogEnabled": false,
        "queueLogEnabled": false,
        "failureLogEnabled": true,
        "tcpHost": "127.0.0.1",
        "tcpPort": "502",
        "tcpType": "DEFAULT",
        "serialPort": "/dev/ttyUSB0",
        "serialType": "RTU-BUFFERD",
        "serialBaudrate": "19200",
        "serialDatabits": "8",
        "serialStopbits": "1",
        "serialParity": "none",
        "serialConnectionDelay": "1000",
        "serialAsciiResponseStartDelimiter": "0x3A",
        "unit_id": "4",
        "commandDelay": "1",
        "clientTimeout": "1000",
        "reconnectOnTimeout": true,
        "reconnectTimeout": "2000",
        "parallelUnitIdsAllowed": true,
        "showWarnings": true,
        "showLogs": true
    },
    {
        "id": "90c9a97f87a038e8",
        "type": "ui_spacer",
        "z": "f68b8258b4fd501c",
        "name": "spacer",
        "group": "01f0a60623d9c6c4",
        "order": 4,
        "width": 2,
        "height": 1
    },
    {
        "id": "912c35765a7073f1",
        "type": "ui_spacer",
        "z": "f68b8258b4fd501c",
        "name": "spacer",
        "group": "01f0a60623d9c6c4",
        "order": 7,
        "width": 2,
        "height": 1
    },
    {
        "id": "f503df683fc933a4",
        "type": "ui_spacer",
        "z": "f68b8258b4fd501c",
        "name": "spacer",
        "group": "01f0a60623d9c6c4",
        "order": 8,
        "width": 2,
        "height": 1
    },
    {
        "id": "6beff68409e6d645",
        "type": "ui_spacer",
        "z": "f68b8258b4fd501c",
        "name": "spacer",
        "group": "01f0a60623d9c6c4",
        "order": 9,
        "width": 2,
        "height": 1
    },
    {
        "id": "ecd46ae77fa7836e",
        "type": "ui_spacer",
        "z": "f68b8258b4fd501c",
        "name": "spacer",
        "group": "01f0a60623d9c6c4",
        "order": 10,
        "width": 4,
        "height": 1
    },
    {
        "id": "f70fafbd9d833eaf",
        "type": "ui_spacer",
        "z": "f68b8258b4fd501c",
        "name": "spacer",
        "group": "01f0a60623d9c6c4",
        "order": 13,
        "width": 10,
        "height": 1
    },
    {
        "id": "13bcbcbdbe16b58e",
        "type": "ui_spacer",
        "z": "f68b8258b4fd501c",
        "name": "spacer",
        "group": "01f0a60623d9c6c4",
        "order": 17,
        "width": 10,
        "height": 1
    },
    {
        "id": "2b1613ba95245dee",
        "type": "ui_spacer",
        "z": "f68b8258b4fd501c",
        "name": "spacer",
        "group": "a56cc8d7cea6218d",
        "order": 3,
        "width": 4,
        "height": 1
    },
    {
        "id": "e199dc0895ee3c85",
        "type": "ui_spacer",
        "z": "f68b8258b4fd501c",
        "name": "spacer",
        "group": "a56cc8d7cea6218d",
        "order": 6,
        "width": 4,
        "height": 1
    },
    {
        "id": "8dcb988c99a8d56f",
        "type": "ui_spacer",
        "z": "f68b8258b4fd501c",
        "name": "spacer",
        "group": "a56cc8d7cea6218d",
        "order": 7,
        "width": 4,
        "height": 1
    },
    {
        "id": "9b2ee0e0fb5a761a",
        "type": "ui_spacer",
        "z": "f68b8258b4fd501c",
        "name": "spacer",
        "group": "a56cc8d7cea6218d",
        "order": 8,
        "width": 4,
        "height": 1
    },
    {
        "id": "6b1f568f1766602a",
        "type": "inject",
        "z": "f68b8258b4fd501c",
        "name": "update",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "1",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "update",
        "payload": "",
        "payloadType": "date",
        "x": 100,
        "y": 40,
        "wires": [
            [
                "26eb1d10efe51434"
            ]
        ]
    },
    {
        "id": "6214c73917658231",
        "type": "inject",
        "z": "f68b8258b4fd501c",
        "name": "reset",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "reset",
        "payload": "",
        "payloadType": "date",
        "x": 90,
        "y": 80,
        "wires": [
            [
                "5116210dd2428af8"
            ]
        ]
    },
    {
        "id": "f4b5d2b44f1df01d",
        "type": "inject",
        "z": "f68b8258b4fd501c",
        "name": "next",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "next",
        "payload": "",
        "payloadType": "date",
        "x": 90,
        "y": 120,
        "wires": [
            [
                "a006504a34a372af"
            ]
        ]
    },
    {
        "id": "1f1eab9ddd5a415a",
        "type": "switch",
        "z": "f68b8258b4fd501c",
        "name": "",
        "property": "topic",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "Inverter Display Message",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "PV Charger Display Message",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Inverter Control Message",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "PV Charger Control Message",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 4,
        "x": 1030,
        "y": 100,
        "wires": [
            [
                "da503526fb545746"
            ],
            [
                "bd77f5329e2d6250"
            ],
            [
                "8d7f6d7bc45c0274"
            ],
            [
                "75f7a119d9a0bedf"
            ]
        ]
    },
    {
        "id": "07c477d09d73a71f",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "hodnota / 10 fix 2",
        "func": "var num = msg.payload[4];\nnum = num / 10;\nnum = (parseFloat(num)).toFixed(2);\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 1400,
        "wires": [
            [
                "f3fd1b384b5fa198",
                "169bd75e288c1d0f",
                "413d29d7a01f0668"
            ]
        ]
    },
    {
        "id": "f3fd1b384b5fa198",
        "type": "ui_gauge",
        "z": "f68b8258b4fd501c",
        "name": "",
        "group": "01f0a60623d9c6c4",
        "order": 1,
        "width": 4,
        "height": 4,
        "gtype": "gage",
        "title": "Napětí baterie.",
        "label": "V",
        "format": "{{value}}",
        "min": "24",
        "max": "28",
        "colors": [
            "#e6e600",
            "#00b500",
            "#ca3838"
        ],
        "seg1": "25",
        "seg2": "27.6",
        "diff": false,
        "className": "",
        "x": 1680,
        "y": 1400,
        "wires": []
    },
    {
        "id": "f2eb10293f4554a1",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Convert INT na  signed INT",
        "func": "let hodnota = msg.payload[73];\nmsg.payload = Int2Float(hodnota);\n\nreturn msg;\n\n\n// Převede číslo z formátu signed integer na desetinné číslo\nfunction Int2Float(v) {\n    \n    let t;\n    \n    if (v > 32767) t = v - 65536;\n\telse t = v;\n\t\n\treturn t;\n\t\n}",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1500,
        "y": 1460,
        "wires": [
            [
                "015ac76af1050f56"
            ]
        ]
    },
    {
        "id": "015ac76af1050f56",
        "type": "ui_gauge",
        "z": "f68b8258b4fd501c",
        "name": "",
        "group": "01f0a60623d9c6c4",
        "order": 5,
        "width": 4,
        "height": 4,
        "gtype": "gage",
        "title": "Proud baterie.",
        "label": "A",
        "format": "{{value}}",
        "min": "-125",
        "max": "125",
        "colors": [
            "#ca3838",
            "#00b500",
            "#ca3838"
        ],
        "seg1": "-50",
        "seg2": "50",
        "diff": true,
        "className": "",
        "x": 1740,
        "y": 1460,
        "wires": []
    },
    {
        "id": "c8224570e5420292",
        "type": "inject",
        "z": "f68b8258b4fd501c",
        "name": "SBU",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "Energy use mode",
        "payload": "{\"value\":1,\"fc\":6,\"unitid\":4,\"address\":20109,\"quantity\":1}",
        "payloadType": "json",
        "x": 90,
        "y": 220,
        "wires": [
            [
                "7fc47ec0cbdc6cca"
            ]
        ]
    },
    {
        "id": "98ee0c969234c163",
        "type": "inject",
        "z": "f68b8258b4fd501c",
        "name": "UTI",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "Energy use mode",
        "payload": "{\"value\":3,\"fc\":6,\"unitid\":4,\"address\":20109,\"quantity\":1}",
        "payloadType": "json",
        "x": 90,
        "y": 260,
        "wires": [
            [
                "3d76a684e67c40f2"
            ]
        ]
    },
    {
        "id": "22d98304e381445b",
        "type": "inject",
        "z": "f68b8258b4fd501c",
        "name": "SOL",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "Energy use mode",
        "payload": "{\"value\":4,\"fc\":6,\"unitid\":4,\"address\":20109,\"quantity\":1}",
        "payloadType": "json",
        "x": 90,
        "y": 300,
        "wires": [
            [
                "ba273bce64bf29e1"
            ]
        ]
    },
    {
        "id": "fd512253dea5a547",
        "type": "ui_text",
        "z": "f68b8258b4fd501c",
        "group": "01f0a60623d9c6c4",
        "order": 15,
        "width": 4,
        "height": 1,
        "name": "",
        "label": "Teplota:",
        "format": "{{msg.payload[32]}}&deg;C",
        "layout": "row-center",
        "className": "",
        "x": 1440,
        "y": 1280,
        "wires": []
    },
    {
        "id": "a26f40a4089b5e02",
        "type": "ui_text",
        "z": "f68b8258b4fd501c",
        "group": "01f0a60623d9c6c4",
        "order": 14,
        "width": 4,
        "height": 1,
        "name": "",
        "label": "Status:",
        "format": "{{msg.payload}}",
        "layout": "row-center",
        "className": "",
        "x": 1660,
        "y": 1580,
        "wires": []
    },
    {
        "id": "6487c845f4618749",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Režim work state",
        "func": "if (msg.payload[0] == 0) msg.payload = \"PowerOn\";\nif (msg.payload[0] == 1) msg.payload = \"SelfTest\";\nif (msg.payload[0] == 2) msg.payload = \"OffGrid\";\nif (msg.payload[0] == 3) msg.payload = \"Grid-Tie\";\nif (msg.payload[0] == 4) msg.payload = \"ByPass\";\nif (msg.payload[0] == 5) msg.payload = \"Stop\";\nif (msg.payload[0] == 6) msg.payload = \"Grid charging\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 1580,
        "wires": [
            [
                "a26f40a4089b5e02"
            ]
        ]
    },
    {
        "id": "bfa7999778a272a8",
        "type": "ui_dropdown",
        "z": "f68b8258b4fd501c",
        "name": "Režim SBU/SUB/UTI/SOL",
        "label": "Režim: (01)",
        "tooltip": "Režim měniče.",
        "place": "režim",
        "group": "8da71f487df38098",
        "order": 3,
        "width": 0,
        "height": 0,
        "passthru": true,
        "multiple": false,
        "options": [
            {
                "label": "SOL",
                "value": 4,
                "type": "num"
            },
            {
                "label": "SBU",
                "value": 1,
                "type": "num"
            },
            {
                "label": "UTI",
                "value": 3,
                "type": "num"
            },
            {
                "label": "SUB",
                "value": 2,
                "type": "num"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 1930,
        "y": 200,
        "wires": [
            [
                "e4fe33a7aac74776"
            ]
        ]
    },
    {
        "id": "e4fe33a7aac74776",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Write SBU/SUB/UTI/SOL",
        "func": "//let SUB_ON = true; // pokud měnič umí režim SUB odkomentovat true tento řádek, zakomentovat ten pod tímto\nlet SUB_ON = false; // pokud měnič neumí režim SUB odkomentovat false tento řádek, zakomentovat ten nahoře\n\nif (msg.payload == 1) msg.payload = { \"value\": 1, \"fc\": 6, \"unitid\": 4, \"address\": 20109, \"quantity\": 1 };\nif (msg.payload == 2) {\n    if ( SUB_ON ) msg.payload = { \"value\": 2, \"fc\": 6, \"unitid\": 4, \"address\": 20109, \"quantity\": 1 };\n    else msg.payload = { \"value\": 0, \"fc\": 3, \"unitid\": 4, \"address\": 20109, \"quantity\": 1 };\n}\nif (msg.payload == 3) msg.payload = { \"value\": 3, \"fc\": 6, \"unitid\": 4, \"address\": 20109, \"quantity\": 1 };\nif (msg.payload == 4) msg.payload = { \"value\": 4, \"fc\": 6, \"unitid\": 4, \"address\": 20109, \"quantity\": 1 };\nmsg.topic = \"Energy use mode\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2270,
        "y": 200,
        "wires": [
            [
                "468c303794f04636"
            ]
        ]
    },
    {
        "id": "c70343c774b9b99c",
        "type": "modbus-flex-getter",
        "z": "f68b8258b4fd501c",
        "name": "",
        "showStatusActivities": true,
        "showErrors": true,
        "showWarnings": true,
        "logIOActivities": false,
        "server": "d997fd77af193c4a",
        "useIOFile": false,
        "ioFile": "",
        "useIOForPayload": false,
        "emptyMsgOnFail": true,
        "keepMsgProperties": true,
        "delayOnStart": false,
        "startDelayTime": "10",
        "x": 750,
        "y": 180,
        "wires": [
            [
                "3430125dc4a358a6"
            ],
            [
                "a058bce2a8a308d1"
            ]
        ]
    },
    {
        "id": "a058bce2a8a308d1",
        "type": "modbus-response",
        "z": "f68b8258b4fd501c",
        "name": "",
        "registerShowMax": 20,
        "x": 970,
        "y": 180,
        "wires": []
    },
    {
        "id": "3d5a558586b044b1",
        "type": "modbus-flex-write",
        "z": "f68b8258b4fd501c",
        "name": "",
        "showStatusActivities": true,
        "showErrors": true,
        "showWarnings": true,
        "server": "d997fd77af193c4a",
        "emptyMsgOnFail": true,
        "keepMsgProperties": true,
        "delayOnStart": true,
        "startDelayTime": "50",
        "x": 750,
        "y": 240,
        "wires": [
            [],
            [
                "fb216ee67da92cd8"
            ]
        ]
    },
    {
        "id": "fb216ee67da92cd8",
        "type": "modbus-response",
        "z": "f68b8258b4fd501c",
        "name": "",
        "registerShowMax": 20,
        "x": 970,
        "y": 240,
        "wires": []
    },
    {
        "id": "c0d93f6c09e1a646",
        "type": "ui_chart",
        "z": "f68b8258b4fd501c",
        "name": "",
        "group": "c6ef0b286d09dd7b",
        "order": 1,
        "width": 16,
        "height": 6,
        "label": "Napětí baterie.",
        "chartType": "line",
        "legend": "false",
        "xformat": "HH:mm",
        "interpolate": "linear",
        "nodata": "",
        "dot": false,
        "ymin": "24",
        "ymax": "28",
        "removeOlder": "2",
        "removeOlderPoints": "",
        "removeOlderUnit": "604800",
        "cutout": 0,
        "useOneColor": false,
        "useUTC": false,
        "colors": [
            "#1f77b4",
            "#aec7e8",
            "#ff7f0e",
            "#2ca02c",
            "#98df8a",
            "#d62728",
            "#ff9896",
            "#9467bd",
            "#c5b0d5"
        ],
        "outputs": 1,
        "useDifferentColor": false,
        "className": "",
        "x": 2320,
        "y": 1400,
        "wires": [
            []
        ]
    },
    {
        "id": "4b4d3c67967a49b4",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "hodnota / 10 fix 2",
        "func": "var num = msg.payload[6];\nnum = num / 10;\nnum = (parseFloat(num)).toFixed(2);\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 1640,
        "wires": [
            [
                "b93b10f92179eb01"
            ]
        ]
    },
    {
        "id": "b93b10f92179eb01",
        "type": "ui_gauge",
        "z": "f68b8258b4fd501c",
        "name": "",
        "group": "01f0a60623d9c6c4",
        "order": 2,
        "width": 4,
        "height": 4,
        "gtype": "gage",
        "title": "DS Napětí",
        "label": "V",
        "format": "{{value}}",
        "min": "90",
        "max": "280",
        "colors": [
            "#e6e600",
            "#00b500",
            "#ca3838"
        ],
        "seg1": "196",
        "seg2": "250",
        "diff": false,
        "className": "",
        "x": 1670,
        "y": 1640,
        "wires": []
    },
    {
        "id": "c515d86c24a82903",
        "type": "ui_gauge",
        "z": "f68b8258b4fd501c",
        "name": "",
        "group": "01f0a60623d9c6c4",
        "order": 6,
        "width": 4,
        "height": 4,
        "gtype": "gage",
        "title": "Výkon měniče.",
        "label": "W",
        "format": "{{value}}",
        "min": "0",
        "max": "3000",
        "colors": [
            "#e6e600",
            "#00b500",
            "#ca3838"
        ],
        "seg1": "",
        "seg2": "",
        "diff": false,
        "className": "",
        "x": 1680,
        "y": 1520,
        "wires": []
    },
    {
        "id": "5c1041bec917129e",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "hodnota",
        "func": "var num = msg.payload[12];\nif(num > 3000) num = 0; // Nesmyslná hodnota nahrazená 0\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1440,
        "y": 1520,
        "wires": [
            [
                "c515d86c24a82903",
                "eb0bc383dfb0ac6e",
                "03f2f7fef455d062"
            ]
        ]
    },
    {
        "id": "4966ac9fe1a7a17b",
        "type": "ui_chart",
        "z": "f68b8258b4fd501c",
        "name": "",
        "group": "c6ef0b286d09dd7b",
        "order": 2,
        "width": 16,
        "height": 6,
        "label": "Výkon měniče.",
        "chartType": "line",
        "legend": "false",
        "xformat": "HH:mm",
        "interpolate": "linear",
        "nodata": "",
        "dot": false,
        "ymin": "0",
        "ymax": "3000",
        "removeOlder": "2",
        "removeOlderPoints": "",
        "removeOlderUnit": "604800",
        "cutout": 0,
        "useOneColor": false,
        "useUTC": false,
        "colors": [
            "#1f77b4",
            "#aec7e8",
            "#ff7f0e",
            "#2ca02c",
            "#98df8a",
            "#d62728",
            "#ff9896",
            "#9467bd",
            "#c5b0d5"
        ],
        "outputs": 1,
        "useDifferentColor": false,
        "className": "",
        "x": 2320,
        "y": 1520,
        "wires": [
            []
        ]
    },
    {
        "id": "b957a22b0dcbc678",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Modbus Queue",
        "func": "let resendifnoresposne = false; // resend the last message is no response is received\nlet resendinterval = 10; // resend last e message every x seconds\nlet online_threshold = 10; // Seconds between updates under which the device is considered online\nlet offline_threshold = 300; // Seconds between updates above which the device is considered offline\n\nlet notifmsg = null;\n\n// Check and make sure the incoming message has a topic\nif ((msg.topic===\"\")||(msg.topic===null)||(msg.topic===undefined)) {\n    node.status({fill:\"red\",shape:\"dot\",text:\"Topic missing\"});\n    return;\n}\n\nlet lastupdate = context.get(\"lastupdate\");\nlet state = context.get(\"state\") | 0;\nlet queue = context.get(\"queue\");\nlet queuecount = 0;\nif (queue === undefined) {\n    queue = [];\n} else {\n    if (Array.isArray(queue)) {\n        queuecount = queue.length;\n    } else {\n        queue = [];\n    }\n}\nlet current = new Date().getTime();\nlet send = false;\n\nswitch (msg.topic.toLowerCase()) {\n    case \"update\":\n        // Update the timer and statistics\n\n        if (lastupdate !== undefined) {\n            notifmsg = { \"topic\": \"Information\", \"payload\": {} };\n            current = current - lastupdate;\n            current = Math.floor(current / 1000);\n            notifmsg.payload.secondsincelastupdate = current;\n            var minute = Math.floor(current / 60);\n            var hour = Math.floor(minute / 60);\n            var day = Math.floor(hour / 24);\n            if (current > 24 * 60 * 60) {\n                notifmsg.payload.updatetext = \"Last update \" + day + \" days, \" + hour % 24 + \" hours, \" + minute % 60 + \" minutes, \" + current % 60 + \" seconds ago\";\n            } else if (current > 60 * 60) {\n                notifmsg.payload.updatetext = \"Last update \" + hour % 24 + \" hours, \" + minute % 60 + \" minutes, \" + current % 60 + \" seconds ago\";\n            } else if (current > 60) {\n                notifmsg.payload.updatetext = \"Last update \" + minute % 60 + \" minutes, \" + current % 60 + \" seconds ago\";\n            } else {\n                notifmsg.payload.updatetext = \"Last update \" + current % 60 + \" seconds ago\";\n            }\n\n            // Resend last message if there is no response from the server\n            if (resendifnoresposne) {\n                if ((current>0) && (current % resendinterval===0)) {\n                    let lastmsg = context.get(\"lastmsg\");\n                    if ((lastmsg!==undefined) && (context.get(\"sent\"))) {\n                        notifmsg.payload.resend = true;\n                        if ((lastmsg.payload.fc === 1) || (lastmsg.payload.fc === 2) || (lastmsg.payload.fc === 3) || (lastmsg.payload.fc === 4)) {\n                            // this is a modbus read request\n                            node.status({ fill: \"green\", shape: \"dot\", text: \"Read re-sent!\" });\n                            return [lastmsg, null, notifmsg];\n                        } else {\n                            // this is a modbus write request\n                            node.status({ fill: \"green\", shape: \"dot\", text: \"Write re-sent!\" });\n                            return [null, lastmsg, notifmsg];\n                        }\n                    }\n                }\n            }\n\n            // Check for online state\n            if (state !== 1) {\n                if (current < online_threshold) {\n                    notifmsg.topic = \"Warning\";\n                    notifmsg.payload.text = \"Device is now online\";\n                    notifmsg.payload.statuschange = true;\n                    state = 1;\n                    context.set(\"state\", state);\n                }\n            } else {\n                if (current > offline_threshold) {\n                    notifmsg.topic = \"Error\";\n                    notifmsg.payload.text = \"Device is not transmitting\";\n                    notifmsg.payload.statuschange = true;\n                    state = 99;\n                    context.set(\"state\", state);\n                }\n            }\n            notifmsg.payload.state = state;\n            if (state===1) {\n                node.status({ fill: \"blue\", shape: \"ring\", text: queuecount+ \" | \"+notifmsg.payload.updatetext });\n            } else {\n                node.status({ fill: \"red\", shape: \"ring\", text: queuecount + \" | \" + notifmsg.payload.updatetext });\n            }\n            return [null, null, notifmsg];\n\n        } else {\n            node.status({ fill: \"grey\", shape: \"ring\", text: \"No data\" });\n        }\n        break;\n    case \"next\":\n        // Update the lastupdate counter\n        context.set(\"lastupdate\", current);\n        context.set(\"sent\", false);\n        send = true;\n        break;\n    case \"reset\":\n        context.set(\"queue\",[]);\n        context.set(\"sent\", false);\n        context.set(\"lastmsg\", undefined);\n        break;\n    default:\n        // The incoming message is a modbus request\n\n        // delete the last msg to prevent from being resent\n        // context.set(\"lastmsg\", undefined);\n\n        // Check if there is already a message in the queue with the same topic. \n        // If there is it needs to be deleted, because we only keep the last message.\n        for (let i=queue.length-1; i>=0; i--) {\n            if (queue[i].topic === msg.topic) {\n                queue.splice(i,1);\n            }\n        }\n\n        // Add the message to the end of the queue\n        queue.push(msg);\n        context.set(\"queue\",queue);\n\n        if (!context.get(\"sent\")) {\n            send = true;\n        }\n        node.status({ fill: \"green\", shape: \"dot\", text: queue.length });\n\n}\n\n// We need to send out a new message\nif (send) {\n\n    if (queue.length>0) {\n        // Get the older message from the array\n        let newmsg = queue[0];\n        // remove this message\n        queue.splice(0,1);\n        context.set(\"queue\",queue);\n        context.set(\"sent\", true);\n        context.set(\"lastmsg\", newmsg);\n\n        if ((newmsg.payload.fc === 1) || (newmsg.payload.fc === 2) || (newmsg.payload.fc === 3) || (newmsg.payload.fc === 4)) {\n            // this is a modbus read request\n            node.status({ fill: \"green\", shape: \"dot\", text: \"Read sent!\" });\n            return[newmsg,null,null];\n        } else {\n            // this is a modbus write request\n            node.status({ fill: \"green\", shape: \"dot\", text: \"Write sent!\" });\n            return [null, newmsg, null];\n        }\n        \n    }\n}\n",
        "outputs": 3,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 480,
        "y": 200,
        "wires": [
            [
                "e218f7cfdf2fe463",
                "c70343c774b9b99c"
            ],
            [
                "e218f7cfdf2fe463",
                "3d5a558586b044b1"
            ],
            [
                "349e2fa8b06658cb"
            ]
        ],
        "info": "# Modbus Queue\r\n\r\nThis node queueing read and write messages for modbus. Use this node if you are reading and writing the same device with many different requests. E.g. reading different coil/register intervals continously and also writing to the device at the same time.\r\n\r\nIt does a few things:\r\n- queues all messages arrive on the input port\r\n- based on the msg.topic, older messages of the same topci is ignored\r\n- sends out the oldest message and waits for the \r\n- monitors the time since last message and send out report on the output\r\n- handles online/offline status\r\n- resend the last message is response is not received in time\r\n\r\n## Input Data\r\n\r\n### payload\r\n\r\nThe payload should contain the data that gets sent to the flex-getter or flex-write node.\r\nTypical modbus read payload:\r\n`{\"value\":0,\"fc\":3,\"unitid\":1,\"address\":1000,\"quantity\":20}`\r\nTypical modbus write payload:\r\n`{\"value\":false,\"fc\":5,\"unitid\":1,\"address\":0,\"quantity\":1}`\r\n\r\n### topic\r\n\r\nEach message must contain a topic (any text), and this topic is used to identify the different read/write requests and delete any earlier request with the same topic if it still in the queueing\r\n\r\nThere are a few reserved topic for special function (for these payload is ignored):\r\n- reset: resets the queue and deleted any data collected so far\r\n- next: this is the message fed back from the flex getter/write node to indicate to this node that a new message can be sent out\r\n- update: this should be coming from a 1 second time to display the current queue count, time since the last update and online/offline status\r\n\r\n## Output ports\r\n\r\n### Port 1: flex getter\r\n\r\nThis output should be connected to a modbos-flex-getter and all the read requests will be sent out through this port\r\n\r\n### Port 2: flex write\r\n\r\nThis output should be connected to a modbos-flex-write and all the write requests will be sent out through this port\r\n\r\n### Port 3: status messages\r\n\r\nThis port outputs a status message for every update message (msg.topic=\"update\").\r\n\r\n- topic: \"Information\" for regular updates, \"Warning\": offline device is now back online, \"Error\": device is offline\r\n- payload.text: message like when the device gone offline, or back online\r\n- payload.updatetext: time passed since the last update (human readable format)\r\n- payload.secondsincelastupdate: number of seconds since the last update from the device\r\n- payload.statuschange: true if status is changed (gone offline, back online)\r\n- payload.state: 0: initial state, no data yet, 1: device online, 99: device offline\r\n\r\n## Node Settings\r\n\r\nChange the settings in the first 4 lines of the code to influence the behaviour. Explanation is in the code as comment."
    },
    {
        "id": "685a797cf80d0845",
        "type": "inject",
        "z": "f68b8258b4fd501c",
        "name": "Read 20101 +44 Inverter Control Message",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "5",
        "crontab": "",
        "once": true,
        "onceDelay": "5",
        "topic": "Inverter Control Message",
        "payload": "{\"value\":0,\"fc\":3,\"unitid\":4,\"address\":20101,\"quantity\":44}",
        "payloadType": "json",
        "x": 210,
        "y": 680,
        "wires": [
            [
                "67c75a834f3c30f8"
            ]
        ]
    },
    {
        "id": "e218f7cfdf2fe463",
        "type": "change",
        "z": "f68b8258b4fd501c",
        "name": "Advance queue",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "next",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 480,
        "y": 80,
        "wires": [
            [
                "b957a22b0dcbc678"
            ]
        ]
    },
    {
        "id": "dde6e9df9762f1dc",
        "type": "inject",
        "z": "f68b8258b4fd501c",
        "name": "Read 15201 +21 PV Charger Display Message",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "5",
        "crontab": "",
        "once": true,
        "onceDelay": "3",
        "topic": "PV Charger Display Message",
        "payload": "{\"value\":0,\"fc\":3,\"unitid\":4,\"address\":15201,\"quantity\":21}",
        "payloadType": "json",
        "x": 220,
        "y": 620,
        "wires": [
            [
                "8df2c7e7c7329fa0"
            ]
        ]
    },
    {
        "id": "3430125dc4a358a6",
        "type": "switch",
        "z": "f68b8258b4fd501c",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "nempty"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 910,
        "y": 100,
        "wires": [
            [
                "1f1eab9ddd5a415a"
            ]
        ]
    },
    {
        "id": "a2fac952882896c2",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Read SBU/SUB/UTI/SOL",
        "func": "var num = msg.payload[8];\n//num = num / 10;\n//num = (parseFloat(num)).toFixed(2);\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1490,
        "y": 200,
        "wires": [
            [
                "bfa7999778a272a8"
            ]
        ]
    },
    {
        "id": "9b5f4edc043fd4da",
        "type": "ui_text",
        "z": "f68b8258b4fd501c",
        "group": "a56cc8d7cea6218d",
        "order": 9,
        "width": 4,
        "height": 1,
        "name": "",
        "label": "Pracovní stav:",
        "format": "{{msg.payload}}",
        "layout": "row-center",
        "className": "",
        "x": 1680,
        "y": 1960,
        "wires": []
    },
    {
        "id": "57f172150e9c5fed",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Charger workstate",
        "func": "if (msg.payload[0] == 0) msg.payload = \"inicializace\";\nif (msg.payload[0] == 1) msg.payload = \"autotest\";\nif (msg.payload[0] == 2) msg.payload = \"pracuje\";\nif (msg.payload[0] == 3) msg.payload = \"vypnuto\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 1960,
        "wires": [
            [
                "9b5f4edc043fd4da"
            ]
        ]
    },
    {
        "id": "dfd855c352549885",
        "type": "ui_text",
        "z": "f68b8258b4fd501c",
        "group": "a56cc8d7cea6218d",
        "order": 10,
        "width": 4,
        "height": 1,
        "name": "",
        "label": "Režim MPPT:",
        "format": "{{msg.payload}}",
        "layout": "row-center",
        "className": "",
        "x": 1680,
        "y": 2020,
        "wires": []
    },
    {
        "id": "d0b3044cc148e446",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Mppt state",
        "func": "if (msg.payload[1] == 0) msg.payload = \"Stop\";\nif (msg.payload[1] == 1) msg.payload = \"MPPT\";\nif (msg.payload[1] == 2) msg.payload = \"omezení proudu\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1450,
        "y": 2020,
        "wires": [
            [
                "dfd855c352549885"
            ]
        ]
    },
    {
        "id": "8ee95c6cc4d74af6",
        "type": "ui_text",
        "z": "f68b8258b4fd501c",
        "group": "a56cc8d7cea6218d",
        "order": 11,
        "width": 4,
        "height": 1,
        "name": "",
        "label": "Stav nabíjení:",
        "format": "{{msg.payload}}",
        "layout": "row-center",
        "className": "",
        "x": 1680,
        "y": 2080,
        "wires": []
    },
    {
        "id": "f7012130d32eb648",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "charging state",
        "func": "if (msg.payload[2] == 0) msg.payload = \"Stop\";\nif (msg.payload[2] == 1) msg.payload = \"Absorbce\";\nif (msg.payload[2] == 2) msg.payload = \"Float\";\nif (msg.payload[2] == 3) msg.payload = \"Eqalize\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1460,
        "y": 2080,
        "wires": [
            [
                "8ee95c6cc4d74af6"
            ]
        ]
    },
    {
        "id": "349e2fa8b06658cb",
        "type": "debug",
        "z": "f68b8258b4fd501c",
        "name": "Status Messages",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 810,
        "y": 360,
        "wires": []
    },
    {
        "id": "7387974de105a58a",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "hodnota / 10 fix 2",
        "func": "var num = msg.payload[4];\nnum = num / 10;\nnum = (parseFloat(num)).toFixed(2);\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 2140,
        "wires": [
            [
                "9ff3990fb979f68d",
                "9c20fe7f2c36b6c9",
                "dbd76afd24c65594"
            ]
        ]
    },
    {
        "id": "9ff3990fb979f68d",
        "type": "ui_gauge",
        "z": "f68b8258b4fd501c",
        "name": "",
        "group": "a56cc8d7cea6218d",
        "order": 2,
        "width": 4,
        "height": 4,
        "gtype": "gage",
        "title": "Napětí panelů",
        "label": "V",
        "format": "{{value}}",
        "min": "0",
        "max": "145",
        "colors": [
            "#e6e600",
            "#00b500",
            "#ca3838"
        ],
        "seg1": "30",
        "seg2": "130",
        "diff": false,
        "className": "",
        "x": 1680,
        "y": 2140,
        "wires": []
    },
    {
        "id": "abea618e04114363",
        "type": "ui_chart",
        "z": "f68b8258b4fd501c",
        "name": "",
        "group": "c6ef0b286d09dd7b",
        "order": 4,
        "width": 16,
        "height": 7,
        "label": "Napětí na panelech",
        "chartType": "line",
        "legend": "false",
        "xformat": "HH:mm",
        "interpolate": "linear",
        "nodata": "",
        "dot": false,
        "ymin": "0",
        "ymax": "145",
        "removeOlder": "2",
        "removeOlderPoints": "",
        "removeOlderUnit": "86400",
        "cutout": 0,
        "useOneColor": false,
        "useUTC": false,
        "colors": [
            "#1f77b4",
            "#aec7e8",
            "#ff7f0e",
            "#2ca02c",
            "#98df8a",
            "#d62728",
            "#ff9896",
            "#9467bd",
            "#c5b0d5"
        ],
        "outputs": 1,
        "useDifferentColor": false,
        "className": "",
        "x": 2330,
        "y": 2140,
        "wires": [
            []
        ]
    },
    {
        "id": "8fb84e4df2896ee6",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "hodnota / 10 fix 2",
        "func": "var num = msg.payload[5];\nnum = num / 10;\nnum = (parseFloat(num)).toFixed(2);\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 2200,
        "wires": [
            [
                "efbcb61afa976776"
            ]
        ]
    },
    {
        "id": "efbcb61afa976776",
        "type": "ui_gauge",
        "z": "f68b8258b4fd501c",
        "name": "",
        "group": "a56cc8d7cea6218d",
        "order": 1,
        "width": 4,
        "height": 4,
        "gtype": "gage",
        "title": "Napětí MPPT",
        "label": "V",
        "format": "{{value}}",
        "min": "24",
        "max": "28",
        "colors": [
            "#e6e600",
            "#00b500",
            "#ca3838"
        ],
        "seg1": "25",
        "seg2": "27.6",
        "diff": false,
        "className": "",
        "x": 1680,
        "y": 2200,
        "wires": []
    },
    {
        "id": "cc2ae399eca90ae5",
        "type": "ui_gauge",
        "z": "f68b8258b4fd501c",
        "name": "",
        "group": "a56cc8d7cea6218d",
        "order": 4,
        "width": 4,
        "height": 4,
        "gtype": "gage",
        "title": "Proud z MPPT",
        "label": "A",
        "format": "{{value}}",
        "min": "0",
        "max": "80",
        "colors": [
            "#e6e600",
            "#00b500",
            "#ca3838"
        ],
        "seg1": "",
        "seg2": "",
        "diff": false,
        "className": "",
        "x": 1680,
        "y": 2260,
        "wires": []
    },
    {
        "id": "bfc84c6e4c69d370",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "hodnota / 10 fix 2",
        "func": "var num = msg.payload[6];\nnum = num / 10;\nnum = (parseFloat(num)).toFixed(2);\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 2260,
        "wires": [
            [
                "cc2ae399eca90ae5"
            ]
        ]
    },
    {
        "id": "847930cde4ec4977",
        "type": "ui_gauge",
        "z": "f68b8258b4fd501c",
        "name": "",
        "group": "a56cc8d7cea6218d",
        "order": 5,
        "width": 4,
        "height": 4,
        "gtype": "gage",
        "title": "Výkon panelů",
        "label": "W",
        "format": "{{value}}",
        "min": "0",
        "max": "2000",
        "colors": [
            "#e6e600",
            "#00b500",
            "#ca3838"
        ],
        "seg1": "",
        "seg2": "",
        "diff": false,
        "className": "",
        "x": 1680,
        "y": 2320,
        "wires": []
    },
    {
        "id": "2f1a1677b0ef2f72",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "hodnota",
        "func": "var num = msg.payload[7];\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1440,
        "y": 2320,
        "wires": [
            [
                "847930cde4ec4977"
            ]
        ]
    },
    {
        "id": "f912edbaf74ee62b",
        "type": "ui_text",
        "z": "f68b8258b4fd501c",
        "group": "a56cc8d7cea6218d",
        "order": 12,
        "width": 4,
        "height": 1,
        "name": "",
        "label": "Teplota MPPT:",
        "format": "{{value}}&deg;C",
        "layout": "row-center",
        "className": "",
        "x": 1680,
        "y": 1340,
        "wires": []
    },
    {
        "id": "761d1fc1cccc5dfd",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "hodnota / 10 fix 2",
        "func": "var num_high = msg.payload[16];\nvar num_low = msg.payload[17];\nvar dnu = msg.payload[18];\nvar hodin = msg.payload[19];\nvar minut = msg.payload[20];\nvar num = num_low / 10;\nnum = num + (num_high * 1000);\nmsg.payload = (parseFloat(num)).toFixed(2);\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 2380,
        "wires": [
            [
                "4ad2478fb51faf50"
            ]
        ]
    },
    {
        "id": "4ad2478fb51faf50",
        "type": "ui_text",
        "z": "f68b8258b4fd501c",
        "group": "a56cc8d7cea6218d",
        "order": 13,
        "width": 4,
        "height": 1,
        "name": "Výroba kwh",
        "label": "",
        "format": "Výroba: {{value}} kwh",
        "layout": "row-center",
        "className": "",
        "x": 1670,
        "y": 2380,
        "wires": []
    },
    {
        "id": "d14e72fa99393b7d",
        "type": "comment",
        "z": "f68b8258b4fd501c",
        "name": "Ruční přepnutí režimů SBU/UTI/SOL",
        "info": "",
        "x": 160,
        "y": 180,
        "wires": []
    },
    {
        "id": "72ad9230df39e02a",
        "type": "comment",
        "z": "f68b8258b4fd501c",
        "name": "Vyčítání registrů",
        "info": "",
        "x": 120,
        "y": 540,
        "wires": []
    },
    {
        "id": "11925805c14153c3",
        "type": "comment",
        "z": "f68b8258b4fd501c",
        "name": "Fronta",
        "info": "",
        "x": 410,
        "y": 40,
        "wires": []
    },
    {
        "id": "952ee8b918eabfb3",
        "type": "comment",
        "z": "f68b8258b4fd501c",
        "name": "Komunikace",
        "info": "",
        "x": 730,
        "y": 120,
        "wires": []
    },
    {
        "id": "54e0bd5a2954a10f",
        "type": "comment",
        "z": "f68b8258b4fd501c",
        "name": "Zobrazení dat",
        "info": "",
        "x": 1390,
        "y": 1200,
        "wires": []
    },
    {
        "id": "eee6c2e4a468d383",
        "type": "ui_dropdown",
        "z": "f68b8258b4fd501c",
        "name": "Režim CSO/SNU/OSO",
        "label": "Nabíjení: (10)",
        "tooltip": "Režim nabíjení baterky.",
        "place": "režim",
        "group": "8da71f487df38098",
        "order": 4,
        "width": 0,
        "height": 0,
        "passthru": true,
        "multiple": false,
        "options": [
            {
                "label": "Soalr first (CSO)",
                "value": 0,
                "type": "num"
            },
            {
                "label": "Solar and Utility (SNU)",
                "value": 2,
                "type": "num"
            },
            {
                "label": "Only Solar (OSO)",
                "value": 3,
                "type": "num"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 1920,
        "y": 260,
        "wires": [
            [
                "390312228c92a9b2"
            ]
        ]
    },
    {
        "id": "390312228c92a9b2",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Write Charger source priority",
        "func": "if (msg.payload == 0) msg.payload = { \"value\": 0, \"fc\": 6, \"unitid\": 4, \"address\": 20143, \"quantity\": 1 };\nif (msg.payload == 2) msg.payload = { \"value\": 2, \"fc\": 6, \"unitid\": 4, \"address\": 20143, \"quantity\": 1 };\nif (msg.payload == 3) msg.payload = { \"value\": 3, \"fc\": 6, \"unitid\": 4, \"address\": 20143, \"quantity\": 1 };\nmsg.topic = \"source_priority\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2260,
        "y": 260,
        "wires": [
            [
                "468c303794f04636"
            ]
        ]
    },
    {
        "id": "79e34e3439c5b242",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Read CSO/SNU/OSO",
        "func": "var num = msg.payload[42];\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1480,
        "y": 260,
        "wires": [
            [
                "eee6c2e4a468d383"
            ]
        ]
    },
    {
        "id": "1cd415ffb8edde8d",
        "type": "ui_dropdown",
        "z": "f68b8258b4fd501c",
        "name": "Vypínač měniče (Inverter offgrid work enable)",
        "label": "Měnič:",
        "tooltip": "Vypne / Zapne měnič",
        "place": "režim",
        "group": "8da71f487df38098",
        "order": 2,
        "width": 0,
        "height": 0,
        "passthru": true,
        "multiple": false,
        "options": [
            {
                "label": "OFF (Vypnut)",
                "value": 0,
                "type": "num"
            },
            {
                "label": "ON (Zapnut)",
                "value": 1,
                "type": "num"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 1930,
        "y": 140,
        "wires": [
            [
                "e63ad8b3b5193f43"
            ]
        ]
    },
    {
        "id": "e63ad8b3b5193f43",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Inverter offgrid work enable",
        "func": "if (msg.payload == 0) msg.payload = { \"value\": 0, \"fc\": 6, \"unitid\": 4, \"address\": 20101, \"quantity\": 1 };\nif (msg.payload == 1) msg.payload = { \"value\": 1, \"fc\": 6, \"unitid\": 4, \"address\": 20101, \"quantity\": 1 };\nmsg.topic = \"Inverter offgrid work enable\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2260,
        "y": 140,
        "wires": [
            [
                "468c303794f04636"
            ]
        ]
    },
    {
        "id": "8088915919a78535",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Inverter offgrid work enable",
        "func": "var num = msg.payload[0];\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1500,
        "y": 140,
        "wires": [
            [
                "1cd415ffb8edde8d"
            ]
        ]
    },
    {
        "id": "1efea9b74406ad7d",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "hodnota 0 == \" -- \"",
        "func": "var num = msg.payload[8];\nif(num == 0) msg.payload = \" -- \";\nelse msg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 1340,
        "wires": [
            [
                "f912edbaf74ee62b"
            ]
        ]
    },
    {
        "id": "d3c5c6979bb4450f",
        "type": "inject",
        "z": "f68b8258b4fd501c",
        "name": "Li",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "Battery type",
        "payload": "{\"value\":2,\"fc\":6,\"unitid\":4,\"address\":10110,\"quantity\":1}",
        "payloadType": "json",
        "x": 90,
        "y": 340,
        "wires": [
            [
                "a36fdb9cb8be3d8d"
            ]
        ]
    },
    {
        "id": "2ef63eb73ae35904",
        "type": "inject",
        "z": "f68b8258b4fd501c",
        "name": "USE",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "Battery type",
        "payload": "{\"value\":1,\"fc\":6,\"unitid\":4,\"address\":10110,\"quantity\":1}",
        "payloadType": "json",
        "x": 90,
        "y": 380,
        "wires": [
            [
                "99662d06ce7a0012"
            ]
        ]
    },
    {
        "id": "c44b4afd15fc71f7",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "Vstup",
        "links": [
            "2482f66ac8913e77",
            "26eb1d10efe51434",
            "3ab7f2a64daecbf2",
            "3d76a684e67c40f2",
            "49495e0dcb91fe5a",
            "4e28d380b4c0c0a6",
            "5116210dd2428af8",
            "67c75a834f3c30f8",
            "7fc47ec0cbdc6cca",
            "8bb39a9f59c20fc1",
            "8df2c7e7c7329fa0",
            "99662d06ce7a0012",
            "a006504a34a372af",
            "a36fdb9cb8be3d8d",
            "ba273bce64bf29e1",
            "db57adec052474b8",
            "5efc60a779eb02fb"
        ],
        "x": 265,
        "y": 300,
        "wires": [
            [
                "b957a22b0dcbc678"
            ]
        ]
    },
    {
        "id": "4e28d380b4c0c0a6",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "Inverter Control Message OUT",
        "mode": "link",
        "links": [
            "c44b4afd15fc71f7"
        ],
        "x": 2865,
        "y": 600,
        "wires": []
    },
    {
        "id": "d8b7d9ccc5936a07",
        "type": "inject",
        "z": "f68b8258b4fd501c",
        "name": "Read 10103 +22 PV Charger Control Message",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "5",
        "crontab": "",
        "once": true,
        "onceDelay": "7",
        "topic": "PV Charger Control Message",
        "payload": "{\"value\":0,\"fc\":3,\"unitid\":4,\"address\":10103,\"quantity\":22}",
        "payloadType": "json",
        "x": 220,
        "y": 740,
        "wires": [
            [
                "49495e0dcb91fe5a"
            ]
        ]
    },
    {
        "id": "9c20fe7f2c36b6c9",
        "type": "rbe",
        "z": "f68b8258b4fd501c",
        "name": "block unles value changes",
        "func": "rbe",
        "gap": "",
        "start": "",
        "inout": "in",
        "septopics": true,
        "property": "payload",
        "topi": "topic",
        "x": 1900,
        "y": 2140,
        "wires": [
            [
                "67ed980fe9862dd1"
            ]
        ]
    },
    {
        "id": "eb0bc383dfb0ac6e",
        "type": "rbe",
        "z": "f68b8258b4fd501c",
        "name": "block unles value changes",
        "func": "rbe",
        "gap": "",
        "start": "",
        "inout": "in",
        "septopics": true,
        "property": "payload",
        "topi": "topic",
        "x": 1900,
        "y": 1520,
        "wires": [
            [
                "791a086b21ee6e17"
            ]
        ]
    },
    {
        "id": "169bd75e288c1d0f",
        "type": "rbe",
        "z": "f68b8258b4fd501c",
        "name": "block unles value changes",
        "func": "rbe",
        "gap": "",
        "start": "",
        "inout": "in",
        "septopics": true,
        "property": "payload",
        "topi": "topic",
        "x": 1900,
        "y": 1400,
        "wires": [
            [
                "029e4e6087e1ca41"
            ]
        ]
    },
    {
        "id": "637749560bd9f2fe",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Read Float Voltage",
        "func": "var num = msg.payload[0];\nnum = num / 10;\nnum = (parseFloat(num)).toFixed(2);\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 840,
        "wires": [
            [
                "d0e2dfb09df66a7d"
            ]
        ]
    },
    {
        "id": "d0e2dfb09df66a7d",
        "type": "ui_numeric",
        "z": "f68b8258b4fd501c",
        "name": "",
        "label": "Float: (18)",
        "tooltip": "Float napětí.",
        "group": "8da71f487df38098",
        "order": 11,
        "width": 0,
        "height": 0,
        "wrap": false,
        "passthru": true,
        "topic": "topic",
        "topicType": "msg",
        "format": "{{value}} V",
        "min": "24",
        "max": "29.2",
        "step": "0.1",
        "className": "",
        "x": 1810,
        "y": 840,
        "wires": [
            [
                "d5b4d0451385ce6e"
            ]
        ]
    },
    {
        "id": "8417da76e8e25804",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Read Absorp Voltage",
        "func": "var num = msg.payload[1];\nnum = num / 10;\nnum = (parseFloat(num)).toFixed(2);\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1480,
        "y": 900,
        "wires": [
            [
                "c292195c5d169dba"
            ]
        ]
    },
    {
        "id": "c292195c5d169dba",
        "type": "ui_numeric",
        "z": "f68b8258b4fd501c",
        "name": "",
        "label": "Absorption: (17)",
        "tooltip": "Absorption voltage.",
        "group": "8da71f487df38098",
        "order": 10,
        "width": 0,
        "height": 0,
        "wrap": false,
        "passthru": true,
        "topic": "topic",
        "topicType": "msg",
        "format": "{{value}} V",
        "min": "24",
        "max": "29.2",
        "step": "0.1",
        "className": "",
        "x": 1820,
        "y": 900,
        "wires": [
            [
                "13f4fc26bc4c2ce0"
            ]
        ]
    },
    {
        "id": "3638b3485cc1753d",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Read Battery AH",
        "func": "var num = msg.payload[8];\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 960,
        "wires": [
            [
                "99cc294edf47819c"
            ]
        ]
    },
    {
        "id": "99cc294edf47819c",
        "type": "ui_numeric",
        "z": "f68b8258b4fd501c",
        "name": "",
        "label": "Battery Ah:",
        "tooltip": "Kapacita baterie v Ah.",
        "group": "8da71f487df38098",
        "order": 7,
        "width": 0,
        "height": 0,
        "wrap": false,
        "passthru": true,
        "topic": "topic",
        "topicType": "msg",
        "format": "{{value}} Ah",
        "min": "0",
        "max": "900",
        "step": "5",
        "className": "",
        "x": 1810,
        "y": 960,
        "wires": [
            [
                "24c38bbf076efecc"
            ]
        ]
    },
    {
        "id": "029e4e6087e1ca41",
        "type": "delay",
        "z": "f68b8258b4fd501c",
        "name": "",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "4",
        "nbRateUnits": "1",
        "rateUnits": "minute",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 2110,
        "y": 1400,
        "wires": [
            [
                "c0d93f6c09e1a646"
            ]
        ]
    },
    {
        "id": "791a086b21ee6e17",
        "type": "delay",
        "z": "f68b8258b4fd501c",
        "name": "",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "4",
        "nbRateUnits": "1",
        "rateUnits": "minute",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 2110,
        "y": 1520,
        "wires": [
            [
                "4966ac9fe1a7a17b"
            ]
        ]
    },
    {
        "id": "67ed980fe9862dd1",
        "type": "delay",
        "z": "f68b8258b4fd501c",
        "name": "",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "4",
        "nbRateUnits": "1",
        "rateUnits": "minute",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 2110,
        "y": 2140,
        "wires": [
            [
                "abea618e04114363"
            ]
        ]
    },
    {
        "id": "dbd76afd24c65594",
        "type": "delay",
        "z": "f68b8258b4fd501c",
        "name": "",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "minute",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 2110,
        "y": 2100,
        "wires": [
            [
                "abea618e04114363"
            ]
        ]
    },
    {
        "id": "03f2f7fef455d062",
        "type": "delay",
        "z": "f68b8258b4fd501c",
        "name": "",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "minute",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 2110,
        "y": 1480,
        "wires": [
            [
                "4966ac9fe1a7a17b"
            ]
        ]
    },
    {
        "id": "413d29d7a01f0668",
        "type": "delay",
        "z": "f68b8258b4fd501c",
        "name": "",
        "pauseType": "rate",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "minute",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": true,
        "allowrate": false,
        "outputs": 1,
        "x": 2110,
        "y": 1360,
        "wires": [
            [
                "c0d93f6c09e1a646"
            ]
        ]
    },
    {
        "id": "a03a81e1a9ab72db",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "hodnota / 10 fix 2",
        "func": "var num = msg.payload[5];\nnum = num / 10;\nnum = (parseFloat(num)).toFixed(2);\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 1900,
        "wires": [
            [
                "58d77b3814b41d19"
            ]
        ]
    },
    {
        "id": "58d77b3814b41d19",
        "type": "ui_gauge",
        "z": "f68b8258b4fd501c",
        "name": "",
        "group": "01f0a60623d9c6c4",
        "order": 3,
        "width": 4,
        "height": 4,
        "gtype": "gage",
        "title": "Invertor",
        "label": "V",
        "format": "{{value}}",
        "min": "90",
        "max": "280",
        "colors": [
            "#e6e600",
            "#00b500",
            "#ca3838"
        ],
        "seg1": "196",
        "seg2": "250",
        "diff": false,
        "className": "",
        "x": 1660,
        "y": 1900,
        "wires": []
    },
    {
        "id": "f7acc57cb91f61de",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Read Battery type",
        "func": "var num = msg.payload[7];\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 780,
        "wires": [
            [
                "c5b8517bd7ee7c41"
            ]
        ]
    },
    {
        "id": "c5b8517bd7ee7c41",
        "type": "ui_dropdown",
        "z": "f68b8258b4fd501c",
        "name": "Typ baterie",
        "label": "Typ akumulátoru: (14)",
        "tooltip": "Typ baterie.",
        "place": "Baterie",
        "group": "8da71f487df38098",
        "order": 6,
        "width": 0,
        "height": 0,
        "passthru": false,
        "multiple": false,
        "options": [
            {
                "label": "USE",
                "value": 1,
                "type": "num"
            },
            {
                "label": "Li",
                "value": 2,
                "type": "num"
            },
            {
                "label": "SEALED_LEAD",
                "value": 3,
                "type": "num"
            },
            {
                "label": "AGM",
                "value": 4,
                "type": "num"
            },
            {
                "label": "GEL",
                "value": 5,
                "type": "num"
            },
            {
                "label": "FLOODED",
                "value": 6,
                "type": "num"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 1810,
        "y": 780,
        "wires": [
            [
                "54774f9caae367cd"
            ]
        ]
    },
    {
        "id": "54774f9caae367cd",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Write Battery type",
        "func": "if (msg.payload == 1) msg.payload = { \"value\": 1, \"fc\": 6, \"unitid\": 4, \"address\": 10110, \"quantity\": 1 };\nif (msg.payload == 2) msg.payload = { \"value\": 2, \"fc\": 6, \"unitid\": 4, \"address\": 10110, \"quantity\": 1 };\nif (msg.payload == 3) msg.payload = { \"value\": 3, \"fc\": 6, \"unitid\": 4, \"address\": 10110, \"quantity\": 1 };\nif (msg.payload == 4) msg.payload = { \"value\": 4, \"fc\": 6, \"unitid\": 4, \"address\": 10110, \"quantity\": 1 };\nif (msg.payload == 5) msg.payload = { \"value\": 5, \"fc\": 6, \"unitid\": 4, \"address\": 10110, \"quantity\": 1 };\nif (msg.payload == 6) msg.payload = { \"value\": 6, \"fc\": 6, \"unitid\": 4, \"address\": 10110, \"quantity\": 1 };\nmsg.topic = \"Typ baterky\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2050,
        "y": 780,
        "wires": [
            [
                "468c303794f04636"
            ]
        ]
    },
    {
        "id": "26eb1d10efe51434",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "link out 1",
        "mode": "link",
        "links": [
            "c44b4afd15fc71f7"
        ],
        "x": 205,
        "y": 40,
        "wires": []
    },
    {
        "id": "5116210dd2428af8",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "link out 2",
        "mode": "link",
        "links": [
            "c44b4afd15fc71f7"
        ],
        "x": 205,
        "y": 80,
        "wires": []
    },
    {
        "id": "a006504a34a372af",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "link out 3",
        "mode": "link",
        "links": [
            "c44b4afd15fc71f7"
        ],
        "x": 205,
        "y": 120,
        "wires": []
    },
    {
        "id": "7fc47ec0cbdc6cca",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "link out 4",
        "mode": "link",
        "links": [
            "c44b4afd15fc71f7"
        ],
        "x": 185,
        "y": 220,
        "wires": []
    },
    {
        "id": "3d76a684e67c40f2",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "link out 5",
        "mode": "link",
        "links": [
            "c44b4afd15fc71f7"
        ],
        "x": 185,
        "y": 260,
        "wires": []
    },
    {
        "id": "ba273bce64bf29e1",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "link out 6",
        "mode": "link",
        "links": [
            "c44b4afd15fc71f7"
        ],
        "x": 185,
        "y": 300,
        "wires": []
    },
    {
        "id": "a36fdb9cb8be3d8d",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "link out 7",
        "mode": "link",
        "links": [
            "c44b4afd15fc71f7"
        ],
        "x": 185,
        "y": 340,
        "wires": []
    },
    {
        "id": "99662d06ce7a0012",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "link out 8",
        "mode": "link",
        "links": [
            "c44b4afd15fc71f7"
        ],
        "x": 185,
        "y": 380,
        "wires": []
    },
    {
        "id": "8bb39a9f59c20fc1",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "link out 11",
        "mode": "link",
        "links": [
            "c44b4afd15fc71f7"
        ],
        "x": 435,
        "y": 580,
        "wires": []
    },
    {
        "id": "8df2c7e7c7329fa0",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "link out 12",
        "mode": "link",
        "links": [
            "c44b4afd15fc71f7"
        ],
        "x": 435,
        "y": 620,
        "wires": []
    },
    {
        "id": "67c75a834f3c30f8",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "link out 13",
        "mode": "link",
        "links": [
            "c44b4afd15fc71f7"
        ],
        "x": 435,
        "y": 680,
        "wires": []
    },
    {
        "id": "49495e0dcb91fe5a",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "link out 14",
        "mode": "link",
        "links": [
            "c44b4afd15fc71f7"
        ],
        "x": 435,
        "y": 740,
        "wires": []
    },
    {
        "id": "75f7a119d9a0bedf",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "PV Charger Control Message OUT switch",
        "mode": "link",
        "links": [
            "9841de8eb0b73d37",
            "9b6cfdf6bc3339ec",
            "c0dd1e684dd35483",
            "c612dad6c6475190"
        ],
        "x": 1155,
        "y": 160,
        "wires": []
    },
    {
        "id": "c612dad6c6475190",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 1",
        "links": [
            "75f7a119d9a0bedf"
        ],
        "x": 1345,
        "y": 780,
        "wires": [
            [
                "f7acc57cb91f61de"
            ]
        ]
    },
    {
        "id": "c0dd1e684dd35483",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 2",
        "links": [
            "75f7a119d9a0bedf"
        ],
        "x": 1345,
        "y": 840,
        "wires": [
            [
                "637749560bd9f2fe"
            ]
        ]
    },
    {
        "id": "9b6cfdf6bc3339ec",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 3",
        "links": [
            "75f7a119d9a0bedf"
        ],
        "x": 1345,
        "y": 900,
        "wires": [
            [
                "8417da76e8e25804"
            ]
        ]
    },
    {
        "id": "9841de8eb0b73d37",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 4",
        "links": [
            "75f7a119d9a0bedf"
        ],
        "x": 1345,
        "y": 960,
        "wires": [
            [
                "3638b3485cc1753d"
            ]
        ]
    },
    {
        "id": "da503526fb545746",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "Inverter Display Message OUT switch",
        "mode": "link",
        "links": [
            "039fcd1c4aae0791",
            "4397e43ef6f1009f",
            "9a6e158b8c76a6a7",
            "9c0df487adad7a8e",
            "aab7d73e1ba2f5f0",
            "bb978618a716d1de",
            "e75c4580b30c7670",
            "ec74655c8d3bb932",
            "21a940032c087156",
            "8a2866501c0188d0"
        ],
        "x": 1155,
        "y": 40,
        "wires": []
    },
    {
        "id": "9c0df487adad7a8e",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 5",
        "links": [
            "da503526fb545746"
        ],
        "x": 1335,
        "y": 1280,
        "wires": [
            [
                "fd512253dea5a547"
            ]
        ]
    },
    {
        "id": "9a6e158b8c76a6a7",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 6",
        "links": [
            "da503526fb545746"
        ],
        "x": 1335,
        "y": 1400,
        "wires": [
            [
                "07c477d09d73a71f"
            ]
        ]
    },
    {
        "id": "e75c4580b30c7670",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 7",
        "links": [
            "da503526fb545746"
        ],
        "x": 1335,
        "y": 1460,
        "wires": [
            [
                "f2eb10293f4554a1"
            ]
        ]
    },
    {
        "id": "039fcd1c4aae0791",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 8",
        "links": [
            "da503526fb545746"
        ],
        "x": 1335,
        "y": 1520,
        "wires": [
            [
                "5c1041bec917129e"
            ]
        ]
    },
    {
        "id": "aab7d73e1ba2f5f0",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 9",
        "links": [
            "da503526fb545746"
        ],
        "x": 1335,
        "y": 1580,
        "wires": [
            [
                "6487c845f4618749"
            ]
        ]
    },
    {
        "id": "bb978618a716d1de",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 10",
        "links": [
            "da503526fb545746"
        ],
        "x": 1335,
        "y": 1640,
        "wires": [
            [
                "4b4d3c67967a49b4"
            ]
        ]
    },
    {
        "id": "4397e43ef6f1009f",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 11",
        "links": [
            "da503526fb545746"
        ],
        "x": 1335,
        "y": 1900,
        "wires": [
            [
                "a03a81e1a9ab72db"
            ]
        ]
    },
    {
        "id": "1ec4f8aaca6db9ba",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 12",
        "links": [
            "bd77f5329e2d6250"
        ],
        "x": 1335,
        "y": 1960,
        "wires": [
            [
                "57f172150e9c5fed"
            ]
        ]
    },
    {
        "id": "57738b4c171e83d8",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 13",
        "links": [
            "bd77f5329e2d6250"
        ],
        "x": 1335,
        "y": 2020,
        "wires": [
            [
                "d0b3044cc148e446"
            ]
        ]
    },
    {
        "id": "1e8d381868102386",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 14",
        "links": [
            "bd77f5329e2d6250"
        ],
        "x": 1335,
        "y": 2080,
        "wires": [
            [
                "f7012130d32eb648"
            ]
        ]
    },
    {
        "id": "3560e188c0ac7111",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 15",
        "links": [
            "bd77f5329e2d6250"
        ],
        "x": 1335,
        "y": 2140,
        "wires": [
            [
                "7387974de105a58a"
            ]
        ]
    },
    {
        "id": "b4f1d2578a5a68f4",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 16",
        "links": [
            "bd77f5329e2d6250"
        ],
        "x": 1335,
        "y": 2200,
        "wires": [
            [
                "8fb84e4df2896ee6"
            ]
        ]
    },
    {
        "id": "90658f7535383380",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 17",
        "links": [
            "bd77f5329e2d6250"
        ],
        "x": 1335,
        "y": 2260,
        "wires": [
            [
                "bfc84c6e4c69d370"
            ]
        ]
    },
    {
        "id": "80cfdfe0869810be",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 18",
        "links": [
            "bd77f5329e2d6250"
        ],
        "x": 1335,
        "y": 2320,
        "wires": [
            [
                "2f1a1677b0ef2f72"
            ]
        ]
    },
    {
        "id": "9d58fb8fa45279cd",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 19",
        "links": [
            "bd77f5329e2d6250"
        ],
        "x": 1335,
        "y": 2380,
        "wires": [
            [
                "761d1fc1cccc5dfd"
            ]
        ]
    },
    {
        "id": "bd77f5329e2d6250",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "PV Charger Display Message OUT switch",
        "mode": "link",
        "links": [
            "9d58fb8fa45279cd",
            "80cfdfe0869810be",
            "90658f7535383380",
            "b4f1d2578a5a68f4",
            "3560e188c0ac7111",
            "1e8d381868102386",
            "57738b4c171e83d8",
            "1ec4f8aaca6db9ba",
            "23382c3d489ef58d"
        ],
        "x": 1155,
        "y": 80,
        "wires": []
    },
    {
        "id": "23382c3d489ef58d",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 20",
        "links": [
            "bd77f5329e2d6250"
        ],
        "x": 1335,
        "y": 1340,
        "wires": [
            [
                "1efea9b74406ad7d"
            ]
        ]
    },
    {
        "id": "855a54ed43d76ce5",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "hodnota / 10 fix 2",
        "func": "var num = msg.payload[7];\nnum = num / 10;\nnum = (parseFloat(num)).toFixed(2);\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 1700,
        "wires": [
            [
                "a1eaf4343259981f"
            ]
        ]
    },
    {
        "id": "ec74655c8d3bb932",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 21",
        "links": [
            "da503526fb545746"
        ],
        "x": 1335,
        "y": 1700,
        "wires": [
            [
                "855a54ed43d76ce5"
            ]
        ]
    },
    {
        "id": "a1eaf4343259981f",
        "type": "ui_text",
        "z": "f68b8258b4fd501c",
        "group": "01f0a60623d9c6c4",
        "order": 16,
        "width": 4,
        "height": 1,
        "name": "BUS Napětí",
        "label": "BUS:",
        "format": "{{value}} V",
        "layout": "col-center",
        "className": "",
        "x": 1670,
        "y": 1700,
        "wires": []
    },
    {
        "id": "cf44d88b8b71260e",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "hodnota / 100 fix 2",
        "func": "var num = msg.payload[25];\nnum = num / 100;\nnum = (parseFloat(num)).toFixed(2);\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 1760,
        "wires": [
            [
                "15a41e75acae19e9"
            ]
        ]
    },
    {
        "id": "21a940032c087156",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 22",
        "links": [
            "da503526fb545746"
        ],
        "x": 1335,
        "y": 1760,
        "wires": [
            [
                "cf44d88b8b71260e"
            ]
        ]
    },
    {
        "id": "15a41e75acae19e9",
        "type": "ui_text",
        "z": "f68b8258b4fd501c",
        "group": "01f0a60623d9c6c4",
        "order": 11,
        "width": 4,
        "height": 1,
        "name": "Kmitočet DS",
        "label": "Kmitočet",
        "format": "{{value}} Hz",
        "layout": "col-center",
        "className": "",
        "x": 1670,
        "y": 1760,
        "wires": []
    },
    {
        "id": "0a22718011419e69",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "hodnota / 100  fix 2",
        "func": "var num = msg.payload[24];\nnum = num / 100;\nnum = (parseFloat(num)).toFixed(2);\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 1820,
        "wires": [
            [
                "480ad3bfaa14ec34"
            ]
        ]
    },
    {
        "id": "8a2866501c0188d0",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 23",
        "links": [
            "da503526fb545746"
        ],
        "x": 1335,
        "y": 1820,
        "wires": [
            [
                "0a22718011419e69"
            ]
        ]
    },
    {
        "id": "480ad3bfaa14ec34",
        "type": "ui_text",
        "z": "f68b8258b4fd501c",
        "group": "01f0a60623d9c6c4",
        "order": 12,
        "width": 4,
        "height": 1,
        "name": "Kmitočet invertor",
        "label": "Kmitočet",
        "format": "{{value}} Hz",
        "layout": "col-center",
        "className": "",
        "x": 1690,
        "y": 1820,
        "wires": []
    },
    {
        "id": "14da0bf068e7f03d",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Read Battery stop discharging voltage",
        "func": "var num = msg.payload[17];\nnum = num / 10;\nnum = (parseFloat(num)).toFixed(2);\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1530,
        "y": 320,
        "wires": [
            [
                "5b7948e1f3041f54"
            ]
        ]
    },
    {
        "id": "5b7948e1f3041f54",
        "type": "ui_numeric",
        "z": "f68b8258b4fd501c",
        "name": "",
        "label": "Stop discharging: (20)",
        "tooltip": "Přepnutí na ByPass",
        "group": "8da71f487df38098",
        "order": 12,
        "width": 0,
        "height": 0,
        "wrap": false,
        "passthru": true,
        "topic": "topic",
        "topicType": "msg",
        "format": "{{value}} V",
        "min": "24",
        "max": "29.2",
        "step": "0.1",
        "className": "",
        "x": 1960,
        "y": 320,
        "wires": [
            [
                "dd92ac1d35b54411"
            ]
        ]
    },
    {
        "id": "dd92ac1d35b54411",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "write Battery stop discharging voltage",
        "func": "var num = msg.payload;\nnum = num * 10;\nnum = (parseInt(num));\nmsg.payload = { \"value\": num, \"fc\": 6, \"unitid\": 4, \"address\": 20118, \"quantity\": 1 };\nmsg.topic = \"Battery stop discharging voltage\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2230,
        "y": 320,
        "wires": [
            [
                "468c303794f04636"
            ]
        ]
    },
    {
        "id": "f28bd904b827fd3f",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Read Battery stop charging voltage",
        "func": "var num = msg.payload[18];\nnum = num / 10;\nnum = (parseFloat(num)).toFixed(2);\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1520,
        "y": 380,
        "wires": [
            [
                "b8417ad70c1c6548"
            ]
        ]
    },
    {
        "id": "b8417ad70c1c6548",
        "type": "ui_numeric",
        "z": "f68b8258b4fd501c",
        "name": "",
        "label": "Stop charging: (21)",
        "tooltip": "Vypnutí při nabíjení ze sítě.",
        "group": "8da71f487df38098",
        "order": 13,
        "width": 0,
        "height": 0,
        "wrap": false,
        "passthru": true,
        "topic": "topic",
        "topicType": "msg",
        "format": "{{value}} V",
        "min": "24",
        "max": "29.2",
        "step": "0.1",
        "className": "",
        "x": 1950,
        "y": 380,
        "wires": [
            [
                "d0760f23e884e8ef"
            ]
        ]
    },
    {
        "id": "d0760f23e884e8ef",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "write Battery stop charging voltage",
        "func": "var num = msg.payload;\nnum = num * 10;\nnum = (parseInt(num));\nmsg.payload = { \"value\": num, \"fc\": 6, \"unitid\": 4, \"address\": 20119, \"quantity\": 1 };\nmsg.topic = \"Battery stop charging voltage\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2240,
        "y": 380,
        "wires": [
            [
                "468c303794f04636"
            ]
        ]
    },
    {
        "id": "8d7f6d7bc45c0274",
        "type": "link out",
        "z": "f68b8258b4fd501c",
        "name": "lInverter Control Message switch",
        "mode": "link",
        "links": [
            "49832e0b08cfd75e",
            "60b9d77b1d1f121b",
            "4d76864daa75f868",
            "afd664b88f3a6dd0",
            "75dc33359c408d5c",
            "83ca0cd4e97c22a4",
            "56e0e4c9153e6f19",
            "143a733bbfe996fb"
        ],
        "x": 1155,
        "y": 120,
        "wires": []
    },
    {
        "id": "75dc33359c408d5c",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 24",
        "links": [
            "8d7f6d7bc45c0274"
        ],
        "x": 1345,
        "y": 140,
        "wires": [
            [
                "8088915919a78535"
            ]
        ]
    },
    {
        "id": "afd664b88f3a6dd0",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 25",
        "links": [
            "8d7f6d7bc45c0274"
        ],
        "x": 1345,
        "y": 200,
        "wires": [
            [
                "a2fac952882896c2"
            ]
        ]
    },
    {
        "id": "4d76864daa75f868",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 26",
        "links": [
            "8d7f6d7bc45c0274"
        ],
        "x": 1345,
        "y": 260,
        "wires": [
            [
                "79e34e3439c5b242"
            ]
        ]
    },
    {
        "id": "60b9d77b1d1f121b",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 27",
        "links": [
            "8d7f6d7bc45c0274"
        ],
        "x": 1345,
        "y": 320,
        "wires": [
            [
                "14da0bf068e7f03d"
            ]
        ]
    },
    {
        "id": "49832e0b08cfd75e",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 28",
        "links": [
            "8d7f6d7bc45c0274"
        ],
        "x": 1345,
        "y": 380,
        "wires": [
            [
                "f28bd904b827fd3f"
            ]
        ]
    },
    {
        "id": "830f32a69792f5e0",
        "type": "inject",
        "z": "f68b8258b4fd501c",
        "name": "Read 25201 +78 Inverter Display Message",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "5",
        "crontab": "",
        "once": true,
        "onceDelay": "1",
        "topic": "Inverter Display Message",
        "payload": "{\"value\":0,\"fc\":3,\"unitid\":4,\"address\":25201,\"quantity\":78}",
        "payloadType": "json",
        "x": 210,
        "y": 580,
        "wires": [
            [
                "8bb39a9f59c20fc1"
            ]
        ]
    },
    {
        "id": "d5b4d0451385ce6e",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Write Float Voltage",
        "func": "var num = msg.payload;\nnum = num * 10;\nmsg.payload = { \"value\": num, \"fc\": 6, \"unitid\": 4, \"address\": 10103, \"quantity\": 1 }; \nmsg.topic = \"Float\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2050,
        "y": 840,
        "wires": [
            [
                "468c303794f04636"
            ]
        ]
    },
    {
        "id": "13f4fc26bc4c2ce0",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Write Absorp Voltage",
        "func": "var num = msg.payload;\nnum = num * 10;\nmsg.payload = { \"value\": num, \"fc\": 6, \"unitid\": 4, \"address\": 10104, \"quantity\": 1 }; \nmsg.topic = \"Absorp\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2040,
        "y": 900,
        "wires": [
            [
                "468c303794f04636"
            ]
        ]
    },
    {
        "id": "24c38bbf076efecc",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Write Kapacita",
        "func": "var num = msg.payload;\nnum = num * 10;\nmsg.payload = { \"value\": num, \"fc\": 6, \"unitid\": 4, \"address\": 10111, \"quantity\": 1 }; \nmsg.topic = \"Kapacita\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2060,
        "y": 960,
        "wires": [
            [
                "468c303794f04636"
            ]
        ]
    },
    {
        "id": "ce2251b5aab0eae5",
        "type": "comment",
        "z": "f68b8258b4fd501c",
        "name": "Nastavení dat invertoru",
        "info": "",
        "x": 1420,
        "y": 60,
        "wires": []
    },
    {
        "id": "ffad4c7aa295ab60",
        "type": "ui_dropdown",
        "z": "f68b8258b4fd501c",
        "name": "LBU/BLU",
        "label": "SolarUse Aim: (05)",
        "tooltip": "",
        "place": "",
        "group": "8da71f487df38098",
        "order": 5,
        "width": 0,
        "height": 0,
        "passthru": true,
        "multiple": false,
        "options": [
            {
                "label": "LBU",
                "value": 0,
                "type": "num"
            },
            {
                "label": "BLU",
                "value": 1,
                "type": "num"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 1920,
        "y": 440,
        "wires": [
            [
                "5a52d7799d03d66a"
            ]
        ]
    },
    {
        "id": "5a52d7799d03d66a",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "SolarUse Aim",
        "func": "if (msg.payload == 0) msg.payload = { \"value\": 0, \"fc\": 6, \"unitid\": 4, \"address\": 20112, \"quantity\": 1 };\nif (msg.payload == 1) msg.payload = { \"value\": 1, \"fc\": 6, \"unitid\": 4, \"address\": 20112, \"quantity\": 1 };\nmsg.topic = \"LBU/BLU\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2300,
        "y": 440,
        "wires": [
            [
                "468c303794f04636"
            ]
        ]
    },
    {
        "id": "f524b895c1767acc",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Read SolarUse Aim",
        "func": "var num = msg.payload[11];\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1470,
        "y": 440,
        "wires": [
            [
                "ffad4c7aa295ab60"
            ]
        ]
    },
    {
        "id": "83ca0cd4e97c22a4",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 29",
        "links": [
            "8d7f6d7bc45c0274"
        ],
        "x": 1345,
        "y": 440,
        "wires": [
            [
                "f524b895c1767acc"
            ]
        ]
    },
    {
        "id": "239bcfaa4b0c2040",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Read Max Combine charger current",
        "func": "var num = msg.payload[31];\nnum = num / 10;\nnum = (parseFloat(num)).toFixed(2);\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1520,
        "y": 500,
        "wires": [
            [
                "4d4668f30e05d337"
            ]
        ]
    },
    {
        "id": "4d4668f30e05d337",
        "type": "ui_numeric",
        "z": "f68b8258b4fd501c",
        "name": "",
        "label": "Max Combine charger current: (11)",
        "tooltip": "Maximální nabíjecí proud.",
        "group": "8da71f487df38098",
        "order": 9,
        "width": 0,
        "height": 0,
        "wrap": false,
        "passthru": true,
        "topic": "topic",
        "topicType": "msg",
        "format": "{{value}} A",
        "min": "1",
        "max": "80",
        "step": "1",
        "className": "",
        "x": 1940,
        "y": 500,
        "wires": [
            [
                "348284589bbf5f55"
            ]
        ]
    },
    {
        "id": "348284589bbf5f55",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "write Max Combine charger current",
        "func": "var num = msg.payload;\nnum = num * 10;\nnum = (parseInt(num));\nmsg.payload = { \"value\": num, \"fc\": 6, \"unitid\": 4, \"address\": 20132, \"quantity\": 1 };\nmsg.topic = \"Max Combine charger current\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2240,
        "y": 500,
        "wires": [
            [
                "468c303794f04636"
            ]
        ]
    },
    {
        "id": "56e0e4c9153e6f19",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 30",
        "links": [
            "8d7f6d7bc45c0274"
        ],
        "x": 1345,
        "y": 500,
        "wires": [
            [
                "239bcfaa4b0c2040"
            ]
        ]
    },
    {
        "id": "4b86d2bb0638ed2f",
        "type": "comment",
        "z": "f68b8258b4fd501c",
        "name": "Nastavení dat MPPT",
        "info": "",
        "x": 1410,
        "y": 700,
        "wires": []
    },
    {
        "id": "9b2e6e0218841e6e",
        "type": "ui_dropdown",
        "z": "f68b8258b4fd501c",
        "name": "Režim SBD/SBE",
        "label": "Solar power balance: (28)",
        "tooltip": "Vyrovnání solárního výkonu.",
        "place": "",
        "group": "8da71f487df38098",
        "order": 8,
        "width": 0,
        "height": 0,
        "passthru": true,
        "multiple": false,
        "options": [
            {
                "label": "SBD",
                "value": 0,
                "type": "num"
            },
            {
                "label": "SBE",
                "value": 1,
                "type": "num"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 1950,
        "y": 560,
        "wires": [
            [
                "ca33ba24f1257cb8"
            ]
        ]
    },
    {
        "id": "ca33ba24f1257cb8",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Write Solar power balance",
        "func": "if (msg.payload == 0) msg.payload = { \"value\": 0, \"fc\": 6, \"unitid\": 4, \"address\": 20144, \"quantity\": 1 };\nif (msg.payload == 1) msg.payload = { \"value\": 1, \"fc\": 6, \"unitid\": 4, \"address\": 20144, \"quantity\": 1 };\nmsg.topic = \"Solar power balance\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2260,
        "y": 560,
        "wires": [
            [
                "468c303794f04636"
            ]
        ]
    },
    {
        "id": "42f7542abf61968f",
        "type": "function",
        "z": "f68b8258b4fd501c",
        "name": "Read Solar power balance",
        "func": "var num = msg.payload[43];\nmsg.payload = num; \nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1500,
        "y": 560,
        "wires": [
            [
                "9b2e6e0218841e6e"
            ]
        ]
    },
    {
        "id": "143a733bbfe996fb",
        "type": "link in",
        "z": "f68b8258b4fd501c",
        "name": "link in 31",
        "links": [
            "8d7f6d7bc45c0274"
        ],
        "x": 1345,
        "y": 560,
        "wires": [
            [
                "42f7542abf61968f"
            ]
        ]
    },
    {
        "id": "a8ce3b6ce4623f88",
        "type": "change",
        "z": "f68b8258b4fd501c",
        "name": "Povolen zápis",
        "rules": [
            {
                "t": "set",
                "p": "zapis",
                "pt": "flow",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1100,
        "y": 520,
        "wires": [
            []
        ]
    },
    {
        "id": "1afc880cde5ad25e",
        "type": "ui_switch",
        "z": "f68b8258b4fd501c",
        "name": "",
        "label": "Povolit zápis hodnot na 15 min.",
        "tooltip": "Povolí zapisovat hodnoty po dobu 15 minut.",
        "group": "8da71f487df38098",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "topic",
        "topicType": "msg",
        "style": "",
        "onvalue": "true",
        "onvalueType": "bool",
        "onicon": "",
        "oncolor": "",
        "offvalue": "false",
        "offvalueType": "bool",
        "officon": "",
        "offcolor": "",
        "animate": false,
        "className": "",
        "x": 870,
        "y": 520,
        "wires": [
            [
                "a8ce3b6ce4623f88"
            ]
        ]
    },
    {
        "id": "c4488e3aeff15529",
        "type": "inject",
        "z": "f68b8258b4fd501c",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "900",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "false",
        "payloadType": "bool",
        "x": 650,
        "y": 520,
        "wires": [
            [
                "1afc880cde5ad25e"
            ]
        ]
    },
    {
        "id": "1980f1c99bb60c6f",
        "type": "switch",
        "z": "f68b8258b4fd501c",
        "name": "Povolen zapis",
        "property": "zapis",
        "propertyType": "flow",
        "rules": [
            {
                "t": "true"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 2740,
        "y": 600,
        "wires": [
            [
                "4e28d380b4c0c0a6"
            ]
        ]
    },
    {
        "id": "468c303794f04636",
        "type": "rbe",
        "z": "f68b8258b4fd501c",
        "name": "",
        "func": "rbe",
        "gap": "",
        "start": "",
        "inout": "out",
        "septopics": true,
        "property": "payload",
        "topi": "topic",
        "x": 2590,
        "y": 600,
        "wires": [
            [
                "1980f1c99bb60c6f"
            ]
        ]
    },
    {
        "id": "f55fb3bc015978bd",
        "type": "comment",
        "z": "f68b8258b4fd501c",
        "name": "Povolení zapisovat 15minut",
        "info": "",
        "x": 700,
        "y": 460,
        "wires": []
    }
]