Advertisement
enoch85

Untitled

Apr 15th, 2024
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 56.26 KB | None | 0 0
  1. [
  2.     {
  3.         "id": "47c37038d8e6b38f",
  4.         "type": "tab",
  5.         "label": "Fronius SUMMER",
  6.         "disabled": false,
  7.         "info": "",
  8.         "env": []
  9.     },
  10.     {
  11.         "id": "b2e20cf42352b88d",
  12.         "type": "group",
  13.         "z": "47c37038d8e6b38f",
  14.         "name": "BATTERY INSTRUCTIONS",
  15.         "style": {
  16.             "label": true,
  17.             "color": "#000000"
  18.         },
  19.         "nodes": [
  20.             "3e09d4ced3c86e35",
  21.             "7d8bdc5cb7c4d4f7",
  22.             "ed43f93d33a1a59a",
  23.             "59fc0e24e725529f",
  24.             "345cde89d835a024"
  25.         ],
  26.         "x": 1768,
  27.         "y": 213,
  28.         "w": 604,
  29.         "h": 654
  30.     },
  31.     {
  32.         "id": "67efc426c44adbea",
  33.         "type": "group",
  34.         "z": "47c37038d8e6b38f",
  35.         "name": "Write changes!",
  36.         "style": {
  37.             "label": true
  38.         },
  39.         "nodes": [
  40.             "25a16cd6e093f0db",
  41.             "3bc045cab0462f7b",
  42.             "390c78de6c45fd57",
  43.             "2d46f5f9c7a1342b"
  44.         ],
  45.         "x": 2894,
  46.         "y": 459,
  47.         "w": 672,
  48.         "h": 122
  49.     },
  50.     {
  51.         "id": "14db1722437b2f45",
  52.         "type": "group",
  53.         "z": "47c37038d8e6b38f",
  54.         "name": "Payload",
  55.         "style": {
  56.             "label": true
  57.         },
  58.         "nodes": [
  59.             "a587bcbe10cdf408"
  60.         ],
  61.         "x": 2554,
  62.         "y": 479,
  63.         "w": 292,
  64.         "h": 82
  65.     },
  66.     {
  67.         "id": "5dd4d8970b5dee27",
  68.         "type": "group",
  69.         "z": "47c37038d8e6b38f",
  70.         "name": "Button Control",
  71.         "style": {
  72.             "label": true,
  73.             "stroke": "#6f2fa0",
  74.             "color": "#000000"
  75.         },
  76.         "nodes": [
  77.             "dd9f9685c127cba6",
  78.             "0b27733ee1db73bb",
  79.             "c5550666ff48ba7d",
  80.             "0293a376a3c3bb7c"
  81.         ],
  82.         "x": 1214,
  83.         "y": 19,
  84.         "w": 252,
  85.         "h": 262
  86.     },
  87.     {
  88.         "id": "b30643153aa103b4",
  89.         "type": "group",
  90.         "z": "47c37038d8e6b38f",
  91.         "name": "Check spot price to calculate peaks",
  92.         "style": {
  93.             "label": true,
  94.             "color": "#000000"
  95.         },
  96.         "nodes": [
  97.             "b56f8e6c6944d662",
  98.             "50508e8af901cb3a",
  99.             "eaaabeb6bad78922",
  100.             "5ead91b698452d8f",
  101.             "40a4842216e82a10",
  102.             "15c0cd46d14ef0b7",
  103.             "331a81ba20be90fb",
  104.             "18654bf66cea722f"
  105.         ],
  106.         "x": 34,
  107.         "y": 19,
  108.         "w": 1152,
  109.         "h": 162
  110.     },
  111.     {
  112.         "id": "b34a02d6a2c8600a",
  113.         "type": "group",
  114.         "z": "47c37038d8e6b38f",
  115.         "name": "HOLD when car starts charging",
  116.         "style": {
  117.             "label": true,
  118.             "color": "#000000"
  119.         },
  120.         "nodes": [
  121.             "c2d4e209bff436d0",
  122.             "20159cd45f63a4cd"
  123.         ],
  124.         "x": 34,
  125.         "y": 219,
  126.         "w": 252,
  127.         "h": 142
  128.     },
  129.     {
  130.         "id": "e2696b5907bf6134",
  131.         "type": "group",
  132.         "z": "47c37038d8e6b38f",
  133.         "name": "Set to NORMAL at 7:00",
  134.         "style": {
  135.             "label": true,
  136.             "color": "#000000"
  137.         },
  138.         "nodes": [
  139.             "d7ac8cb75a6aab74"
  140.         ],
  141.         "x": 34,
  142.         "y": 399,
  143.         "w": 172,
  144.         "h": 82
  145.     },
  146.     {
  147.         "id": "55721850c1a5939a",
  148.         "type": "group",
  149.         "z": "47c37038d8e6b38f",
  150.         "name": "Always MAX DISCHARGE at peak",
  151.         "style": {
  152.             "label": true,
  153.             "color": "#000000"
  154.         },
  155.         "nodes": [
  156.             "6d064d5adb076b40",
  157.             "a46cb0f964de6dcb"
  158.         ],
  159.         "x": 34,
  160.         "y": 639,
  161.         "w": 572,
  162.         "h": 82
  163.     },
  164.     {
  165.         "id": "f1528564d3315165",
  166.         "type": "group",
  167.         "z": "47c37038d8e6b38f",
  168.         "name": "Charge car when sun shines!",
  169.         "style": {
  170.             "label": true,
  171.             "color": "#000000"
  172.         },
  173.         "nodes": [
  174.             "08de5d47e1f5caf0",
  175.             "7a43ec058f0d0270",
  176.             "8dac98ce780f4e23",
  177.             "97c75b49241005da",
  178.             "c0443c2d56c691d9",
  179.             "642712c63c88ecfb",
  180.             "32a6e8cc398a5b2f",
  181.             "6663f4c6f6b2c347"
  182.         ],
  183.         "x": 34,
  184.         "y": 839,
  185.         "w": 1192,
  186.         "h": 362
  187.     },
  188.     {
  189.         "id": "0ee20f2b17f69cb2",
  190.         "type": "group",
  191.         "z": "47c37038d8e6b38f",
  192.         "name": "CHARGE battery when -10 öre",
  193.         "style": {
  194.             "label": true,
  195.             "color": "#000000"
  196.         },
  197.         "nodes": [
  198.             "dd53cadf8f79b275",
  199.             "c4bc4f515dd2fe23"
  200.         ],
  201.         "x": 34,
  202.         "y": 519,
  203.         "w": 592,
  204.         "h": 82
  205.     },
  206.     {
  207.         "id": "3e09d4ced3c86e35",
  208.         "type": "group",
  209.         "z": "47c37038d8e6b38f",
  210.         "g": "b2e20cf42352b88d",
  211.         "name": "NORMAL",
  212.         "style": {
  213.             "label": true,
  214.             "color": "#000000"
  215.         },
  216.         "nodes": [
  217.             "e6a78ae366723d0d",
  218.             "a0ef05d4128e01be"
  219.         ],
  220.         "x": 1794,
  221.         "y": 339,
  222.         "w": 492,
  223.         "h": 82
  224.     },
  225.     {
  226.         "id": "7d8bdc5cb7c4d4f7",
  227.         "type": "group",
  228.         "z": "47c37038d8e6b38f",
  229.         "g": "b2e20cf42352b88d",
  230.         "name": "FORCED CHARGE",
  231.         "style": {
  232.             "label": true,
  233.             "color": "#000000"
  234.         },
  235.         "nodes": [
  236.             "c630c2b9bd8f82a5",
  237.             "bc3f2932aa99de20",
  238.             "3b351859da7be34c",
  239.             "4e7ce73d4b6ddbbc"
  240.         ],
  241.         "x": 1794,
  242.         "y": 439,
  243.         "w": 492,
  244.         "h": 142
  245.     },
  246.     {
  247.         "id": "ed43f93d33a1a59a",
  248.         "type": "group",
  249.         "z": "47c37038d8e6b38f",
  250.         "g": "b2e20cf42352b88d",
  251.         "name": "HOLD (No charge or discharge)",
  252.         "style": {
  253.             "label": true,
  254.             "color": "#000000"
  255.         },
  256.         "nodes": [
  257.             "f303013a077c1088",
  258.             "4e5a5cb3ec4da8b3"
  259.         ],
  260.         "x": 1794,
  261.         "y": 599,
  262.         "w": 492,
  263.         "h": 82
  264.     },
  265.     {
  266.         "id": "59fc0e24e725529f",
  267.         "type": "group",
  268.         "z": "47c37038d8e6b38f",
  269.         "g": "b2e20cf42352b88d",
  270.         "name": "FORCED DISCHARGE",
  271.         "style": {
  272.             "label": true,
  273.             "color": "#000000"
  274.         },
  275.         "nodes": [
  276.             "c60dff6c3c0eea08",
  277.             "e7ac98d6df188867",
  278.             "74921ce4ba346873",
  279.             "29c0e0b7e7356e23"
  280.         ],
  281.         "x": 1794,
  282.         "y": 699,
  283.         "w": 492,
  284.         "h": 142
  285.     },
  286.     {
  287.         "id": "345cde89d835a024",
  288.         "type": "group",
  289.         "z": "47c37038d8e6b38f",
  290.         "g": "b2e20cf42352b88d",
  291.         "name": "POWER FROM SUN",
  292.         "style": {
  293.             "label": true,
  294.             "color": "#000000"
  295.         },
  296.         "nodes": [
  297.             "783a661dd9e50fd6",
  298.             "d4028f5212870a32"
  299.         ],
  300.         "x": 1794,
  301.         "y": 239,
  302.         "w": 552,
  303.         "h": 82
  304.     },
  305.     {
  306.         "id": "474f0e386faff0e9",
  307.         "type": "junction",
  308.         "z": "47c37038d8e6b38f",
  309.         "x": 900,
  310.         "y": 340,
  311.         "wires": [
  312.             [
  313.                 "d4028f5212870a32"
  314.             ]
  315.         ]
  316.     },
  317.     {
  318.         "id": "c2d4e209bff436d0",
  319.         "type": "ha-time",
  320.         "z": "47c37038d8e6b38f",
  321.         "g": "b34a02d6a2c8600a",
  322.         "name": "TESLA START (NOW)",
  323.         "server": "afa7e6c.89d5e18",
  324.         "version": 3,
  325.         "exposeAsEntityConfig": "",
  326.         "entityId": "sensor.tesla_start_charging_time",
  327.         "property": "",
  328.         "offset": "",
  329.         "offsetType": "num",
  330.         "offsetUnits": "hours",
  331.         "randomOffset": false,
  332.         "repeatDaily": false,
  333.         "outputProperties": [
  334.             {
  335.                 "property": "payload",
  336.                 "propertyType": "msg",
  337.                 "value": "",
  338.                 "valueType": "entityState"
  339.             },
  340.             {
  341.                 "property": "data",
  342.                 "propertyType": "msg",
  343.                 "value": "",
  344.                 "valueType": "entity"
  345.             },
  346.             {
  347.                 "property": "topic",
  348.                 "propertyType": "msg",
  349.                 "value": "",
  350.                 "valueType": "triggerId"
  351.             }
  352.         ],
  353.         "sunday": true,
  354.         "monday": true,
  355.         "tuesday": true,
  356.         "wednesday": true,
  357.         "thursday": true,
  358.         "friday": true,
  359.         "saturday": true,
  360.         "x": 160,
  361.         "y": 320,
  362.         "wires": [
  363.             [
  364.                 "474f0e386faff0e9"
  365.             ]
  366.         ]
  367.     },
  368.     {
  369.         "id": "77abacd4f5281849",
  370.         "type": "debug",
  371.         "z": "47c37038d8e6b38f",
  372.         "name": "IS SOMETHING WRITTEN?",
  373.         "active": true,
  374.         "tosidebar": true,
  375.         "console": true,
  376.         "tostatus": true,
  377.         "complete": "payload",
  378.         "targetType": "msg",
  379.         "statusVal": "payload",
  380.         "statusType": "auto",
  381.         "x": 3190,
  382.         "y": 660,
  383.         "wires": []
  384.     },
  385.     {
  386.         "id": "3263280189b95907",
  387.         "type": "inject",
  388.         "z": "47c37038d8e6b38f",
  389.         "name": "",
  390.         "props": [
  391.             {
  392.                 "p": "payload"
  393.             },
  394.             {
  395.                 "p": "topic",
  396.                 "vt": "str"
  397.             }
  398.         ],
  399.         "repeat": "",
  400.         "crontab": "",
  401.         "once": false,
  402.         "onceDelay": 0.1,
  403.         "topic": "",
  404.         "payload": "",
  405.         "payloadType": "date",
  406.         "x": 2960,
  407.         "y": 660,
  408.         "wires": [
  409.             [
  410.                 "77abacd4f5281849"
  411.             ]
  412.         ]
  413.     },
  414.     {
  415.         "id": "20159cd45f63a4cd",
  416.         "type": "ha-time",
  417.         "z": "47c37038d8e6b38f",
  418.         "g": "b34a02d6a2c8600a",
  419.         "name": "VW START (NOW)",
  420.         "server": "afa7e6c.89d5e18",
  421.         "version": 3,
  422.         "exposeAsEntityConfig": "",
  423.         "entityId": "sensor.volkswagen_start_charging_time",
  424.         "property": "",
  425.         "offset": "10",
  426.         "offsetType": "num",
  427.         "offsetUnits": "seconds",
  428.         "randomOffset": false,
  429.         "repeatDaily": false,
  430.         "outputProperties": [
  431.             {
  432.                 "property": "payload",
  433.                 "propertyType": "msg",
  434.                 "value": "",
  435.                 "valueType": "entityState"
  436.             },
  437.             {
  438.                 "property": "data",
  439.                 "propertyType": "msg",
  440.                 "value": "",
  441.                 "valueType": "entity"
  442.             },
  443.             {
  444.                 "property": "topic",
  445.                 "propertyType": "msg",
  446.                 "value": "",
  447.                 "valueType": "triggerId"
  448.             }
  449.         ],
  450.         "sunday": true,
  451.         "monday": true,
  452.         "tuesday": true,
  453.         "wednesday": true,
  454.         "thursday": true,
  455.         "friday": true,
  456.         "saturday": true,
  457.         "x": 150,
  458.         "y": 260,
  459.         "wires": [
  460.             [
  461.                 "474f0e386faff0e9"
  462.             ]
  463.         ]
  464.     },
  465.     {
  466.         "id": "a46cb0f964de6dcb",
  467.         "type": "ha-time",
  468.         "z": "47c37038d8e6b38f",
  469.         "g": "55721850c1a5939a",
  470.         "name": "MAX DISCHARGE @ PEAK",
  471.         "server": "afa7e6c.89d5e18",
  472.         "version": 3,
  473.         "exposeAsEntityConfig": "",
  474.         "entityId": "sensor.peak_48_hours_time",
  475.         "property": "",
  476.         "offset": "2",
  477.         "offsetType": "num",
  478.         "offsetUnits": "minutes",
  479.         "randomOffset": false,
  480.         "repeatDaily": false,
  481.         "outputProperties": [
  482.             {
  483.                 "property": "payload",
  484.                 "propertyType": "msg",
  485.                 "value": "",
  486.                 "valueType": "entityState"
  487.             },
  488.             {
  489.                 "property": "data",
  490.                 "propertyType": "msg",
  491.                 "value": "",
  492.                 "valueType": "entity"
  493.             },
  494.             {
  495.                 "property": "topic",
  496.                 "propertyType": "msg",
  497.                 "value": "",
  498.                 "valueType": "triggerId"
  499.             }
  500.         ],
  501.         "sunday": true,
  502.         "monday": true,
  503.         "tuesday": true,
  504.         "wednesday": true,
  505.         "thursday": true,
  506.         "friday": true,
  507.         "saturday": true,
  508.         "x": 180,
  509.         "y": 680,
  510.         "wires": [
  511.             [
  512.                 "6d064d5adb076b40"
  513.             ]
  514.         ]
  515.     },
  516.     {
  517.         "id": "6d064d5adb076b40",
  518.         "type": "api-current-state",
  519.         "z": "47c37038d8e6b38f",
  520.         "g": "55721850c1a5939a",
  521.         "name": "PEAK PRICE (max_peak)",
  522.         "server": "afa7e6c.89d5e18",
  523.         "version": 3,
  524.         "outputs": 2,
  525.         "halt_if": "max_peak",
  526.         "halt_if_type": "flow",
  527.         "halt_if_compare": "gt",
  528.         "entity_id": "sensor.peak_48_hours_price",
  529.         "state_type": "str",
  530.         "blockInputOverrides": false,
  531.         "outputProperties": [
  532.             {
  533.                 "property": "payload",
  534.                 "propertyType": "msg",
  535.                 "value": "",
  536.                 "valueType": "entityState"
  537.             },
  538.             {
  539.                 "property": "data",
  540.                 "propertyType": "msg",
  541.                 "value": "",
  542.                 "valueType": "entity"
  543.             }
  544.         ],
  545.         "for": "0",
  546.         "forType": "num",
  547.         "forUnits": "minutes",
  548.         "override_topic": false,
  549.         "state_location": "payload",
  550.         "override_payload": "msg",
  551.         "entity_location": "data",
  552.         "override_data": "msg",
  553.         "x": 470,
  554.         "y": 680,
  555.         "wires": [
  556.             [],
  557.             [
  558.                 "29c0e0b7e7356e23"
  559.             ]
  560.         ]
  561.     },
  562.     {
  563.         "id": "b56f8e6c6944d662",
  564.         "type": "ha-time",
  565.         "z": "47c37038d8e6b38f",
  566.         "g": "b30643153aa103b4",
  567.         "name": "TESLA START +1H",
  568.         "server": "afa7e6c.89d5e18",
  569.         "version": 3,
  570.         "exposeAsEntityConfig": "",
  571.         "entityId": "sensor.tesla_start_charging_time",
  572.         "property": "",
  573.         "offset": "61",
  574.         "offsetType": "num",
  575.         "offsetUnits": "minutes",
  576.         "randomOffset": false,
  577.         "repeatDaily": false,
  578.         "outputProperties": [
  579.             {
  580.                 "property": "payload",
  581.                 "propertyType": "msg",
  582.                 "value": "",
  583.                 "valueType": "entityState"
  584.             },
  585.             {
  586.                 "property": "data",
  587.                 "propertyType": "msg",
  588.                 "value": "",
  589.                 "valueType": "entity"
  590.             },
  591.             {
  592.                 "property": "topic",
  593.                 "propertyType": "msg",
  594.                 "value": "",
  595.                 "valueType": "triggerId"
  596.             }
  597.         ],
  598.         "sunday": true,
  599.         "monday": true,
  600.         "tuesday": true,
  601.         "wednesday": true,
  602.         "thursday": true,
  603.         "friday": true,
  604.         "saturday": true,
  605.         "x": 150,
  606.         "y": 140,
  607.         "wires": [
  608.             [
  609.                 "eaaabeb6bad78922"
  610.             ]
  611.         ]
  612.     },
  613.     {
  614.         "id": "50508e8af901cb3a",
  615.         "type": "ha-time",
  616.         "z": "47c37038d8e6b38f",
  617.         "g": "b30643153aa103b4",
  618.         "name": "VW START +1H",
  619.         "server": "afa7e6c.89d5e18",
  620.         "version": 3,
  621.         "exposeAsEntityConfig": "",
  622.         "entityId": "sensor.volkswagen_start_charging_time",
  623.         "property": "",
  624.         "offset": "61",
  625.         "offsetType": "num",
  626.         "offsetUnits": "minutes",
  627.         "randomOffset": false,
  628.         "repeatDaily": false,
  629.         "outputProperties": [
  630.             {
  631.                 "property": "payload",
  632.                 "propertyType": "msg",
  633.                 "value": "",
  634.                 "valueType": "entityState"
  635.             },
  636.             {
  637.                 "property": "data",
  638.                 "propertyType": "msg",
  639.                 "value": "",
  640.                 "valueType": "entity"
  641.             },
  642.             {
  643.                 "property": "topic",
  644.                 "propertyType": "msg",
  645.                 "value": "",
  646.                 "valueType": "triggerId"
  647.             }
  648.         ],
  649.         "sunday": true,
  650.         "monday": true,
  651.         "tuesday": true,
  652.         "wednesday": true,
  653.         "thursday": true,
  654.         "friday": true,
  655.         "saturday": true,
  656.         "x": 140,
  657.         "y": 80,
  658.         "wires": [
  659.             [
  660.                 "eaaabeb6bad78922"
  661.             ]
  662.         ]
  663.     },
  664.     {
  665.         "id": "e6a78ae366723d0d",
  666.         "type": "function",
  667.         "z": "47c37038d8e6b38f",
  668.         "g": "3e09d4ced3c86e35",
  669.         "name": "NORMAL",
  670.         "func": "\nmsg.StorCtl_Mod = \"0\"\nmsg.OutWRte = \"10000\"\nmsg.InWRte = \"10000\"\n\nmsg.newstate = \"normal\"\n\nreturn msg",
  671.         "outputs": 1,
  672.         "timeout": "",
  673.         "noerr": 0,
  674.         "initialize": "",
  675.         "finalize": "",
  676.         "libs": [],
  677.         "x": 2200,
  678.         "y": 380,
  679.         "wires": [
  680.             [
  681.                 "a587bcbe10cdf408"
  682.             ]
  683.         ],
  684.         "info": "This puts the battery in normal operation.\nMeaningn that it will both charge and discharge to\nits set limits at 100%,\n"
  685.     },
  686.     {
  687.         "id": "a0ef05d4128e01be",
  688.         "type": "api-current-state",
  689.         "z": "47c37038d8e6b38f",
  690.         "g": "3e09d4ced3c86e35",
  691.         "name": "OutWRte already 100?",
  692.         "server": "afa7e6c.89d5e18",
  693.         "version": 3,
  694.         "outputs": 2,
  695.         "halt_if": "100",
  696.         "halt_if_type": "num",
  697.         "halt_if_compare": "is",
  698.         "entity_id": "sensor.gen24_storage_outwrte",
  699.         "state_type": "num",
  700.         "blockInputOverrides": false,
  701.         "outputProperties": [
  702.             {
  703.                 "property": "payload",
  704.                 "propertyType": "msg",
  705.                 "value": "",
  706.                 "valueType": "entityState"
  707.             },
  708.             {
  709.                 "property": "data",
  710.                 "propertyType": "msg",
  711.                 "value": "",
  712.                 "valueType": "entity"
  713.             }
  714.         ],
  715.         "for": "0",
  716.         "forType": "num",
  717.         "forUnits": "minutes",
  718.         "override_topic": false,
  719.         "state_location": "payload",
  720.         "override_payload": "msg",
  721.         "entity_location": "data",
  722.         "override_data": "msg",
  723.         "x": 1920,
  724.         "y": 380,
  725.         "wires": [
  726.             [],
  727.             [
  728.                 "e6a78ae366723d0d"
  729.             ]
  730.         ]
  731.     },
  732.     {
  733.         "id": "c630c2b9bd8f82a5",
  734.         "type": "function",
  735.         "z": "47c37038d8e6b38f",
  736.         "g": "7d8bdc5cb7c4d4f7",
  737.         "name": "3000W CHARGE",
  738.         "func": "msg.StorCtl_Mod = \"2\"\n// 4500W (65536-3000)\nmsg.OutWRte = \"62536\"\n\nmsg.newstate = \"forcecharge3000w\"\n\nreturn msg",
  739.         "outputs": 1,
  740.         "timeout": "",
  741.         "noerr": 0,
  742.         "initialize": "",
  743.         "finalize": "",
  744.         "libs": [],
  745.         "x": 2170,
  746.         "y": 480,
  747.         "wires": [
  748.             [
  749.                 "a587bcbe10cdf408"
  750.             ]
  751.         ],
  752.         "info": "Example 1: Only permit energy storage charging\nThis behavior can be achieved by limiting the maximum discharge capacity to 0%\n=> results in window [-3300 W, 0 W]\n- OutWRte = 0% (set discharge limit of WchaMax to 0%)\n- StorCtl_Mod = 2 (activates discharge limit, bit pattern: 10)\n- InWRte is not relevant in this case"
  753.     },
  754.     {
  755.         "id": "bc3f2932aa99de20",
  756.         "type": "function",
  757.         "z": "47c37038d8e6b38f",
  758.         "g": "7d8bdc5cb7c4d4f7",
  759.         "name": "4500W CHARGE",
  760.         "func": "msg.StorCtl_Mod = \"2\"\n// 4500W (65536-1500)\nmsg.OutWRte = \"61036\"\n\nmsg.newstate = \"forcecharge1500w\"\n\nreturn msg",
  761.         "outputs": 1,
  762.         "timeout": "",
  763.         "noerr": 0,
  764.         "initialize": "",
  765.         "finalize": "",
  766.         "libs": [],
  767.         "x": 2170,
  768.         "y": 540,
  769.         "wires": [
  770.             [
  771.                 "a587bcbe10cdf408"
  772.             ]
  773.         ],
  774.         "info": "Example 5: Charging in the range of 50% to 75% of the nominal power\nThis behavior can be achieved by limiting the maximum charge capacity to 75%\nand the maximum discharge capacity to -50%\n=> results in window [1650 W, 2475 W]\n- InWRte = 75% (set charge limit of WchaMax to 75%)\n- OutWRte = -50% (set discharge limit of WchaMax to -50%)\n- StorCtl_Mod = 3 (activate both limit values, bit pattern: 11)\n- Battery status in Fronius Solar.web will change to Forced Recharge"
  775.     },
  776.     {
  777.         "id": "3b351859da7be34c",
  778.         "type": "api-current-state",
  779.         "z": "47c37038d8e6b38f",
  780.         "g": "7d8bdc5cb7c4d4f7",
  781.         "name": "OutWRte already -45?",
  782.         "server": "afa7e6c.89d5e18",
  783.         "version": 3,
  784.         "outputs": 2,
  785.         "halt_if": "-45",
  786.         "halt_if_type": "num",
  787.         "halt_if_compare": "is",
  788.         "entity_id": "sensor.gen24_storage_outwrte",
  789.         "state_type": "num",
  790.         "blockInputOverrides": false,
  791.         "outputProperties": [
  792.             {
  793.                 "property": "payload",
  794.                 "propertyType": "msg",
  795.                 "value": "",
  796.                 "valueType": "entityState"
  797.             },
  798.             {
  799.                 "property": "data",
  800.                 "propertyType": "msg",
  801.                 "value": "",
  802.                 "valueType": "entity"
  803.             }
  804.         ],
  805.         "for": "0",
  806.         "forType": "num",
  807.         "forUnits": "minutes",
  808.         "override_topic": false,
  809.         "state_location": "payload",
  810.         "override_payload": "msg",
  811.         "entity_location": "data",
  812.         "override_data": "msg",
  813.         "x": 1920,
  814.         "y": 540,
  815.         "wires": [
  816.             [],
  817.             [
  818.                 "bc3f2932aa99de20"
  819.             ]
  820.         ]
  821.     },
  822.     {
  823.         "id": "4e7ce73d4b6ddbbc",
  824.         "type": "api-current-state",
  825.         "z": "47c37038d8e6b38f",
  826.         "g": "7d8bdc5cb7c4d4f7",
  827.         "name": "OutWRte already -30?",
  828.         "server": "afa7e6c.89d5e18",
  829.         "version": 3,
  830.         "outputs": 2,
  831.         "halt_if": "-30",
  832.         "halt_if_type": "num",
  833.         "halt_if_compare": "is",
  834.         "entity_id": "sensor.gen24_storage_outwrte",
  835.         "state_type": "num",
  836.         "blockInputOverrides": false,
  837.         "outputProperties": [
  838.             {
  839.                 "property": "payload",
  840.                 "propertyType": "msg",
  841.                 "value": "",
  842.                 "valueType": "entityState"
  843.             },
  844.             {
  845.                 "property": "data",
  846.                 "propertyType": "msg",
  847.                 "value": "",
  848.                 "valueType": "entity"
  849.             }
  850.         ],
  851.         "for": "0",
  852.         "forType": "num",
  853.         "forUnits": "minutes",
  854.         "override_topic": false,
  855.         "state_location": "payload",
  856.         "override_payload": "msg",
  857.         "entity_location": "data",
  858.         "override_data": "msg",
  859.         "x": 1920,
  860.         "y": 480,
  861.         "wires": [
  862.             [],
  863.             [
  864.                 "c630c2b9bd8f82a5"
  865.             ]
  866.         ]
  867.     },
  868.     {
  869.         "id": "f303013a077c1088",
  870.         "type": "function",
  871.         "z": "47c37038d8e6b38f",
  872.         "g": "ed43f93d33a1a59a",
  873.         "name": "HOLD",
  874.         "func": "msg.StorCtl_Mod = \"3\"\nmsg.OutWRte = \"0\"\nmsg.InWRte = \"0\"\n\nmsg.newstate = \"hold_state\"\n\nreturn msg",
  875.         "outputs": 1,
  876.         "timeout": "",
  877.         "noerr": 0,
  878.         "initialize": "",
  879.         "finalize": "",
  880.         "libs": [],
  881.         "x": 2210,
  882.         "y": 640,
  883.         "wires": [
  884.             [
  885.                 "a587bcbe10cdf408"
  886.             ]
  887.         ],
  888.         "info": "Example 3: Do not permit charging or discharging\nThis behavior can be achieved by limiting the maximum charge capacity to 0%\nand the maximum discharge capacity to 0%\n=> results in window [0 W, 0 W]\n- InWRte = 0% (set charge limit of WchaMax to 0%)\n- OutWRte = 0% (set discharge limit of WchaMax to 0%)\n- StorCtl_Mod = 3 (activate both limit values, bit pattern: 11)"
  889.     },
  890.     {
  891.         "id": "4e5a5cb3ec4da8b3",
  892.         "type": "api-current-state",
  893.         "z": "47c37038d8e6b38f",
  894.         "g": "ed43f93d33a1a59a",
  895.         "name": "ChaSt already HOLDING?",
  896.         "server": "afa7e6c.89d5e18",
  897.         "version": 3,
  898.         "outputs": 2,
  899.         "halt_if": "HOLDING",
  900.         "halt_if_type": "str",
  901.         "halt_if_compare": "is",
  902.         "entity_id": "sensor.gen24_storage_chast",
  903.         "state_type": "str",
  904.         "blockInputOverrides": false,
  905.         "outputProperties": [
  906.             {
  907.                 "property": "payload",
  908.                 "propertyType": "msg",
  909.                 "value": "",
  910.                 "valueType": "entityState"
  911.             },
  912.             {
  913.                 "property": "data",
  914.                 "propertyType": "msg",
  915.                 "value": "",
  916.                 "valueType": "entity"
  917.             }
  918.         ],
  919.         "for": "0",
  920.         "forType": "num",
  921.         "forUnits": "minutes",
  922.         "override_topic": false,
  923.         "state_location": "payload",
  924.         "override_payload": "msg",
  925.         "entity_location": "data",
  926.         "override_data": "msg",
  927.         "x": 1940,
  928.         "y": 640,
  929.         "wires": [
  930.             [],
  931.             [
  932.                 "f303013a077c1088"
  933.             ]
  934.         ]
  935.     },
  936.     {
  937.         "id": "c60dff6c3c0eea08",
  938.         "type": "function",
  939.         "z": "47c37038d8e6b38f",
  940.         "g": "59fc0e24e725529f",
  941.         "name": "2000W DISCHARGE",
  942.         "func": "msg.StorCtl_Mod = \"1\"\n// 65536 - 1500\nmsg.InWRte = \"63536\"\n\nmsg.newstate = \"1kWdischarge\"\n\nreturn msg",
  943.         "outputs": 1,
  944.         "timeout": "",
  945.         "noerr": 0,
  946.         "initialize": "",
  947.         "finalize": "",
  948.         "libs": [],
  949.         "x": 2160,
  950.         "y": 740,
  951.         "wires": [
  952.             [
  953.                 "a587bcbe10cdf408"
  954.             ]
  955.         ]
  956.     },
  957.     {
  958.         "id": "e7ac98d6df188867",
  959.         "type": "api-current-state",
  960.         "z": "47c37038d8e6b38f",
  961.         "g": "59fc0e24e725529f",
  962.         "name": "InWRte already -20?",
  963.         "server": "afa7e6c.89d5e18",
  964.         "version": 3,
  965.         "outputs": 2,
  966.         "halt_if": "-20",
  967.         "halt_if_type": "num",
  968.         "halt_if_compare": "is",
  969.         "entity_id": "sensor.gen24_storage_inwrte",
  970.         "state_type": "num",
  971.         "blockInputOverrides": false,
  972.         "outputProperties": [
  973.             {
  974.                 "property": "payload",
  975.                 "propertyType": "msg",
  976.                 "value": "",
  977.                 "valueType": "entityState"
  978.             },
  979.             {
  980.                 "property": "data",
  981.                 "propertyType": "msg",
  982.                 "value": "",
  983.                 "valueType": "entity"
  984.             }
  985.         ],
  986.         "for": "0",
  987.         "forType": "num",
  988.         "forUnits": "minutes",
  989.         "override_topic": false,
  990.         "state_location": "payload",
  991.         "override_payload": "msg",
  992.         "entity_location": "data",
  993.         "override_data": "msg",
  994.         "x": 1920,
  995.         "y": 740,
  996.         "wires": [
  997.             [],
  998.             [
  999.                 "c60dff6c3c0eea08"
  1000.             ]
  1001.         ]
  1002.     },
  1003.     {
  1004.         "id": "74921ce4ba346873",
  1005.         "type": "function",
  1006.         "z": "47c37038d8e6b38f",
  1007.         "g": "59fc0e24e725529f",
  1008.         "name": "4500W DISCHARGE",
  1009.         "func": "\nmsg.StorCtl_Mod = \"1\"\n// 65536 - 4500\nmsg.InWRte = \"61036\"\n\nmsg.newstate = \"3kWdischarge\"\n\nreturn msg",
  1010.         "outputs": 1,
  1011.         "timeout": "",
  1012.         "noerr": 0,
  1013.         "initialize": "",
  1014.         "finalize": "",
  1015.         "libs": [],
  1016.         "x": 2160,
  1017.         "y": 800,
  1018.         "wires": [
  1019.             [
  1020.                 "a587bcbe10cdf408"
  1021.             ]
  1022.         ]
  1023.     },
  1024.     {
  1025.         "id": "29c0e0b7e7356e23",
  1026.         "type": "api-current-state",
  1027.         "z": "47c37038d8e6b38f",
  1028.         "g": "59fc0e24e725529f",
  1029.         "name": "InWRte already -45?",
  1030.         "server": "afa7e6c.89d5e18",
  1031.         "version": 3,
  1032.         "outputs": 2,
  1033.         "halt_if": "-45",
  1034.         "halt_if_type": "num",
  1035.         "halt_if_compare": "is",
  1036.         "entity_id": "sensor.gen24_storage_inwrte",
  1037.         "state_type": "num",
  1038.         "blockInputOverrides": false,
  1039.         "outputProperties": [
  1040.             {
  1041.                 "property": "payload",
  1042.                 "propertyType": "msg",
  1043.                 "value": "",
  1044.                 "valueType": "entityState"
  1045.             },
  1046.             {
  1047.                 "property": "data",
  1048.                 "propertyType": "msg",
  1049.                 "value": "",
  1050.                 "valueType": "entity"
  1051.             }
  1052.         ],
  1053.         "for": "0",
  1054.         "forType": "num",
  1055.         "forUnits": "minutes",
  1056.         "override_topic": false,
  1057.         "state_location": "payload",
  1058.         "override_payload": "msg",
  1059.         "entity_location": "data",
  1060.         "override_data": "msg",
  1061.         "x": 1920,
  1062.         "y": 800,
  1063.         "wires": [
  1064.             [],
  1065.             [
  1066.                 "74921ce4ba346873"
  1067.             ]
  1068.         ]
  1069.     },
  1070.     {
  1071.         "id": "783a661dd9e50fd6",
  1072.         "type": "function",
  1073.         "z": "47c37038d8e6b38f",
  1074.         "g": "345cde89d835a024",
  1075.         "name": "ALLOW SUN CHARGE",
  1076.         "func": "msg.StorCtl_Mod = \"3\"\nmsg.OutWRte = \"0\"\nmsg.InWRte = \"10000\"\n\nmsg.newstate = \"allow_suncharge\"\n\nreturn msg",
  1077.         "outputs": 1,
  1078.         "timeout": "",
  1079.         "noerr": 0,
  1080.         "initialize": "",
  1081.         "finalize": "",
  1082.         "libs": [],
  1083.         "x": 2210,
  1084.         "y": 280,
  1085.         "wires": [
  1086.             [
  1087.                 "a587bcbe10cdf408"
  1088.             ]
  1089.         ],
  1090.         "info": "Example 3: Do not permit charging or discharging\nThis behavior can be achieved by limiting the maximum charge capacity to 0%\nand the maximum discharge capacity to 0%\n=> results in window [0 W, 0 W]\n- InWRte = 0% (set charge limit of WchaMax to 0%)\n- OutWRte = 0% (set discharge limit of WchaMax to 0%)\n- StorCtl_Mod = 3 (activate both limit values, bit pattern: 11)"
  1091.     },
  1092.     {
  1093.         "id": "d4028f5212870a32",
  1094.         "type": "api-current-state",
  1095.         "z": "47c37038d8e6b38f",
  1096.         "g": "345cde89d835a024",
  1097.         "name": "OutWRte already 0?",
  1098.         "server": "afa7e6c.89d5e18",
  1099.         "version": 3,
  1100.         "outputs": 2,
  1101.         "halt_if": "0",
  1102.         "halt_if_type": "num",
  1103.         "halt_if_compare": "is",
  1104.         "entity_id": "sensor.gen24_storage_outwrte",
  1105.         "state_type": "num",
  1106.         "blockInputOverrides": false,
  1107.         "outputProperties": [
  1108.             {
  1109.                 "property": "payload",
  1110.                 "propertyType": "msg",
  1111.                 "value": "",
  1112.                 "valueType": "entityState"
  1113.             },
  1114.             {
  1115.                 "property": "data",
  1116.                 "propertyType": "msg",
  1117.                 "value": "",
  1118.                 "valueType": "entity"
  1119.             }
  1120.         ],
  1121.         "for": "0",
  1122.         "forType": "num",
  1123.         "forUnits": "minutes",
  1124.         "override_topic": false,
  1125.         "state_location": "payload",
  1126.         "override_payload": "msg",
  1127.         "entity_location": "data",
  1128.         "override_data": "msg",
  1129.         "x": 1920,
  1130.         "y": 280,
  1131.         "wires": [
  1132.             [],
  1133.             [
  1134.                 "783a661dd9e50fd6"
  1135.             ]
  1136.         ]
  1137.     },
  1138.     {
  1139.         "id": "25a16cd6e093f0db",
  1140.         "type": "modbus-response",
  1141.         "z": "47c37038d8e6b38f",
  1142.         "g": "67efc426c44adbea",
  1143.         "name": "",
  1144.         "registerShowMax": 20,
  1145.         "x": 3350,
  1146.         "y": 540,
  1147.         "wires": []
  1148.     },
  1149.     {
  1150.         "id": "3bc045cab0462f7b",
  1151.         "type": "modbus-flex-write",
  1152.         "z": "47c37038d8e6b38f",
  1153.         "g": "67efc426c44adbea",
  1154.         "name": "Fronius Storage",
  1155.         "showStatusActivities": true,
  1156.         "showErrors": true,
  1157.         "showWarnings": true,
  1158.         "server": "ecd41b68db8d4254",
  1159.         "emptyMsgOnFail": true,
  1160.         "keepMsgProperties": true,
  1161.         "delayOnStart": false,
  1162.         "startDelayTime": "10",
  1163.         "x": 3160,
  1164.         "y": 520,
  1165.         "wires": [
  1166.             [
  1167.                 "25a16cd6e093f0db",
  1168.                 "390c78de6c45fd57"
  1169.             ],
  1170.             []
  1171.         ]
  1172.     },
  1173.     {
  1174.         "id": "390c78de6c45fd57",
  1175.         "type": "debug",
  1176.         "z": "47c37038d8e6b38f",
  1177.         "g": "67efc426c44adbea",
  1178.         "name": "Inverter MODBUS Response",
  1179.         "active": true,
  1180.         "tosidebar": true,
  1181.         "console": true,
  1182.         "tostatus": false,
  1183.         "complete": "payload",
  1184.         "targetType": "msg",
  1185.         "statusVal": "",
  1186.         "statusType": "auto",
  1187.         "x": 3390,
  1188.         "y": 500,
  1189.         "wires": []
  1190.     },
  1191.     {
  1192.         "id": "2d46f5f9c7a1342b",
  1193.         "type": "delay",
  1194.         "z": "47c37038d8e6b38f",
  1195.         "g": "67efc426c44adbea",
  1196.         "name": "Rate limit",
  1197.         "pauseType": "rate",
  1198.         "timeout": "500",
  1199.         "timeoutUnits": "milliseconds",
  1200.         "rate": "1",
  1201.         "nbRateUnits": "10",
  1202.         "rateUnits": "second",
  1203.         "randomFirst": "1",
  1204.         "randomLast": "5",
  1205.         "randomUnits": "seconds",
  1206.         "drop": true,
  1207.         "allowrate": false,
  1208.         "outputs": 1,
  1209.         "x": 2980,
  1210.         "y": 520,
  1211.         "wires": [
  1212.             [
  1213.                 "3bc045cab0462f7b"
  1214.             ]
  1215.         ]
  1216.     },
  1217.     {
  1218.         "id": "a587bcbe10cdf408",
  1219.         "type": "function",
  1220.         "z": "47c37038d8e6b38f",
  1221.         "g": "14db1722437b2f45",
  1222.         "name": "Modbus Payload Template",
  1223.         "func": "var values = [msg.StorCtl_Mod, (65535), (500), (10000), (65535), (65535), (5), (msg.OutWRte), (msg.InWRte)]\n\nmsg.payload = {\n    'value': values,\n    'fc': 16,\n    'unitid': 1,\n    // INT+SF = -10\n    'address': 40348,\n    'quantity': 9\n}\n\nreturn msg",
  1224.         "outputs": 1,
  1225.         "timeout": "",
  1226.         "noerr": 0,
  1227.         "initialize": "",
  1228.         "finalize": "",
  1229.         "libs": [],
  1230.         "x": 2700,
  1231.         "y": 520,
  1232.         "wires": [
  1233.             [
  1234.                 "2d46f5f9c7a1342b"
  1235.             ]
  1236.         ]
  1237.     },
  1238.     {
  1239.         "id": "eaaabeb6bad78922",
  1240.         "type": "api-current-state",
  1241.         "z": "47c37038d8e6b38f",
  1242.         "g": "b30643153aa103b4",
  1243.         "name": "Spotpris",
  1244.         "server": "afa7e6c.89d5e18",
  1245.         "version": 3,
  1246.         "outputs": 1,
  1247.         "halt_if": "",
  1248.         "halt_if_type": "str",
  1249.         "halt_if_compare": "is",
  1250.         "entity_id": "sensor.energi_data_service",
  1251.         "state_type": "num",
  1252.         "blockInputOverrides": false,
  1253.         "outputProperties": [
  1254.             {
  1255.                 "property": "payload",
  1256.                 "propertyType": "msg",
  1257.                 "value": "",
  1258.                 "valueType": "entityState"
  1259.             },
  1260.             {
  1261.                 "property": "data",
  1262.                 "propertyType": "msg",
  1263.                 "value": "",
  1264.                 "valueType": "entity"
  1265.             }
  1266.         ],
  1267.         "for": "0",
  1268.         "forType": "num",
  1269.         "forUnits": "minutes",
  1270.         "override_topic": false,
  1271.         "state_location": "payload",
  1272.         "override_payload": "msg",
  1273.         "entity_location": "data",
  1274.         "override_data": "msg",
  1275.         "x": 360,
  1276.         "y": 100,
  1277.         "wires": [
  1278.             [
  1279.                 "5ead91b698452d8f"
  1280.             ]
  1281.         ]
  1282.     },
  1283.     {
  1284.         "id": "5ead91b698452d8f",
  1285.         "type": "change",
  1286.         "z": "47c37038d8e6b38f",
  1287.         "g": "b30643153aa103b4",
  1288.         "name": "",
  1289.         "rules": [
  1290.             {
  1291.                 "t": "set",
  1292.                 "p": "cheap_spotpris",
  1293.                 "pt": "flow",
  1294.                 "to": "payload",
  1295.                 "tot": "msg",
  1296.                 "dc": true
  1297.             }
  1298.         ],
  1299.         "action": "",
  1300.         "property": "",
  1301.         "from": "",
  1302.         "to": "",
  1303.         "reg": false,
  1304.         "x": 570,
  1305.         "y": 100,
  1306.         "wires": [
  1307.             [
  1308.                 "40a4842216e82a10",
  1309.                 "331a81ba20be90fb"
  1310.             ]
  1311.         ]
  1312.     },
  1313.     {
  1314.         "id": "dd9f9685c127cba6",
  1315.         "type": "server-state-changed",
  1316.         "z": "47c37038d8e6b38f",
  1317.         "g": "5dd4d8970b5dee27",
  1318.         "name": "Battery 3.0 Charge",
  1319.         "server": "afa7e6c.89d5e18",
  1320.         "version": 5,
  1321.         "outputs": 1,
  1322.         "exposeAsEntityConfig": "",
  1323.         "entityId": "input_button.battery_3_0_charge",
  1324.         "entityIdType": "exact",
  1325.         "outputInitially": false,
  1326.         "stateType": "str",
  1327.         "ifState": "",
  1328.         "ifStateType": "str",
  1329.         "ifStateOperator": "is",
  1330.         "outputOnlyOnStateChange": false,
  1331.         "for": "0",
  1332.         "forType": "num",
  1333.         "forUnits": "minutes",
  1334.         "ignorePrevStateNull": false,
  1335.         "ignorePrevStateUnknown": false,
  1336.         "ignorePrevStateUnavailable": false,
  1337.         "ignoreCurrentStateUnknown": false,
  1338.         "ignoreCurrentStateUnavailable": false,
  1339.         "outputProperties": [
  1340.             {
  1341.                 "property": "payload",
  1342.                 "propertyType": "msg",
  1343.                 "value": "",
  1344.                 "valueType": "entityState"
  1345.             },
  1346.             {
  1347.                 "property": "data",
  1348.                 "propertyType": "msg",
  1349.                 "value": "",
  1350.                 "valueType": "eventData"
  1351.             },
  1352.             {
  1353.                 "property": "topic",
  1354.                 "propertyType": "msg",
  1355.                 "value": "",
  1356.                 "valueType": "triggerId"
  1357.             }
  1358.         ],
  1359.         "x": 1330,
  1360.         "y": 180,
  1361.         "wires": [
  1362.             [
  1363.                 "4e7ce73d4b6ddbbc"
  1364.             ]
  1365.         ]
  1366.     },
  1367.     {
  1368.         "id": "0b27733ee1db73bb",
  1369.         "type": "server-state-changed",
  1370.         "z": "47c37038d8e6b38f",
  1371.         "g": "5dd4d8970b5dee27",
  1372.         "name": "Battery 4.5 Discharge",
  1373.         "server": "afa7e6c.89d5e18",
  1374.         "version": 5,
  1375.         "outputs": 1,
  1376.         "exposeAsEntityConfig": "",
  1377.         "entityId": "input_button.battery_4_5_discharge",
  1378.         "entityIdType": "exact",
  1379.         "outputInitially": false,
  1380.         "stateType": "str",
  1381.         "ifState": "",
  1382.         "ifStateType": "str",
  1383.         "ifStateOperator": "is",
  1384.         "outputOnlyOnStateChange": false,
  1385.         "for": "0",
  1386.         "forType": "num",
  1387.         "forUnits": "minutes",
  1388.         "ignorePrevStateNull": false,
  1389.         "ignorePrevStateUnknown": false,
  1390.         "ignorePrevStateUnavailable": false,
  1391.         "ignoreCurrentStateUnknown": false,
  1392.         "ignoreCurrentStateUnavailable": false,
  1393.         "outputProperties": [
  1394.             {
  1395.                 "property": "payload",
  1396.                 "propertyType": "msg",
  1397.                 "value": "",
  1398.                 "valueType": "entityState"
  1399.             },
  1400.             {
  1401.                 "property": "data",
  1402.                 "propertyType": "msg",
  1403.                 "value": "",
  1404.                 "valueType": "eventData"
  1405.             },
  1406.             {
  1407.                 "property": "topic",
  1408.                 "propertyType": "msg",
  1409.                 "value": "",
  1410.                 "valueType": "triggerId"
  1411.             }
  1412.         ],
  1413.         "x": 1340,
  1414.         "y": 240,
  1415.         "wires": [
  1416.             [
  1417.                 "29c0e0b7e7356e23"
  1418.             ]
  1419.         ]
  1420.     },
  1421.     {
  1422.         "id": "c5550666ff48ba7d",
  1423.         "type": "server-state-changed",
  1424.         "z": "47c37038d8e6b38f",
  1425.         "g": "5dd4d8970b5dee27",
  1426.         "name": "Battery Hold",
  1427.         "server": "afa7e6c.89d5e18",
  1428.         "version": 5,
  1429.         "outputs": 1,
  1430.         "exposeAsEntityConfig": "",
  1431.         "entityId": "input_button.battery_hold",
  1432.         "entityIdType": "exact",
  1433.         "outputInitially": false,
  1434.         "stateType": "str",
  1435.         "ifState": "",
  1436.         "ifStateType": "str",
  1437.         "ifStateOperator": "is",
  1438.         "outputOnlyOnStateChange": false,
  1439.         "for": "0",
  1440.         "forType": "num",
  1441.         "forUnits": "minutes",
  1442.         "ignorePrevStateNull": false,
  1443.         "ignorePrevStateUnknown": false,
  1444.         "ignorePrevStateUnavailable": false,
  1445.         "ignoreCurrentStateUnknown": false,
  1446.         "ignoreCurrentStateUnavailable": false,
  1447.         "outputProperties": [
  1448.             {
  1449.                 "property": "payload",
  1450.                 "propertyType": "msg",
  1451.                 "value": "",
  1452.                 "valueType": "entityState"
  1453.             },
  1454.             {
  1455.                 "property": "data",
  1456.                 "propertyType": "msg",
  1457.                 "value": "",
  1458.                 "valueType": "eventData"
  1459.             },
  1460.             {
  1461.                 "property": "topic",
  1462.                 "propertyType": "msg",
  1463.                 "value": "",
  1464.                 "valueType": "triggerId"
  1465.             }
  1466.         ],
  1467.         "x": 1310,
  1468.         "y": 120,
  1469.         "wires": [
  1470.             [
  1471.                 "d4028f5212870a32"
  1472.             ]
  1473.         ]
  1474.     },
  1475.     {
  1476.         "id": "0293a376a3c3bb7c",
  1477.         "type": "server-state-changed",
  1478.         "z": "47c37038d8e6b38f",
  1479.         "g": "5dd4d8970b5dee27",
  1480.         "name": "Battery Normal",
  1481.         "server": "afa7e6c.89d5e18",
  1482.         "version": 5,
  1483.         "outputs": 1,
  1484.         "exposeAsEntityConfig": "",
  1485.         "entityId": "input_button.battery_normal",
  1486.         "entityIdType": "exact",
  1487.         "outputInitially": false,
  1488.         "stateType": "str",
  1489.         "ifState": "",
  1490.         "ifStateType": "str",
  1491.         "ifStateOperator": "is",
  1492.         "outputOnlyOnStateChange": false,
  1493.         "for": "0",
  1494.         "forType": "num",
  1495.         "forUnits": "minutes",
  1496.         "ignorePrevStateNull": false,
  1497.         "ignorePrevStateUnknown": false,
  1498.         "ignorePrevStateUnavailable": false,
  1499.         "ignoreCurrentStateUnknown": false,
  1500.         "ignoreCurrentStateUnavailable": false,
  1501.         "outputProperties": [
  1502.             {
  1503.                 "property": "payload",
  1504.                 "propertyType": "msg",
  1505.                 "value": "",
  1506.                 "valueType": "entityState"
  1507.             },
  1508.             {
  1509.                 "property": "data",
  1510.                 "propertyType": "msg",
  1511.                 "value": "",
  1512.                 "valueType": "eventData"
  1513.             },
  1514.             {
  1515.                 "property": "topic",
  1516.                 "propertyType": "msg",
  1517.                 "value": "",
  1518.                 "valueType": "triggerId"
  1519.             }
  1520.         ],
  1521.         "x": 1320,
  1522.         "y": 60,
  1523.         "wires": [
  1524.             [
  1525.                 "a0ef05d4128e01be"
  1526.             ]
  1527.         ]
  1528.     },
  1529.     {
  1530.         "id": "d7ac8cb75a6aab74",
  1531.         "type": "inject",
  1532.         "z": "47c37038d8e6b38f",
  1533.         "g": "e2696b5907bf6134",
  1534.         "name": "7:00",
  1535.         "props": [
  1536.             {
  1537.                 "p": "payload"
  1538.             },
  1539.             {
  1540.                 "p": "topic",
  1541.                 "vt": "str"
  1542.             }
  1543.         ],
  1544.         "repeat": "",
  1545.         "crontab": "00 07 * * *",
  1546.         "once": true,
  1547.         "onceDelay": "",
  1548.         "topic": "",
  1549.         "payload": "Checking...",
  1550.         "payloadType": "str",
  1551.         "x": 130,
  1552.         "y": 440,
  1553.         "wires": [
  1554.             [
  1555.                 "a0ef05d4128e01be"
  1556.             ]
  1557.         ]
  1558.     },
  1559.     {
  1560.         "id": "08de5d47e1f5caf0",
  1561.         "type": "api-current-state",
  1562.         "z": "47c37038d8e6b38f",
  1563.         "g": "f1528564d3315165",
  1564.         "name": "SUN Production more than 4000W",
  1565.         "server": "afa7e6c.89d5e18",
  1566.         "version": 3,
  1567.         "outputs": 2,
  1568.         "halt_if": "4000",
  1569.         "halt_if_type": "num",
  1570.         "halt_if_compare": "gt",
  1571.         "entity_id": "sensor.gen24_solceller_effekt",
  1572.         "state_type": "str",
  1573.         "blockInputOverrides": false,
  1574.         "outputProperties": [
  1575.             {
  1576.                 "property": "payload",
  1577.                 "propertyType": "msg",
  1578.                 "value": "",
  1579.                 "valueType": "entityState"
  1580.             },
  1581.             {
  1582.                 "property": "data",
  1583.                 "propertyType": "msg",
  1584.                 "value": "",
  1585.                 "valueType": "entity"
  1586.             }
  1587.         ],
  1588.         "for": "0",
  1589.         "forType": "num",
  1590.         "forUnits": "minutes",
  1591.         "override_topic": false,
  1592.         "state_location": "payload",
  1593.         "override_payload": "msg",
  1594.         "entity_location": "data",
  1595.         "override_data": "msg",
  1596.         "x": 480,
  1597.         "y": 1060,
  1598.         "wires": [
  1599.             [],
  1600.             []
  1601.         ]
  1602.     },
  1603.     {
  1604.         "id": "7a43ec058f0d0270",
  1605.         "type": "api-call-service",
  1606.         "z": "47c37038d8e6b38f",
  1607.         "g": "f1528564d3315165",
  1608.         "name": "START charging BOTH CARS",
  1609.         "server": "afa7e6c.89d5e18",
  1610.         "version": 5,
  1611.         "debugenabled": false,
  1612.         "domain": "automation",
  1613.         "service": "trigger",
  1614.         "areaId": [
  1615.             "garage"
  1616.         ],
  1617.         "deviceId": [
  1618.             "95f18f645c515332d6c92e968795d53c",
  1619.             "15defbda49ab4aa4a3d8b5fe7c2e42d6"
  1620.         ],
  1621.         "entityId": [
  1622.             "automation.tesla_start",
  1623.             "automation.test_uppfart_garage_start"
  1624.         ],
  1625.         "data": "",
  1626.         "dataType": "jsonata",
  1627.         "mergeContext": "",
  1628.         "mustacheAltTags": false,
  1629.         "outputProperties": [],
  1630.         "queue": "none",
  1631.         "x": 1070,
  1632.         "y": 880,
  1633.         "wires": [
  1634.             []
  1635.         ]
  1636.     },
  1637.     {
  1638.         "id": "8dac98ce780f4e23",
  1639.         "type": "api-call-service",
  1640.         "z": "47c37038d8e6b38f",
  1641.         "g": "f1528564d3315165",
  1642.         "name": "STOP charging BOTH CARS",
  1643.         "server": "afa7e6c.89d5e18",
  1644.         "version": 5,
  1645.         "debugenabled": false,
  1646.         "domain": "automation",
  1647.         "service": "trigger",
  1648.         "areaId": [
  1649.             "garage"
  1650.         ],
  1651.         "deviceId": [
  1652.             "95f18f645c515332d6c92e968795d53c",
  1653.             "15defbda49ab4aa4a3d8b5fe7c2e42d6"
  1654.         ],
  1655.         "entityId": [
  1656.             "automation.test_tesla_stop",
  1657.             "automation.test_uppfart_garage_stop"
  1658.         ],
  1659.         "data": "",
  1660.         "dataType": "jsonata",
  1661.         "mergeContext": "",
  1662.         "mustacheAltTags": false,
  1663.         "outputProperties": [],
  1664.         "queue": "none",
  1665.         "x": 1080,
  1666.         "y": 1160,
  1667.         "wires": [
  1668.             []
  1669.         ]
  1670.     },
  1671.     {
  1672.         "id": "97c75b49241005da",
  1673.         "type": "cronplus",
  1674.         "z": "47c37038d8e6b38f",
  1675.         "g": "f1528564d3315165",
  1676.         "name": "Every 30 minutes",
  1677.         "outputField": "payload",
  1678.         "timeZone": "",
  1679.         "storeName": "",
  1680.         "commandResponseMsgOutput": "output1",
  1681.         "defaultLocation": "",
  1682.         "defaultLocationType": "default",
  1683.         "outputs": 1,
  1684.         "options": [
  1685.             {
  1686.                 "name": "schedule1",
  1687.                 "topic": "topic1",
  1688.                 "payloadType": "default",
  1689.                 "payload": "",
  1690.                 "expressionType": "cron",
  1691.                 "expression": "0 */30 * * * *",
  1692.                 "location": "",
  1693.                 "offset": "0",
  1694.                 "solarType": "all",
  1695.                 "solarEvents": "sunrise,sunset"
  1696.             }
  1697.         ],
  1698.         "x": 170,
  1699.         "y": 1060,
  1700.         "wires": [
  1701.             [
  1702.                 "08de5d47e1f5caf0"
  1703.             ]
  1704.         ]
  1705.     },
  1706.     {
  1707.         "id": "40a4842216e82a10",
  1708.         "type": "function",
  1709.         "z": "47c37038d8e6b38f",
  1710.         "g": "b30643153aa103b4",
  1711.         "name": "Calculate flow.max_peak",
  1712.         "func": "var current_spotpris = flow.get(\"cheap_spotpris\");\n\n// add X to the current price\nvar max_spotpris = (current_spotpris + 100) * 1.25;\n\n// create a new variable to hold the average\nflow.set(\"max_peak\", max_spotpris);\n\nreturn [{ payload: flow.get(\"max_peak\") }]",
  1713.         "outputs": 1,
  1714.         "timeout": 0,
  1715.         "noerr": 0,
  1716.         "initialize": "",
  1717.         "finalize": "",
  1718.         "libs": [],
  1719.         "x": 870,
  1720.         "y": 80,
  1721.         "wires": [
  1722.             [
  1723.                 "15c0cd46d14ef0b7"
  1724.             ]
  1725.         ]
  1726.     },
  1727.     {
  1728.         "id": "15c0cd46d14ef0b7",
  1729.         "type": "debug",
  1730.         "z": "47c37038d8e6b38f",
  1731.         "g": "b30643153aa103b4",
  1732.         "name": "price",
  1733.         "active": true,
  1734.         "tosidebar": true,
  1735.         "console": true,
  1736.         "tostatus": true,
  1737.         "complete": "payload",
  1738.         "targetType": "msg",
  1739.         "statusVal": "payload",
  1740.         "statusType": "auto",
  1741.         "x": 1080,
  1742.         "y": 60,
  1743.         "wires": []
  1744.     },
  1745.     {
  1746.         "id": "331a81ba20be90fb",
  1747.         "type": "function",
  1748.         "z": "47c37038d8e6b38f",
  1749.         "g": "b30643153aa103b4",
  1750.         "name": "Calculate flow.break_even",
  1751.         "func": "var current_spotpris = flow.get(\"cheap_spotpris\");\n\n// Skånska energi avgifter + moms\nvar max_spotpris = (current_spotpris + 60) * 1.25;\n\n// create a new variable to hold the average\nflow.set(\"break_even\", max_spotpris);\n\nreturn [{ payload: flow.get(\"break_even\") }]",
  1752.         "outputs": 1,
  1753.         "timeout": 0,
  1754.         "noerr": 0,
  1755.         "initialize": "",
  1756.         "finalize": "",
  1757.         "libs": [],
  1758.         "x": 870,
  1759.         "y": 120,
  1760.         "wires": [
  1761.             [
  1762.                 "18654bf66cea722f"
  1763.             ]
  1764.         ]
  1765.     },
  1766.     {
  1767.         "id": "18654bf66cea722f",
  1768.         "type": "debug",
  1769.         "z": "47c37038d8e6b38f",
  1770.         "g": "b30643153aa103b4",
  1771.         "name": "price",
  1772.         "active": true,
  1773.         "tosidebar": true,
  1774.         "console": true,
  1775.         "tostatus": true,
  1776.         "complete": "payload",
  1777.         "targetType": "msg",
  1778.         "statusVal": "payload",
  1779.         "statusType": "auto",
  1780.         "x": 1080,
  1781.         "y": 140,
  1782.         "wires": []
  1783.     },
  1784.     {
  1785.         "id": "c0443c2d56c691d9",
  1786.         "type": "api-current-state",
  1787.         "z": "47c37038d8e6b38f",
  1788.         "g": "f1528564d3315165",
  1789.         "name": "Car connected?",
  1790.         "server": "afa7e6c.89d5e18",
  1791.         "version": 3,
  1792.         "outputs": 2,
  1793.         "halt_if": "payload",
  1794.         "halt_if_type": "msg",
  1795.         "halt_if_compare": "is_not",
  1796.         "entity_id": "switch.ev_smart_charging_ev_connected",
  1797.         "state_type": "str",
  1798.         "blockInputOverrides": false,
  1799.         "outputProperties": [
  1800.             {
  1801.                 "property": "payload",
  1802.                 "propertyType": "msg",
  1803.                 "value": "",
  1804.                 "valueType": "entityState"
  1805.             },
  1806.             {
  1807.                 "property": "data",
  1808.                 "propertyType": "msg",
  1809.                 "value": "",
  1810.                 "valueType": "entity"
  1811.             }
  1812.         ],
  1813.         "for": "0",
  1814.         "forType": "num",
  1815.         "forUnits": "minutes",
  1816.         "override_topic": false,
  1817.         "state_location": "payload",
  1818.         "override_payload": "msg",
  1819.         "entity_location": "data",
  1820.         "override_data": "msg",
  1821.         "x": 560,
  1822.         "y": 900,
  1823.         "wires": [
  1824.             [
  1825.                 "642712c63c88ecfb"
  1826.             ],
  1827.             [
  1828.                 "32a6e8cc398a5b2f"
  1829.             ]
  1830.         ]
  1831.     },
  1832.     {
  1833.         "id": "642712c63c88ecfb",
  1834.         "type": "debug",
  1835.         "z": "47c37038d8e6b38f",
  1836.         "g": "f1528564d3315165",
  1837.         "name": "yes",
  1838.         "active": true,
  1839.         "tosidebar": true,
  1840.         "console": true,
  1841.         "tostatus": true,
  1842.         "complete": "payload",
  1843.         "targetType": "msg",
  1844.         "statusVal": "payload",
  1845.         "statusType": "auto",
  1846.         "x": 730,
  1847.         "y": 880,
  1848.         "wires": []
  1849.     },
  1850.     {
  1851.         "id": "32a6e8cc398a5b2f",
  1852.         "type": "debug",
  1853.         "z": "47c37038d8e6b38f",
  1854.         "g": "f1528564d3315165",
  1855.         "name": "no",
  1856.         "active": true,
  1857.         "tosidebar": true,
  1858.         "console": true,
  1859.         "tostatus": true,
  1860.         "complete": "payload",
  1861.         "targetType": "msg",
  1862.         "statusVal": "payload",
  1863.         "statusType": "auto",
  1864.         "x": 730,
  1865.         "y": 940,
  1866.         "wires": []
  1867.     },
  1868.     {
  1869.         "id": "6663f4c6f6b2c347",
  1870.         "type": "cronplus",
  1871.         "z": "47c37038d8e6b38f",
  1872.         "g": "f1528564d3315165",
  1873.         "name": "Every 30 minutes",
  1874.         "outputField": "payload",
  1875.         "timeZone": "",
  1876.         "storeName": "",
  1877.         "commandResponseMsgOutput": "output1",
  1878.         "defaultLocation": "",
  1879.         "defaultLocationType": "default",
  1880.         "outputs": 1,
  1881.         "options": [
  1882.             {
  1883.                 "name": "schedule1",
  1884.                 "topic": "topic1",
  1885.                 "payloadType": "default",
  1886.                 "payload": "",
  1887.                 "expressionType": "cron",
  1888.                 "expression": "0 */30 * * * *",
  1889.                 "location": "",
  1890.                 "offset": "0",
  1891.                 "solarType": "all",
  1892.                 "solarEvents": "sunrise,sunset"
  1893.             }
  1894.         ],
  1895.         "x": 290,
  1896.         "y": 900,
  1897.         "wires": [
  1898.             [
  1899.                 "c0443c2d56c691d9"
  1900.             ]
  1901.         ]
  1902.     },
  1903.     {
  1904.         "id": "dd53cadf8f79b275",
  1905.         "type": "api-current-state",
  1906.         "z": "47c37038d8e6b38f",
  1907.         "g": "0ee20f2b17f69cb2",
  1908.         "name": "Spotpris BELOW -10?",
  1909.         "server": "afa7e6c.89d5e18",
  1910.         "version": 3,
  1911.         "outputs": 2,
  1912.         "halt_if": "-10",
  1913.         "halt_if_type": "num",
  1914.         "halt_if_compare": "lte",
  1915.         "entity_id": "sensor.energi_data_service",
  1916.         "state_type": "str",
  1917.         "blockInputOverrides": false,
  1918.         "outputProperties": [
  1919.             {
  1920.                 "property": "payload",
  1921.                 "propertyType": "msg",
  1922.                 "value": "",
  1923.                 "valueType": "entityState"
  1924.             },
  1925.             {
  1926.                 "property": "data",
  1927.                 "propertyType": "msg",
  1928.                 "value": "",
  1929.                 "valueType": "entity"
  1930.             }
  1931.         ],
  1932.         "for": "0",
  1933.         "forType": "num",
  1934.         "forUnits": "minutes",
  1935.         "override_topic": false,
  1936.         "state_location": "payload",
  1937.         "override_payload": "msg",
  1938.         "entity_location": "data",
  1939.         "override_data": "msg",
  1940.         "x": 500,
  1941.         "y": 560,
  1942.         "wires": [
  1943.             [
  1944.                 "3b351859da7be34c"
  1945.             ],
  1946.             []
  1947.         ]
  1948.     },
  1949.     {
  1950.         "id": "c4bc4f515dd2fe23",
  1951.         "type": "cronplus",
  1952.         "z": "47c37038d8e6b38f",
  1953.         "g": "0ee20f2b17f69cb2",
  1954.         "name": "Every hour between 00:00 - 06:00",
  1955.         "outputField": "payload",
  1956.         "timeZone": "",
  1957.         "storeName": "",
  1958.         "commandResponseMsgOutput": "output1",
  1959.         "defaultLocation": "",
  1960.         "defaultLocationType": "default",
  1961.         "outputs": 1,
  1962.         "options": [
  1963.             {
  1964.                 "name": "schedule1",
  1965.                 "topic": "topic1",
  1966.                 "payloadType": "default",
  1967.                 "payload": "",
  1968.                 "expressionType": "cron",
  1969.                 "expression": "30 0 00-06 * * * *",
  1970.                 "location": "",
  1971.                 "offset": "0",
  1972.                 "solarType": "all",
  1973.                 "solarEvents": "sunrise,sunset"
  1974.             }
  1975.         ],
  1976.         "x": 220,
  1977.         "y": 560,
  1978.         "wires": [
  1979.             [
  1980.                 "dd53cadf8f79b275"
  1981.             ]
  1982.         ]
  1983.     },
  1984.     {
  1985.         "id": "afa7e6c.89d5e18",
  1986.         "type": "server",
  1987.         "name": "Home Assistant",
  1988.         "addon": true,
  1989.         "rejectUnauthorizedCerts": true,
  1990.         "ha_boolean": "",
  1991.         "connectionDelay": false,
  1992.         "cacheJson": false,
  1993.         "heartbeat": true,
  1994.         "heartbeatInterval": "30",
  1995.         "statusSeparator": "",
  1996.         "enableGlobalContextStore": false
  1997.     },
  1998.     {
  1999.         "id": "ecd41b68db8d4254",
  2000.         "type": "modbus-client",
  2001.         "name": "Fronius Gen24",
  2002.         "clienttype": "tcp",
  2003.         "bufferCommands": true,
  2004.         "stateLogEnabled": true,
  2005.         "queueLogEnabled": false,
  2006.         "failureLogEnabled": true,
  2007.         "tcpHost": "1.1.1.1",
  2008.         "tcpPort": "502",
  2009.         "tcpType": "DEFAULT",
  2010.         "serialPort": "/dev/ttyUSB",
  2011.         "serialType": "RTU-BUFFERD",
  2012.         "serialBaudrate": "9600",
  2013.         "serialDatabits": "8",
  2014.         "serialStopbits": "1",
  2015.         "serialParity": "none",
  2016.         "serialConnectionDelay": "100",
  2017.         "serialAsciiResponseStartDelimiter": "0x3A",
  2018.         "unit_id": 1,
  2019.         "commandDelay": 1,
  2020.         "clientTimeout": 1000,
  2021.         "reconnectOnTimeout": true,
  2022.         "reconnectTimeout": 2000,
  2023.         "parallelUnitIdsAllowed": true,
  2024.         "showWarnings": true,
  2025.         "showLogs": true
  2026.     }
  2027. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement