I have a photovoltaic and want to display the generated power of last day and the current values in the same chart. The reason is e.g. - especialla on days like now - to see, at which time I get a power boost and also to compare values to previous day.
-
Is this possible?
-
I tried something e.g. with persit-node. Here my last try with error output:
[
{
"id": "d1395164b4eec73e",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "3c4d5e6f",
"type": "ui_chart",
"z": "d1395164b4eec73e",
"name": "PV-Verlauf",
"group": "1234abcd",
"order": 0,
"width": 0,
"height": 0,
"label": "PV-Verlauf",
"chartType": "line",
"legend": "true",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "",
"ymax": "",
"removeOlder": "60",
"removeOlderPoints": "",
"removeOlderUnit": "1",
"cutout": 0,
"useOneColor": false,
"useUTC": false,
"colors": [
"#1f77b4",
"#ff7f0e",
"#2ca02c",
"#d62728",
"#9467bd",
"#8c564b",
"#e377c2",
"#7f7f7f",
"#bcbd22"
],
"outputs": 1,
"useDifferentColor": false,
"className": "",
"x": 770,
"y": 200,
"wires": [
[
"6384b542aa7b1ae0",
"fff133a270aad047"
]
]
},
{
"id": "c231fb8e5b4de12d",
"type": "mqtt in",
"z": "d1395164b4eec73e",
"name": "",
"topic": "fronius/pv",
"qos": "2",
"datatype": "auto-detect",
"broker": "5678efgh",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 320,
"y": 120,
"wires": [
[
"e975445ac74efe55"
]
]
},
{
"id": "e975445ac74efe55",
"type": "change",
"z": "d1395164b4eec73e",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "current",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 540,
"y": 160,
"wires": [
[
"3c4d5e6f",
"373d4c6def9679d0"
]
]
},
{
"id": "373d4c6def9679d0",
"type": "debug",
"z": "d1395164b4eec73e",
"name": "current",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "msg",
"x": 960,
"y": 160,
"wires": []
},
{
"id": "6ec3ee6932ad7c1a",
"type": "debug",
"z": "d1395164b4eec73e",
"name": "old",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "msg",
"x": 1210,
"y": 340,
"wires": []
},
{
"id": "6384b542aa7b1ae0",
"type": "debug",
"z": "d1395164b4eec73e",
"name": "chart",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1190,
"y": 200,
"wires": []
},
{
"id": "fff133a270aad047",
"type": "delay",
"z": "d1395164b4eec73e",
"name": "",
"pauseType": "rate",
"timeout": "60",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "60",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 650,
"y": 340,
"wires": [
[
"34c2d5a4e3aa4532"
]
]
},
{
"id": "34c2d5a4e3aa4532",
"type": "change",
"z": "d1395164b4eec73e",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "old",
"tot": "str"
},
{
"t": "move",
"p": "payload[0].data[1]",
"pt": "msg",
"to": "payload[0].data[0]",
"tot": "msg"
},
{
"t": "delete",
"p": "payload[0].data[1]",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 910,
"y": 340,
"wires": [
[
"3c4d5e6f",
"6ec3ee6932ad7c1a",
"22b7950217b71371"
]
]
},
{
"id": "22b7950217b71371",
"type": "ui_chart",
"z": "d1395164b4eec73e",
"name": "PV (old)",
"group": "1234abcd",
"order": 0,
"width": 0,
"height": 0,
"label": "PV old",
"chartType": "line",
"legend": "true",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "",
"ymax": "",
"removeOlder": "60",
"removeOlderPoints": "",
"removeOlderUnit": "1",
"cutout": 0,
"useOneColor": false,
"useUTC": false,
"colors": [
"#1f77b4",
"#ff7f0e",
"#2ca02c",
"#d62728",
"#9467bd",
"#8c564b",
"#e377c2",
"#7f7f7f",
"#bcbd22"
],
"outputs": 1,
"useDifferentColor": false,
"className": "",
"x": 1140,
"y": 440,
"wires": [
[]
]
},
{
"id": "1234abcd",
"type": "ui_group",
"name": "PV-Anlage",
"tab": "abcd1234",
"order": 1,
"disp": true,
"width": "6",
"collapse": false
},
{
"id": "5678efgh",
"type": "mqtt-broker",
"name": "mySHS",
"broker": "192.168.178.51",
"port": "1883",
"clientid": "raspi101",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "abcd1234",
"type": "ui_tab",
"name": "Dashboard",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
}
]
I get the error:
msg : error
"TypeError: oldValue[0].values.data[s].push is not a function"
So perhaps my change-node is wrong:
Thanks for all comment and help