[
{
"id": "d2d3985908d2421f",
"type": "vrm-api",
"z": "671e14df2ca553da",
"vrm": "21d5d36c245c4122",
"name": "Get DESS configuration",
"api_type": "installations",
"idUser": "",
"users": "",
"idSite": "464865",
"installations": "stats",
"attribute": "dynamic_ess",
"stats_interval": "15mins",
"show_instance": false,
"stats_start": "0",
"stats_end": "0",
"use_utc": false,
"gps_start": "",
"gps_end": "",
"widgets": "",
"instance": "",
"vrm_id": "",
"country": "",
"b_max": "",
"tb_max": "",
"fb_max": "",
"tg_max": "",
"fg_max": "",
"b_cycle_cost": "",
"buy_price_formula": "",
"sell_price_formula": "",
"green_mode_on": "",
"feed_in_possible": "",
"feed_in_control_on": "",
"b_goal_hour": "",
"b_goal_SOC": "",
"store_in_global_context": false,
"verbose": false,
"x": 630,
"y": 60,
"wires": [
[
"505cf470300f9fbd",
"f9bcc1283441f1ce"
]
]
},
{
"id": "7e4cd656.31676",
"type": "inject",
"z": "671e14df2ca553da",
"name": "Sec",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 60,
"wires": [
[
"d9dc9f17.84ef68"
]
]
},
{
"id": "8183d8ac.01c1e",
"type": "rbe",
"z": "671e14df2ca553da",
"name": "dedup",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "topic",
"x": 410,
"y": 60,
"wires": [
[
"d2d3985908d2421f"
]
]
},
{
"id": "d9dc9f17.84ef68",
"type": "function",
"z": "671e14df2ca553da",
"name": "Period",
"func": "var date = new Date();\nvar min = date.getMinutes();\nmin = min - (min % 15);\nvar hour = date.getHours();\nvar time = hour.toString().padStart(2, '0') + ':' + min.toString().padStart(2, '0');\nnode.status({fill: 'green', shape: 'dot', text: time});\nreturn { payload : time };",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 270,
"y": 60,
"wires": [
[
"8183d8ac.01c1e"
]
]
},
{
"id": "505cf470300f9fbd",
"type": "function",
"z": "671e14df2ca553da",
"name": "Selling price",
"func": "var prices = msg.payload.records.deGs;\nvar price = (prices.length > 0 ? prices[0][1] : 0.0);\nvar fill = (price < 0.0 ? 'red' : 'green');\nvar shape = 'dot';\nvar text = '€' + price.toFixed(2);\nnode.status({fill, shape, text});\nmsg.payload = price;\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 130,
"y": 200,
"wires": [
[
"6ca8014dfa16a19d"
]
]
},
{
"id": "f9bcc1283441f1ce",
"type": "function",
"z": "671e14df2ca553da",
"name": "Buying price",
"func": "var prices = msg.payload.records.deGb;\nvar price = (prices.length > 0 ? prices[0][1] : 0.0);\nvar fill = (price < 0.0 ? 'red' : 'green');\nvar shape = 'dot';\nvar text = '€' + price.toFixed(2);\nnode.status({fill, shape, text});\nmsg.payload = price;\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 130,
"y": 140,
"wires": [
[
"564a4ab6345ab758"
]
]
},
{
"id": "564a4ab6345ab758",
"type": "change",
"z": "671e14df2ca553da",
"name": "topic: buy",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "buy",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 340,
"y": 140,
"wires": [
[
"5d7f1f17f94ff588"
]
]
},
{
"id": "6ca8014dfa16a19d",
"type": "change",
"z": "671e14df2ca553da",
"name": "topic: sell",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "sell",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 340,
"y": 200,
"wires": [
[
"5d7f1f17f94ff588"
]
]
},
{
"id": "21d5d36c245c4122",
"type": "config-vrm-api",
"name": "VRM"
}
]