Mauro Andreini:
Extremely useful
[
{
"id": "1b64fbea54c27703",
"type": "group",
"z": "4dc207279e9d07bd",
"name": "UpCyCle Hybrid DESS Trade : D-Bus Schedule Changes",
"style": {
"label": true
},
"nodes": [
"821d48b3bb4fa9a2",
"230b27171c97b3bb",
"26ce65288323da7a",
"6a9658c7046b6e26",
"7b2a8877f1db8ebe",
"a531f0bd34af28df",
"649018a61f280b89",
"199edbba9e565906",
"7c5fb9883d573d56",
"2350315cfa74e095",
"1ad751b5f2c6977d",
"10162a201d0fbdbb",
"5ce196f62f41381f",
"e6db09f73e113c1f",
"2afc09dc12acb495",
"74610d435e16b689",
"73690788fb5e7419",
"84b35721a3f908d4",
"0de47374d029bb3d",
"47f94683a63e7eb3",
"0da8289ecbde53c1",
"64de99a6e23c0634",
"666eaaaae3191b14",
"e56bfcd0459e336d",
"45ea17a66565442c",
"79b7c94c4f2e846d",
"9e35f44e4f702dfe",
"eaaa08f3a6ce251d",
"124ded6d3fbaae55",
"95f1de566ec1d601",
"fd0798269fb1e766",
"e183280373e2b618",
"1b0fb06bc5128652",
"6f9f9622db553fb9",
"d7d6cf53c791757f",
"1f027874f955c875",
"fdb4ea23aaac5bdb",
"bf37d9f1c7d37e10",
"dab69e85945b0792",
"a2429d968ee935a4",
"8b0515db01f6c93c",
"b04b0758ac840dd0",
"a16c4406ece8f86f",
"a820fcef3dafa876",
"871ab152ae6b2460"
],
"x": 3514,
"y": 1519,
"w": 1172,
"h": 442
},
{
"id": "821d48b3bb4fa9a2",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/0/Soc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/0/Soc",
"name": "/Settings/DynamicEss/Schedule/0/Soc",
"type": "number",
"value": 64
},
"name": "dbsSoC0",
"onlyChanges": true,
"x": 3600,
"y": 1560,
"wires": [
[
"0de47374d029bb3d"
]
]
},
{
"id": "230b27171c97b3bb",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/1/Soc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/1/Soc",
"name": "/Settings/DynamicEss/Schedule/1/Soc",
"type": "number",
"value": 62
},
"name": "dbsSoC1",
"onlyChanges": true,
"x": 3640,
"y": 1600,
"wires": [
[
"0de47374d029bb3d"
]
]
},
{
"id": "26ce65288323da7a",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/2/Soc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/2/Soc",
"name": "/Settings/DynamicEss/Schedule/2/Soc",
"type": "number",
"value": 62
},
"name": "dbsSoC2",
"onlyChanges": true,
"x": 3680,
"y": 1640,
"wires": [
[
"0de47374d029bb3d"
]
]
},
{
"id": "6a9658c7046b6e26",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/3/Soc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/3/Soc",
"name": "/Settings/DynamicEss/Schedule/3/Soc",
"type": "number",
"value": 62
},
"name": "dbsSoC3",
"onlyChanges": true,
"x": 3720,
"y": 1680,
"wires": [
[
"0de47374d029bb3d"
]
]
},
{
"id": "7b2a8877f1db8ebe",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/4/Restrictions",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/4/Restrictions",
"name": "/Settings/DynamicEss/Schedule/4/Restrictions",
"type": "number",
"value": 0
},
"name": "dbsRes4",
"onlyChanges": true,
"x": 4360,
"y": 1800,
"wires": [
[
"47f94683a63e7eb3"
]
]
},
{
"id": "a531f0bd34af28df",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/5/Restrictions",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/5/Restrictions",
"name": "/Settings/DynamicEss/Schedule/5/Restrictions",
"type": "number",
"value": 0
},
"name": "dbsRes5",
"onlyChanges": true,
"x": 4400,
"y": 1840,
"wires": [
[
"47f94683a63e7eb3"
]
]
},
{
"id": "649018a61f280b89",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/6/Restrictions",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/6/Restrictions",
"name": "/Settings/DynamicEss/Schedule/6/Restrictions",
"type": "number",
"value": 0
},
"name": "dbsRes6",
"onlyChanges": true,
"x": 4440,
"y": 1880,
"wires": [
[
"47f94683a63e7eb3"
]
]
},
{
"id": "199edbba9e565906",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/7/Restrictions",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/7/Restrictions",
"name": "/Settings/DynamicEss/Schedule/7/Restrictions",
"type": "number",
"value": 0
},
"name": "dbsRes7",
"onlyChanges": true,
"x": 4480,
"y": 1920,
"wires": [
[
"47f94683a63e7eb3"
]
]
},
{
"id": "7c5fb9883d573d56",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/4/Soc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/4/Soc",
"name": "/Settings/DynamicEss/Schedule/4/Soc",
"type": "number",
"value": 61
},
"name": "dbsSoC4",
"onlyChanges": true,
"x": 3600,
"y": 1800,
"wires": [
[
"0de47374d029bb3d"
]
]
},
{
"id": "2350315cfa74e095",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/5/Soc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/5/Soc",
"name": "/Settings/DynamicEss/Schedule/5/Soc",
"type": "number",
"value": 61
},
"name": "dbsSoC5",
"onlyChanges": true,
"x": 3640,
"y": 1840,
"wires": [
[
"0de47374d029bb3d"
]
]
},
{
"id": "1ad751b5f2c6977d",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/6/Soc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/6/Soc",
"name": "/Settings/DynamicEss/Schedule/6/Soc",
"type": "number",
"value": 61
},
"name": "dbsSoC6",
"onlyChanges": true,
"x": 3680,
"y": 1880,
"wires": [
[
"0de47374d029bb3d"
]
]
},
{
"id": "10162a201d0fbdbb",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/7/Soc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/7/Soc",
"name": "/Settings/DynamicEss/Schedule/7/Soc",
"type": "number",
"value": 61
},
"name": "dbsSoC7",
"onlyChanges": true,
"x": 3720,
"y": 1920,
"wires": [
[
"0de47374d029bb3d"
]
]
},
{
"id": "5ce196f62f41381f",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/0/Restrictions",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/0/Restrictions",
"name": "/Settings/DynamicEss/Schedule/0/Restrictions",
"type": "number",
"value": 0
},
"name": "dbsRes0",
"onlyChanges": true,
"x": 4360,
"y": 1560,
"wires": [
[
"47f94683a63e7eb3"
]
]
},
{
"id": "e6db09f73e113c1f",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/1/Restrictions",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/1/Restrictions",
"name": "/Settings/DynamicEss/Schedule/1/Restrictions",
"type": "number",
"value": 0
},
"name": "dbsRes1",
"onlyChanges": true,
"x": 4400,
"y": 1600,
"wires": [
[
"47f94683a63e7eb3"
]
]
},
{
"id": "2afc09dc12acb495",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/2/Restrictions",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/2/Restrictions",
"name": "/Settings/DynamicEss/Schedule/2/Restrictions",
"type": "number",
"value": 0
},
"name": "dbsRes2",
"onlyChanges": true,
"x": 4440,
"y": 1640,
"wires": [
[
"47f94683a63e7eb3"
]
]
},
{
"id": "74610d435e16b689",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/3/Restrictions",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/3/Restrictions",
"name": "/Settings/DynamicEss/Schedule/3/Restrictions",
"type": "number",
"value": 0
},
"name": "dbsRes3",
"onlyChanges": true,
"x": 4480,
"y": 1680,
"wires": [
[
"47f94683a63e7eb3"
]
]
},
{
"id": "73690788fb5e7419",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "link out 89",
"mode": "link",
"links": [
"93342a5994b7ccdc"
],
"x": 3865,
"y": 1740,
"wires": []
},
{
"id": "84b35721a3f908d4",
"type": "debug",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "dbsSoCX",
"active": true,
"tosidebar": false,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "auto",
"x": 3820,
"y": 1780,
"wires": []
},
{
"id": "0de47374d029bb3d",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "Status",
"property": "payload",
"x": 3630,
"y": 1740,
"wires": [
[
"eaaa08f3a6ce251d",
"84b35721a3f908d4"
]
]
},
{
"id": "47f94683a63e7eb3",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "Status",
"property": "payload",
"x": 4390,
"y": 1740,
"wires": [
[
"9e35f44e4f702dfe",
"0da8289ecbde53c1"
]
]
},
{
"id": "0da8289ecbde53c1",
"type": "debug",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "dbsResX",
"active": true,
"tosidebar": false,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "auto",
"x": 4580,
"y": 1780,
"wires": []
},
{
"id": "64de99a6e23c0634",
"type": "victron-input-dess",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.system/0",
"path": "/DynamicEss/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.system/0",
"name": "Venus system"
},
"pathObj": {
"path": "/DynamicEss/TargetSoc",
"type": "float",
"name": "The set target SOC for this time slot (%)"
},
"name": "dbsSoCT",
"onlyChanges": true,
"x": 3820,
"y": 1860,
"wires": [
[
"79b7c94c4f2e846d",
"871ab152ae6b2460"
]
]
},
{
"id": "666eaaaae3191b14",
"type": "victron-input-dess",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.system/0",
"path": "/DynamicEss/Restrictions",
"serviceObj": {
"service": "com.victronenergy.system/0",
"name": "Venus system"
},
"pathObj": {
"path": "/DynamicEss/Restrictions",
"type": "enum",
"name": "Active restrictions",
"enum": {
"0": "No restrictions between battery and the grid",
"1": "Grid to battery energy flow is restricted",
"2": "Battery to grid energy flow is restricted",
"3": "No energy flow between battery and grid"
}
},
"name": "dbsResT",
"onlyChanges": true,
"x": 4580,
"y": 1860,
"wires": [
[
"45ea17a66565442c",
"a16c4406ece8f86f"
]
]
},
{
"id": "e56bfcd0459e336d",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "link out 88",
"mode": "link",
"links": [
"93342a5994b7ccdc"
],
"x": 4625,
"y": 1740,
"wires": []
},
{
"id": "45ea17a66565442c",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "link out 91",
"mode": "link",
"links": [],
"x": 4625,
"y": 1920,
"wires": []
},
{
"id": "79b7c94c4f2e846d",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "link out 92",
"mode": "link",
"links": [],
"x": 3865,
"y": 1920,
"wires": []
},
{
"id": "9e35f44e4f702dfe",
"type": "delay",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "1/1s",
"pauseType": "rate",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 4550,
"y": 1740,
"wires": [
[
"e56bfcd0459e336d"
]
]
},
{
"id": "eaaa08f3a6ce251d",
"type": "delay",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "1/1s",
"pauseType": "rate",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 3790,
"y": 1740,
"wires": [
[
"73690788fb5e7419"
]
]
},
{
"id": "124ded6d3fbaae55",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/4/Strategy",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/4/Strategy",
"name": "/Settings/DynamicEss/Schedule/4/Strategy",
"type": "number",
"value": 3
},
"name": "dbsStr4",
"onlyChanges": true,
"x": 3970,
"y": 1800,
"wires": [
[
"fdb4ea23aaac5bdb"
]
]
},
{
"id": "95f1de566ec1d601",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/5/Strategy",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/5/Strategy",
"name": "/Settings/DynamicEss/Schedule/5/Strategy",
"type": "number",
"value": 2
},
"name": "dbsStr5",
"onlyChanges": true,
"x": 4010,
"y": 1840,
"wires": [
[
"fdb4ea23aaac5bdb"
]
]
},
{
"id": "fd0798269fb1e766",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/6/Strategy",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/6/Strategy",
"name": "/Settings/DynamicEss/Schedule/6/Strategy",
"type": "number",
"value": 2
},
"name": "dbsStr6",
"onlyChanges": true,
"x": 4050,
"y": 1880,
"wires": [
[
"fdb4ea23aaac5bdb"
]
]
},
{
"id": "e183280373e2b618",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/7/Strategy",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/7/Strategy",
"name": "/Settings/DynamicEss/Schedule/7/Strategy",
"type": "number",
"value": 2
},
"name": "dbsStr7",
"onlyChanges": true,
"x": 4090,
"y": 1920,
"wires": [
[
"fdb4ea23aaac5bdb"
]
]
},
{
"id": "1b0fb06bc5128652",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/0/Strategy",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/0/Strategy",
"name": "/Settings/DynamicEss/Schedule/0/Strategy",
"type": "number",
"value": 3
},
"name": "dbsStr0",
"onlyChanges": true,
"x": 3970,
"y": 1560,
"wires": [
[
"fdb4ea23aaac5bdb"
]
]
},
{
"id": "6f9f9622db553fb9",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/1/Strategy",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/1/Strategy",
"name": "/Settings/DynamicEss/Schedule/1/Strategy",
"type": "number",
"value": 3
},
"name": "dbsStr1",
"onlyChanges": true,
"x": 4010,
"y": 1600,
"wires": [
[
"fdb4ea23aaac5bdb"
]
]
},
{
"id": "d7d6cf53c791757f",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/2/Strategy",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/2/Strategy",
"name": "/Settings/DynamicEss/Schedule/2/Strategy",
"type": "number",
"value": 2
},
"name": "dbsStr2",
"onlyChanges": true,
"x": 4050,
"y": 1640,
"wires": [
[
"fdb4ea23aaac5bdb"
]
]
},
{
"id": "1f027874f955c875",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/3/Strategy",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/3/Strategy",
"name": "/Settings/DynamicEss/Schedule/3/Strategy",
"type": "number",
"value": 2
},
"name": "dbsStr3",
"onlyChanges": true,
"x": 4090,
"y": 1680,
"wires": [
[
"fdb4ea23aaac5bdb"
]
]
},
{
"id": "fdb4ea23aaac5bdb",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "Status",
"property": "payload",
"x": 4010,
"y": 1740,
"wires": [
[
"bf37d9f1c7d37e10",
"b04b0758ac840dd0"
]
]
},
{
"id": "bf37d9f1c7d37e10",
"type": "debug",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "dbsStrX",
"active": true,
"tosidebar": false,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "auto",
"x": 4200,
"y": 1780,
"wires": []
},
{
"id": "dab69e85945b0792",
"type": "victron-input-dess",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"service": "com.victronenergy.system/0",
"path": "/DynamicEss/Strategy",
"serviceObj": {
"service": "com.victronenergy.system/0",
"name": "Venus system"
},
"pathObj": {
"path": "/DynamicEss/Strategy",
"type": "enum",
"name": "Used strategy for current time slot",
"enum": {
"0": "Target SOC",
"1": "Self-consumption",
"2": "Pro battery",
"3": "Pro grid"
}
},
"name": "dbsStrT",
"onlyChanges": true,
"x": 4210,
"y": 1860,
"wires": [
[
"8b0515db01f6c93c",
"a820fcef3dafa876"
]
]
},
{
"id": "a2429d968ee935a4",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "link out 100",
"mode": "link",
"links": [
"93342a5994b7ccdc"
],
"x": 4245,
"y": 1740,
"wires": []
},
{
"id": "8b0515db01f6c93c",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "link out 101",
"mode": "link",
"links": [],
"x": 4245,
"y": 1920,
"wires": []
},
{
"id": "b04b0758ac840dd0",
"type": "delay",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "1/1s",
"pauseType": "rate",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 4170,
"y": 1740,
"wires": [
[
"a2429d968ee935a4"
]
]
},
{
"id": "a16c4406ece8f86f",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "Status",
"property": "payload",
"x": 4590,
"y": 1820,
"wires": [
[
"0da8289ecbde53c1"
]
]
},
{
"id": "a820fcef3dafa876",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "Status",
"property": "payload",
"x": 4210,
"y": 1820,
"wires": [
[
"bf37d9f1c7d37e10"
]
]
},
{
"id": "871ab152ae6b2460",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "1b64fbea54c27703",
"name": "Status",
"property": "payload",
"x": 3830,
"y": 1820,
"wires": [
[
"84b35721a3f908d4"
]
]
},
{
"id": "f40dc7f0f42a4262",
"type": "group",
"z": "4dc207279e9d07bd",
"style": {
"stroke": "#999999",
"stroke-opacity": "1",
"fill": "none",
"fill-opacity": "1",
"label": true,
"label-position": "nw",
"color": "#a4a4a4"
},
"nodes": [
"b2baeacd75d4b218",
"93342a5994b7ccdc",
"c923d2996af49859",
"c6e57f38d6abf127",
"ebf9591166618634",
"7bd57c9690528660",
"d2d6f9568b917fa5",
"e5521533a197bdaa",
"bac38fa0dc39a114",
"bad024588fec1edf",
"92e12802258fe9d3",
"36b6d5d4e0f4be98",
"cdcf795c3184dbd0",
"685e18fdc6a006a3",
"3aefe7c24fa0c99b",
"5bef6e40deafe5a2",
"177099cb42783207",
"aade47b7f168241d",
"c63b3d979847f0c2",
"38b4fb3155057968",
"acb4ea9f95fd46f9",
"2ba57527d48dfbd8",
"c3b2a99d57d92cac",
"2a97b53899e94a21",
"9383fbf3ff4b252e",
"71b80e8534a1d458",
"4cdccb71714543e1",
"7614d25c9edc7d5b",
"309c36b0591b9fa8",
"9d1043367606541b",
"16a4dea3196efa95",
"b602c6808c8c3452",
"f1f175c876024aaa",
"a54dd6b5d40c9acb",
"28f521eded645a4e",
"3889f3aa09da0355",
"764a62d603661493",
"6dae752d983641e5"
],
"x": 3134,
"y": 1979,
"w": 942,
"h": 442
},
{
"id": "b2baeacd75d4b218",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "timeslot_vrm_to_grid_fc",
"func": "//\nlet timeslot = msg.timeslot\nlet schedules_key = 'vrm_to_grid_fc'\nlet topic = 'vrmdess_' + schedules_key\n\nlet global_get = 'installations.stats';\n\nlet get_schedules = global.get( global_get )\nlet is_schedules = !( get_schedules == undefined || get_schedules == null )\n\nlet get_records = null\n//let get_totals = 0\n//let get_price = 0\nlet records_length = 0\nvar is_records = false\n\nif ( is_schedules )\n{\n get_records = get_schedules.records[schedules_key]\n// get_totals = get_schedules.totals[schedules_key]\n records_length = get_records.length\n is_records = ( (records_length > 0) ? true : false )\n get_value = ( is_records ? get_records[timeslot][1] : false )\n}\n\nlet rounded = get_value\n\nif ( rounded )\n{\n let factor = 1\n let digits = 0\n let multiplier = 10 ** digits\n let multiplied = rounded * factor * multiplier\n rounded = ( multiplied - multiplied % 1 ) / multiplier \n}\n\nlet fill = ( (rounded !== false) ? 'green' : 'red')\nlet shape = 'dot'\nlet text = ( schedules_key + ' at Q' + timeslot + ' : ' + rounded + 'Wh')\nnode.status({fill, shape, text})\n\nmsg.payload = rounded\nmsg.text = text\nmsg.topic = topic\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3570,
"y": 2260,
"wires": [
[
"ebf9591166618634"
]
]
},
{
"id": "93342a5994b7ccdc",
"type": "link in",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "link in 24",
"links": [
"73690788fb5e7419",
"e56bfcd0459e336d",
"efd3cdb77955abe8",
"a2429d968ee935a4"
],
"x": 3575,
"y": 2020,
"wires": [
[
"cdcf795c3184dbd0"
]
]
},
{
"id": "c923d2996af49859",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "timeslot_vrm_to_battery_fc",
"func": "//\nlet timeslot = msg.timeslot\nlet schedules_key = 'vrm_to_battery_fc'\nlet topic = 'vrmdess_' + schedules_key\n\nlet global_get = 'installations.stats';\n\nlet get_schedules = global.get( global_get )\nlet is_schedules = !( get_schedules == undefined || get_schedules == null )\n\nlet get_records = null\n//let get_totals = 0\n//let get_price = 0\nlet records_length = 0\nvar is_records = false\n\nif ( is_schedules )\n{\n get_records = get_schedules.records[schedules_key]\n// get_totals = get_schedules.totals[schedules_key]\n records_length = get_records.length\n is_records = ( (records_length > 0) ? true : false )\n get_value = ( is_records ? get_records[timeslot][1] : false )\n}\n\nlet rounded = get_value\n\nif ( rounded )\n{\n let factor = 1\n let digits = 0\n let multiplier = 10 ** digits\n let multiplied = rounded * factor * multiplier\n rounded = ( multiplied - multiplied % 1 ) / multiplier \n}\n\nlet fill = ( (rounded !== false) ? 'green' : 'red')\nlet shape = 'dot'\nlet text = ( schedules_key + ' at Q' + timeslot + ' : ' + rounded + 'Wh')\nnode.status({fill, shape, text})\n\nmsg.payload = rounded\nmsg.text = text\nmsg.topic = topic\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3580,
"y": 2140,
"wires": [
[
"2ba57527d48dfbd8",
"e5521533a197bdaa"
]
]
},
{
"id": "c6e57f38d6abf127",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "timeslot_deGb",
"func": "//\nlet timeslot = msg.timeslot\nlet schedules_key = 'deGb'\nlet topic = 'vrmdess_' + schedules_key\n\nlet global_get = 'installations.stats';\n\nlet get_schedules = global.get( global_get )\nlet is_schedules = !( get_schedules == undefined || get_schedules == null )\n\nlet get_records = null\n//let get_totals = 0\nlet get_price = 0\nlet records_length = 0\nvar is_records = false\n\nif ( is_schedules )\n{\n get_records = get_schedules.records[schedules_key]\n// get_totals = get_schedules.totals[schedules_key]\n records_length = get_records.length\n is_records = ( (records_length > 0) ? true : false )\n get_value = ( is_records ? get_records[timeslot][1] : false )\n}\n\nlet rounded = get_value\n\nif ( rounded )\n{\n let factor = 100\n let digits = 3\n let multiplier = 10 ** digits\n let multiplied = rounded * factor * multiplier\n rounded = ( multiplied - multiplied % 1 ) / multiplier \n}\n\nlet fill = ( (rounded !== false) ? 'green' : 'red')\nlet shape = 'dot'\nlet text = ( schedules_key + ' at Q' + timeslot + ' : ' + rounded + 'ct')\nnode.status({fill, shape, text})\n\nmsg.payload = rounded\nmsg.text = text\nmsg.topic = topic\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3240,
"y": 2260,
"wires": [
[
"71b80e8534a1d458"
]
]
},
{
"id": "ebf9591166618634",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": ">=800",
"func": "if (msg.payload >= 800)\n{\n msg.payload = true\n} else {\n msg.payload = false\n}\nreturn msg",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3830,
"y": 2260,
"wires": [
[
"d2d6f9568b917fa5"
]
]
},
{
"id": "7bd57c9690528660",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "link out 42",
"mode": "link",
"links": [
"6f1e157dc56351ca",
"b61b54d0bcbfa1da"
],
"x": 4035,
"y": 2260,
"wires": []
},
{
"id": "d2d6f9568b917fa5",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "Status",
"property": "payload",
"x": 3950,
"y": 2260,
"wires": [
[
"7bd57c9690528660"
]
]
},
{
"id": "e5521533a197bdaa",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "-800 > x < 1600",
"func": "let bool = false\nif ( (msg.payload > -800 ) && (msg.payload < 1600) )\n{\n bool = true\n}\nmsg.payload = bool\nreturn msg",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3800,
"y": 2200,
"wires": [
[
"bad024588fec1edf"
]
]
},
{
"id": "bac38fa0dc39a114",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "link out 43",
"mode": "link",
"links": [],
"x": 4035,
"y": 2200,
"wires": []
},
{
"id": "bad024588fec1edf",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "Status",
"property": "payload",
"x": 3950,
"y": 2200,
"wires": [
[
"bac38fa0dc39a114"
]
]
},
{
"id": "92e12802258fe9d3",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "link out 46",
"mode": "link",
"links": [
"ee0df1fd2c8fb89c",
"4e2c898b8a534dc3"
],
"x": 4035,
"y": 2140,
"wires": []
},
{
"id": "36b6d5d4e0f4be98",
"type": "delay",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "1/15s",
"pauseType": "rate",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "15",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 3830,
"y": 2020,
"wires": [
[
"685e18fdc6a006a3"
]
]
},
{
"id": "cdcf795c3184dbd0",
"type": "change",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "timestamp",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "timestamp",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "date"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 3690,
"y": 2020,
"wires": [
[
"36b6d5d4e0f4be98"
]
]
},
{
"id": "685e18fdc6a006a3",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "Status",
"property": "payload",
"x": 3950,
"y": 2020,
"wires": [
[
"4cdccb71714543e1",
"3889f3aa09da0355"
]
]
},
{
"id": "3aefe7c24fa0c99b",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "SoC_0",
"func": "//\nlet index = 0\nlet timeslot = msg.timeslot\nlet hourf = timeslot / 4\nlet hour = hourf - ( hourf %1 )\ntimeslot = 4 * hour + index\nlet schedules_key = 'vrm_soc_plan'\nlet topic = 'vrmdess_' + schedules_key\n\nlet global_get = 'installations.stats';\n\nlet get_schedules = global.get( global_get )\nlet is_schedules = !( get_schedules == undefined || get_schedules == null )\n\nlet get_records = null\n//let get_totals = 0\n//let get_price = 0\nlet records_length = 0\nvar is_records = false\n\nif ( is_schedules )\n{\n get_records = get_schedules.records[schedules_key]\n// get_totals = get_schedules.totals[schedules_key]\n records_length = get_records.length\n is_records = ( (records_length > 0) ? true : false )\n get_value = ( is_records ? get_records[timeslot][1] : false )\n}\n\nlet rounded = get_value\n\nif ( rounded )\n{\n let factor = 1\n let digits = 6\n let multiplier = 10 ** digits\n let multiplied = rounded * factor * multiplier\n rounded = ( multiplied - multiplied % 1 ) / multiplier \n}\n\nlet fill = ( (rounded !== false) ? 'green' : 'red')\nlet shape = 'dot'\nlet text = ( schedules_key + ' at Q' + timeslot + ' : ' + rounded + '%')\nnode.status({fill, shape, text})\n\nmsg.payload = rounded\nmsg.text = text\nmsg.topic = topic\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3210,
"y": 2380,
"wires": [
[]
]
},
{
"id": "5bef6e40deafe5a2",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "SoC_1",
"func": "//\nlet index = 1\nlet timeslot = msg.timeslot\nlet hourf = timeslot / 4\nlet hour = hourf - ( hourf %1 )\ntimeslot = 4 * hour + index\nlet schedules_key = 'vrm_soc_plan'\nlet topic = 'vrmdess_' + schedules_key\n\nlet global_get = 'installations.stats';\n\nlet get_schedules = global.get( global_get )\nlet is_schedules = !( get_schedules == undefined || get_schedules == null )\n\nlet get_records = null\n//let get_totals = 0\n//let get_price = 0\nlet records_length = 0\nvar is_records = false\n\nif ( is_schedules )\n{\n get_records = get_schedules.records[schedules_key]\n// get_totals = get_schedules.totals[schedules_key]\n records_length = get_records.length\n is_records = ( (records_length > 0) ? true : false )\n get_value = ( is_records ? get_records[timeslot][1] : false )\n}\n\nlet rounded = get_value\n\nif ( rounded )\n{\n let factor = 1\n let digits = 6\n let multiplier = 10 ** digits\n let multiplied = rounded * factor * multiplier\n rounded = ( multiplied - multiplied % 1 ) / multiplier \n}\n\nlet fill = ( (rounded !== false) ? 'green' : 'red')\nlet shape = 'dot'\nlet text = ( schedules_key + ' at Q' + timeslot + ' : ' + rounded + '%')\nnode.status({fill, shape, text})\n\nmsg.payload = rounded\nmsg.text = text\nmsg.topic = topic\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3390,
"y": 2380,
"wires": [
[]
]
},
{
"id": "177099cb42783207",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "SoC_2",
"func": "//\nlet index = 2\nlet timeslot = msg.timeslot\nlet hourf = timeslot / 4\nlet hour = hourf - ( hourf %1 )\ntimeslot = 4 * hour + index\nlet schedules_key = 'vrm_soc_plan'\nlet topic = 'vrmdess_' + schedules_key\n\nlet global_get = 'installations.stats';\n\nlet get_schedules = global.get( global_get )\nlet is_schedules = !( get_schedules == undefined || get_schedules == null )\n\nlet get_records = null\n//let get_totals = 0\n//let get_price = 0\nlet records_length = 0\nvar is_records = false\n\nif ( is_schedules )\n{\n get_records = get_schedules.records[schedules_key]\n// get_totals = get_schedules.totals[schedules_key]\n records_length = get_records.length\n is_records = ( (records_length > 0) ? true : false )\n get_value = ( is_records ? get_records[timeslot][1] : false )\n}\n\nlet rounded = get_value\n\nif ( rounded )\n{\n let factor = 1\n let digits = 6\n let multiplier = 10 ** digits\n let multiplied = rounded * factor * multiplier\n rounded = ( multiplied - multiplied % 1 ) / multiplier \n}\n\nlet fill = ( (rounded !== false) ? 'green' : 'red')\nlet shape = 'dot'\nlet text = ( schedules_key + ' at Q' + timeslot + ' : ' + rounded + '%')\nnode.status({fill, shape, text})\n\nmsg.payload = rounded\nmsg.text = text\nmsg.topic = topic\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3570,
"y": 2380,
"wires": [
[]
]
},
{
"id": "aade47b7f168241d",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "SoC_3",
"func": "//\nlet index = 3\nlet timeslot = msg.timeslot\nlet hourf = timeslot / 4\nlet hour = hourf - ( hourf %1 )\ntimeslot = 4 * hour + index\nlet schedules_key = 'vrm_soc_plan'\nlet topic = 'vrmdess_' + schedules_key\n\nlet global_get = 'installations.stats';\n\nlet get_schedules = global.get( global_get )\nlet is_schedules = !( get_schedules == undefined || get_schedules == null )\n\nlet get_records = null\n//let get_totals = 0\n//let get_price = 0\nlet records_length = 0\nvar is_records = false\n\nif ( is_schedules )\n{\n get_records = get_schedules.records[schedules_key]\n// get_totals = get_schedules.totals[schedules_key]\n records_length = get_records.length\n is_records = ( (records_length > 0) ? true : false )\n get_value = ( is_records ? get_records[timeslot][1] : false )\n}\n\nlet rounded = get_value\n\nif ( rounded )\n{\n let factor = 1\n let digits = 6\n let multiplier = 10 ** digits\n let multiplied = rounded * factor * multiplier\n rounded = ( multiplied - multiplied % 1 ) / multiplier \n}\n\nlet fill = ( (rounded !== false) ? 'green' : 'red')\nlet shape = 'dot'\nlet text = ( schedules_key + ' at Q' + timeslot + ' : ' + rounded + '%')\nnode.status({fill, shape, text})\n\nmsg.payload = rounded\nmsg.text = text\nmsg.topic = topic\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3750,
"y": 2380,
"wires": [
[]
]
},
{
"id": "c63b3d979847f0c2",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "SoC_4",
"func": "//\nlet index = 4\nlet timeslot = msg.timeslot\nlet hourf = timeslot / 4\nlet hour = hourf - ( hourf %1 )\ntimeslot = 4 * hour + index\nlet schedules_key = 'vrm_soc_plan'\nlet topic = 'vrmdess_' + schedules_key\n\nlet global_get = 'installations.stats';\n\nlet get_schedules = global.get( global_get )\nlet is_schedules = !( get_schedules == undefined || get_schedules == null )\n\nlet get_records = null\n//let get_totals = 0\n//let get_price = 0\nlet records_length = 0\nvar is_records = false\n\nif ( is_schedules )\n{\n get_records = get_schedules.records[schedules_key]\n// get_totals = get_schedules.totals[schedules_key]\n records_length = get_records.length\n is_records = ( (records_length > 0) ? true : false )\n get_value = ( is_records ? get_records[timeslot][1] : false )\n}\n\nlet rounded = get_value\n\nif ( rounded )\n{\n let factor = 1\n let digits = 6\n let multiplier = 10 ** digits\n let multiplied = rounded * factor * multiplier\n rounded = ( multiplied - multiplied % 1 ) / multiplier \n}\n\nlet fill = ( (rounded !== false) ? 'green' : 'red')\nlet shape = 'dot'\nlet text = ( schedules_key + ' at Q' + timeslot + ' : ' + rounded + '%')\nnode.status({fill, shape, text})\n\nmsg.payload = rounded\nmsg.text = text\nmsg.topic = topic\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3930,
"y": 2380,
"wires": [
[]
]
},
{
"id": "38b4fb3155057968",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "vrmSoC",
"func": "//\n//let index = 0\nlet timeslot = msg.timeslot\n\n/*\n//let hourf = timeslot / 4\n//let hour = hourf - ( hourf %1 )\n//timeslot = timeslot + index\nlet schedules_key = 'vrm_soc_plan'\nlet topic = 'vrmdess_' + schedules_key\n\nlet global_get = 'installations.stats';\n\nlet get_schedules = global.get( global_get )\nlet is_schedules = !( get_schedules == undefined || get_schedules == null )\n\nlet get_records = null\n//let get_totals = 0\n//let get_price = 0\nlet records_length = 0\nvar is_records = false\n\nif ( is_schedules )\n{\n get_records = get_schedules.records[schedules_key]\n// get_totals = get_schedules.totals[schedules_key]\n records_length = get_records.length\n is_records = ( (records_length > 0) ? true : false )\n get_value = ( is_records ? get_records[timeslot][1] : false )\n}\n\nlet rounded = get_value\n*/\nlet rounded = msg.payload.curValue;\nif ( rounded )\n{\n let factor = 1\n let digits = 6\n let multiplier = 10 ** digits\n let multiplied = rounded * factor * multiplier\n rounded = ( multiplied - multiplied % 1 ) / multiplier \n}\n\nlet fill = ( (rounded !== false) ? 'green' : 'red')\nlet shape = 'dot'\nlet text = ( 'vrmSoC(' + timeslot + '): ' + rounded + '%')\nnode.status({fill, shape, text})\n\nmsg.payload = rounded\nmsg.text = text\nmsg.topic = 'vrmSoC'\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3820,
"y": 2320,
"wires": [
[
"6dae752d983641e5"
]
]
},
{
"id": "acb4ea9f95fd46f9",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "Status",
"property": "payload",
"x": 3950,
"y": 2140,
"wires": [
[
"92e12802258fe9d3"
]
]
},
{
"id": "2ba57527d48dfbd8",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": ">=1600",
"func": "if (msg.payload >= 1600)\n{\n msg.payload = true\n} else {\n msg.payload = false\n}\nreturn msg",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3820,
"y": 2140,
"wires": [
[
"acb4ea9f95fd46f9"
]
]
},
{
"id": "c3b2a99d57d92cac",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "link out 24",
"mode": "link",
"links": [
"43f4eff631cea5e3"
],
"x": 3675,
"y": 2200,
"wires": []
},
{
"id": "2a97b53899e94a21",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "metrics vrm_soc_plan",
"func": "/**\n * Processes schedule object to compute length, start/end times, min/max with indices, and averages.\n * Outputs single msg.payload with all metrics; stores in flow context.\n * @param {Object} msg Node-RED message with payload.schedule (array of [timestamp, value] pairs)\n * @returns {Object} msg with payload {length, startTime, endTime, minIndex, minTime, minValue, maxIndex, maxTime, maxValue, currentIndex, currentTime, currentValue, fullAverage, forwardAverage}\n */\n\nlet payload = msg.payload; //usually timestamp\n\nlet schedules_key = 'vrm_soc_plan';\nlet topic = 'vrmdess_' + schedules_key;\n\nlet global_get = 'installations.stats';\nlet get_schedules = global.get( global_get );\nlet is_schedules = !( get_schedules == undefined || get_schedules == null );\n\nlet get_records = null;\nif ( is_schedules ) {\n get_records = get_schedules.records[schedules_key]\n}\nlet schedule = get_records;\n\n//\nconst length = schedule.length; //TODO Fix for venusos update, length unknown\n \nif (!length || !Array.isArray(schedule)) {\n node.warn(\"Invalid or empty schedule array\");\n msg.payload = { error: \"Invalid or empty schedule array\" };\n return msg;\n}\n\nconst curTimeSec = Math.floor(Date.now() ); // / 1000);\nlet startTime = null;\nlet endTime = null;\nlet minIndex = null;\nlet minTime = null;\nlet minValue = null;\nlet maxIndex = null;\nlet maxTime = null;\nlet maxValue = null;\nlet minfwdIndex = null;\nlet minfwdTime = null;\nlet minfwdValue = null;\nlet maxfwdIndex = null;\nlet maxfwdTime = null;\nlet maxfwdValue = null;\nlet curIndex = null;\nlet curTime = null;\nlet curValue = null;\nlet fullSum = 0;\nlet fullCount = 0;\nlet fwdSum = 0;\nlet fwdCount = 0;\nlet lastValue = 0;\nlet fwdupSum = 0;\nlet fwddwnSum = 0;\n\nfor (const [idx, [timestamp, value]] of schedule.entries()) {\n // Validate data pair\n if (!Array.isArray([timestamp, value]) || typeof timestamp !== \"number\" || !Number.isInteger(timestamp) || typeof value !== \"number\" || isNaN(value)) {\n node.warn(`Invalid data at schedule[${idx}]`);\n continue;\n }\n // Update start/end times\n if (startTime === null || timestamp < startTime) startTime = timestamp;\n if (endTime === null || timestamp > endTime) endTime = timestamp;\n // Update min/max\n if (minValue === null || value < minValue) {\n minIndex = idx;\n minTime = timestamp;\n minValue = value;\n }\n if (maxValue === null || value > maxValue) {\n maxIndex = idx;\n maxTime = timestamp;\n maxValue = value;\n }\n // Update averages\n fullSum += value;\n fullCount++;\n //Update forward averages\n if ( (timestamp + 900*1000) >= curTimeSec) {\n if (curIndex === null) {\n curIndex = idx;\n curTime = timestamp;\n curValue = value;\n }\n // Update minfwd/maxfwd\n if (minfwdValue === null || value < minfwdValue) {\n minfwdIndex = idx;\n minfwdTime = timestamp;\n minfwdValue = value;\n }\n if (maxfwdValue === null || value > maxfwdValue) {\n maxfwdIndex = idx;\n maxfwdTime = timestamp;\n maxfwdValue = value;\n }\n fwdSum += value;\n if (lastValue > 0) {\n if (value > lastValue) fwdupSum += (value - lastValue);\n if (value < lastValue) fwddwnSum += (value - lastValue); \n fwdCount++;\n }\n }\n // set lastvalue before forwards calculations\n lastValue = value;\n}\n\n// Compute metrics\nlet fullAverage = fullCount > 0 ? fullSum / fullCount : 0;\nlet fwdAverage = fwdCount > 0 ? fwdSum / fwdCount : 0;\nlet fullMiddle = (maxValue + minValue) / 2\nlet fwdMiddle = (maxfwdValue + minfwdValue) / 2\n\n// Validate results\nif (length === 0 || startTime === null || minValue === null) {\n node.warn(\"No valid data found\");\n msg.payload = { error: \"No valid data found\" };\n return msg;\n}\n/*\n// Set output\nconst result = {\n length,\n startTime,\n endTime,\n minIndex,\n minTime,\n minValue,\n maxIndex,\n maxTime,\n maxValue,\n minfwdIndex,\n minfwdTime,\n minfwdValue,\n maxfwdIndex,\n maxfwdTime,\n maxfwdValue,\n curIndex,\n curTime,\n curValue,\n fullAverage,\n fwdAverage,\n fullMiddle,\n fwdMiddle\n};\n*/\nlet digits = 1000\ncurValue = Math.round(digits*curValue)/digits;\nfwdAverage = Math.round(digits*fwdAverage)/digits;\nfwdupSum = Math.round(digits*fwdupSum)/digits;\nfwddwnSum = Math.round(digits*fwddwnSum)/digits;\nminfwdValue = Math.round(digits*minfwdValue)/digits;\nfwdMiddle = Math.round(digits*fwdMiddle)/digits;\nmaxfwdValue = Math.round(digits*maxfwdValue)/digits;\nfullAverage = Math.round(digits*fullAverage)/digits;\nminValue = Math.round(digits*minValue)/digits;\nfullMiddle = Math.round(digits*fullMiddle)/digits;\nmaxValue = Math.round(digits*fullMiddle)/digits;\nlength,\ncurIndex,\nminIndex,\nminfwdIndex,\nmaxfwdIndex,\nmaxIndex,\nstartTime,\ncurTime,\nminTime,\nminfwdTime,\nmaxfwdTime,\nmaxTime,\nendTime\n\nconst result = {\n curValue,\n fwdAverage,\n fwdupSum,\n fwddwnSum,\n minfwdValue,\n fwdMiddle,\n maxfwdValue,\n fullAverage,\n minValue,\n fullMiddle,\n maxValue,\n length,\n curIndex,\n minIndex,\n minfwdIndex,\n maxfwdIndex,\n maxIndex,\n startTime,\n curTime,\n minTime,\n minfwdTime,\n maxfwdTime,\n maxTime,\n endTime\n};\n\n// Store in flow context\nflow.set(\"vrmMETRICS\", result);\n\n// Store in global context\n// global.set(\"vrm_soc_plan\", result);\n\nmsg.timestamp = payload;\nmsg.timeslot = curIndex;\nmsg.payload = result;\nmsg.topic = topic;\n\nreturn msg;\n//",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3260,
"y": 2200,
"wires": [
[
"b2baeacd75d4b218",
"c923d2996af49859",
"c6e57f38d6abf127",
"9d1043367606541b",
"c3b2a99d57d92cac",
"9383fbf3ff4b252e"
]
]
},
{
"id": "9383fbf3ff4b252e",
"type": "debug",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "vrmMETRICS",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload.curValue",
"statusType": "msg",
"x": 3540,
"y": 2200,
"wires": []
},
{
"id": "71b80e8534a1d458",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "link out 94",
"mode": "link",
"links": [
"88540bff3f5b326c"
],
"x": 3355,
"y": 2260,
"wires": []
},
{
"id": "4cdccb71714543e1",
"type": "vrm-api",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"vrm": "9e7340b4a2802944",
"name": "STATS DESS",
"api_type": "installations",
"idUser": "",
"idSite": "{{flow.siteId}}",
"installations": "stats",
"attribute": "dynamic_ess",
"stats_interval": "15mins",
"show_instance": false,
"stats_start": "bod",
"stats_end": "eot",
"use_utc": false,
"gps_start": "",
"gps_end": "",
"widgets": "PVInverterStatus",
"instance": "",
"store_in_global_context": true,
"verbose": false,
"transform_price_schedule": true,
"outputs": 2,
"x": 3240,
"y": 2080,
"wires": [
[
"309c36b0591b9fa8",
"7614d25c9edc7d5b"
],
[
"7614d25c9edc7d5b"
]
]
},
{
"id": "7614d25c9edc7d5b",
"type": "debug",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "STATS DESS",
"active": true,
"tosidebar": false,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "auto",
"x": 3540,
"y": 2080,
"wires": []
},
{
"id": "309c36b0591b9fa8",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "Status",
"property": "payload",
"x": 3210,
"y": 2140,
"wires": [
[
"2a97b53899e94a21"
]
]
},
{
"id": "9d1043367606541b",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "mux",
"func": "return msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3510,
"y": 2320,
"wires": [
[
"3aefe7c24fa0c99b",
"5bef6e40deafe5a2",
"177099cb42783207",
"aade47b7f168241d",
"c63b3d979847f0c2",
"38b4fb3155057968"
]
]
},
{
"id": "16a4dea3196efa95",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "timeslot",
"func": "//\nlet timestamp = msg.payload\n\nlet schedules_key = 'vrm_soc_plan'\nlet topic = 'vrmdess_' + schedules_key\nlet global_get = 'installations.fetch-dynamic-ess-schedules'\nlet get_schedules = global.get( global_get )\nlet is_schedules = !( get_schedules == undefined || get_schedules == null )\nlet get_records = null\nlet records_length = 0\nvar is_records = false\nif ( is_schedules )\n{\n get_records = get_schedules.records[schedules_key]\n records_length = get_records.length\n is_records = ( (records_length > 0) ? true : false )\n get_value = ( is_records ? get_records[0][0] : false )\n}\nlet schedulestart = get_value\nlet secondsfromstart = ( timestamp - schedulestart ) / 1000\n\nlet quarterfromstartf = ( secondsfromstart / ( 60 * 15 ) )\nlet quarterfromstart = quarterfromstartf - ( quarterfromstartf % 1 )\n\ntimeslot =quarterfromstart // test wintertijd\n\nlet fill = ( 'green' )\nlet shape = 'dot'\nlet text = ( 'timeslot : ' + timeslot )\n\nnode.status({fill, shape, text})\n//msg.payload = timeslot\nmsg.timeslot = timeslot\nmsg.topic = 'timeslot'\nreturn msg;\n\n\n\n\n\n",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3220,
"y": 2320,
"wires": [
[]
]
},
{
"id": "b602c6808c8c3452",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "query",
"func": "const getStartOfDay = (date) => {\n const start = new Date(date)\n start.setHours(0, 0, 0, 0)\n return Math.floor(start.getTime() / 1000)\n}\n\nconst now = new Date()\n\nconst start = getStartOfDay(now)\n \nconst endOfTomorrow = new Date(now)\nendOfTomorrow.setDate(endOfTomorrow.getDate() + 1)\nendOfTomorrow.setHours(23, 59, 59, 999)\nconst end = Math.floor(endOfTomorrow.getTime() / 1000)\n\nconst siteId = flow.get('siteId')\n\nmsg.method = 'get'\nmsg.url = 'https://vrmapi.victronenergy.com/v2'\nmsg.query = `installations/${siteId}/stats?type=dynamic_ess&interval=15mins&start=${start}&end=${end}`\nmsg.topic = 'installations fetch-dynamic-ess-schedules'\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3770,
"y": 2080,
"wires": [
[]
]
},
{
"id": "f1f175c876024aaa",
"type": "inject",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "quarter",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "*/15 0-23 * * *",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 3240,
"y": 2020,
"wires": [
[
"a54dd6b5d40c9acb"
]
]
},
{
"id": "a54dd6b5d40c9acb",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "link out 86",
"mode": "link",
"links": [
"4ceb2c68b4151487"
],
"x": 3335,
"y": 2020,
"wires": []
},
{
"id": "28f521eded645a4e",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "link out 99",
"mode": "link",
"links": [
"91b5076b60b12915"
],
"x": 4035,
"y": 2320,
"wires": []
},
{
"id": "3889f3aa09da0355",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "link out 93",
"mode": "link",
"links": [],
"x": 4035,
"y": 2020,
"wires": []
},
{
"id": "764a62d603661493",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "1 || 2 || 7 || 9 -> true",
"func": "//\nif ( msg.payload == 1 || msg.payload == 2 || msg.payload == 7 || msg.payload == 9 )\n{\n msg.payload = true\n return msg\n}",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3950,
"y": 2080,
"wires": [
[]
]
},
{
"id": "6dae752d983641e5",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "f40dc7f0f42a4262",
"name": "Status",
"property": "payload",
"x": 3950,
"y": 2320,
"wires": [
[
"28f521eded645a4e"
]
]
},
{
"id": "9e7340b4a2802944",
"type": "config-vrm-api",
"name": "VRM API"
},
{
"id": "642c881d3af1b38d",
"type": "group",
"z": "4dc207279e9d07bd",
"name": "",
"style": {
"label": true
},
"nodes": [
"91b5076b60b12915",
"e07a587480607011",
"6f9f69bcdc87ec5e",
"dd2a64bad15a9509",
"6dbea6ca361d2b6f",
"4f4ce854ba5452fd",
"9eb58497807ed1b6",
"e1cb25ec05ba975d",
"636273a783cce562",
"07ac8e4edb411ec0",
"ee0df1fd2c8fb89c",
"2a7b65ec4342e461",
"bfbaf78b61687005",
"6f1e157dc56351ca",
"c903b449778772c7",
"a037d629538f4825",
"efaa53335d847932",
"22ce6fed535810d7",
"c6f710667eeb3fd0",
"77b3653dd0c59033",
"4857f0eea6e100d3",
"c5b3f8bf2f23feb9",
"39040470f343f07d",
"03be4b6845126570",
"97278629cfca2ea6",
"25b11973814b5690",
"7ee0af1c8c88c984"
],
"x": 4094,
"y": 1979,
"w": 592,
"h": 362
},
{
"id": "91b5076b60b12915",
"type": "link in",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "link in 43",
"links": [
"28f521eded645a4e"
],
"x": 4135,
"y": 2080,
"wires": [
[
"03be4b6845126570"
]
]
},
{
"id": "e07a587480607011",
"type": "inject",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "delta",
"payload": "0.75",
"payloadType": "num",
"x": 4200,
"y": 2020,
"wires": [
[
"dd2a64bad15a9509"
]
]
},
{
"id": "6f9f69bcdc87ec5e",
"type": "inject",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "delta",
"payload": "-0.75",
"payloadType": "num",
"x": 4210,
"y": 2240,
"wires": [
[
"4f4ce854ba5452fd"
]
]
},
{
"id": "dd2a64bad15a9509",
"type": "SumUltimate",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "sup",
"property": "payload",
"math": "sum",
"subtractstartfrom": "LastScheduledEnd",
"x": 4350,
"y": 2020,
"wires": [
[
"6dbea6ca361d2b6f"
]
]
},
{
"id": "6dbea6ca361d2b6f",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "m2rnd",
"func": "if ( msg.measurements == 2)\n{\n msg.payload = Math.round( msg.payload )\n if ( msg.payload > 100 )\n {\n msg.payload = 100\n }\n msg.topic = 'dbsSoC'\n let fill = ( 'green' )\n let shape = 'dot'\n let text = ( msg.topic + ': ' + msg.payload )\n node.status({fill, shape, text})\n return msg\n}\nreturn",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 4470,
"y": 2020,
"wires": [
[
"e1cb25ec05ba975d"
]
]
},
{
"id": "4f4ce854ba5452fd",
"type": "SumUltimate",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "sdn",
"property": "payload",
"math": "sum",
"subtractstartfrom": "LastScheduledEnd",
"x": 4350,
"y": 2240,
"wires": [
[
"4857f0eea6e100d3"
]
]
},
{
"id": "9eb58497807ed1b6",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "link out 87",
"mode": "link",
"links": [
"fa5947cdaac82e6a"
],
"x": 4645,
"y": 2300,
"wires": []
},
{
"id": "e1cb25ec05ba975d",
"type": "InterruptFlowUltimate",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "block",
"triggertopic": "up",
"initializewith": "0",
"autoToggle": "0",
"payloadPropName": "payload",
"translatorConfig": "",
"x": 4600,
"y": 2020,
"wires": [
[
"2a7b65ec4342e461"
]
]
},
{
"id": "636273a783cce562",
"type": "InterruptFlowUltimate",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "block",
"triggertopic": "dn",
"initializewith": "0",
"autoToggle": "0",
"payloadPropName": "payload",
"translatorConfig": "",
"x": 4600,
"y": 2240,
"wires": [
[
"2a7b65ec4342e461"
]
]
},
{
"id": "07ac8e4edb411ec0",
"type": "change",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "up",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "up",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 4390,
"y": 2080,
"wires": [
[
"e1cb25ec05ba975d",
"a037d629538f4825"
]
]
},
{
"id": "ee0df1fd2c8fb89c",
"type": "link in",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "link in 49",
"links": [
"92e12802258fe9d3"
],
"x": 4315,
"y": 2080,
"wires": [
[
"07ac8e4edb411ec0"
]
]
},
{
"id": "2a7b65ec4342e461",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "Status",
"property": "payload",
"x": 4430,
"y": 2300,
"wires": [
[
"9eb58497807ed1b6",
"97278629cfca2ea6"
]
]
},
{
"id": "bfbaf78b61687005",
"type": "change",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "dn",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "dn",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 4390,
"y": 2120,
"wires": [
[
"636273a783cce562",
"a037d629538f4825"
]
]
},
{
"id": "6f1e157dc56351ca",
"type": "link in",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "link in 50",
"links": [
"7bd57c9690528660"
],
"x": 4315,
"y": 2120,
"wires": [
[
"bfbaf78b61687005"
]
]
},
{
"id": "c903b449778772c7",
"type": "InvertUltimate",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "Invert",
"payloadPropName": "payload",
"x": 4570,
"y": 2140,
"wires": [
[
"efaa53335d847932",
"c5b3f8bf2f23feb9"
]
]
},
{
"id": "a037d629538f4825",
"type": "BooleanLogicUltimate",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "go",
"payloadPropName": "payload",
"filtertrue": "both",
"persist": true,
"sInitializeWith": "WaitForPayload",
"triggertopic": "trigger",
"outputtriggeredby": "all",
"inputCount": "2",
"topic": "go",
"restrictinputevaluation": false,
"delayEvaluation": "0",
"translatorConfig": "",
"x": 4570,
"y": 2080,
"wires": [
[],
[
"c903b449778772c7"
],
[]
]
},
{
"id": "efaa53335d847932",
"type": "InterruptFlowUltimate",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "block",
"triggertopic": "go",
"initializewith": "0",
"autoToggle": "0",
"payloadPropName": "payload",
"translatorConfig": "",
"x": 4600,
"y": 2180,
"wires": [
[
"2a7b65ec4342e461"
]
]
},
{
"id": "22ce6fed535810d7",
"type": "inject",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "delta",
"payload": "-0.0",
"payloadType": "num",
"x": 4200,
"y": 2180,
"wires": [
[
"c6f710667eeb3fd0"
]
]
},
{
"id": "c6f710667eeb3fd0",
"type": "SumUltimate",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "soc",
"property": "payload",
"math": "sum",
"subtractstartfrom": "LastScheduledEnd",
"x": 4350,
"y": 2180,
"wires": [
[
"77b3653dd0c59033"
]
]
},
{
"id": "77b3653dd0c59033",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "m2rnd",
"func": "if ( msg.measurements == 2)\n{\n msg.payload = Math.round( msg.payload )\n if ( msg.payload > 100 )\n {\n msg.payload = 100\n }\n msg.topic = 'dbsSoC'\n let fill = ( 'green' )\n let shape = 'dot'\n let text = ( msg.topic + ': ' + msg.payload )\n node.status({fill, shape, text})\n return msg\n}\nreturn",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 4470,
"y": 2180,
"wires": [
[
"efaa53335d847932"
]
]
},
{
"id": "4857f0eea6e100d3",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "m2rnd",
"func": "if ( msg.measurements == 2)\n{\n msg.payload = Math.round( msg.payload )\n if ( msg.payload > 100 )\n {\n msg.payload = 100\n }\n msg.topic = 'dbsSoC'\n let fill = ( 'green' )\n let shape = 'dot'\n let text = ( msg.topic + ': ' + msg.payload )\n node.status({fill, shape, text})\n return msg\n}\nreturn",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 4470,
"y": 2240,
"wires": [
[
"636273a783cce562"
]
]
},
{
"id": "c5b3f8bf2f23feb9",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "link out 22",
"mode": "link",
"links": [
"6d9e0b0790658ced",
"3a1f34f20f4074b9",
"1561bf35c96381d1",
"5e48788723f746c8"
],
"x": 4645,
"y": 2140,
"wires": []
},
{
"id": "39040470f343f07d",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "Status",
"property": "payload",
"x": 4170,
"y": 2120,
"wires": [
[
"dd2a64bad15a9509",
"4f4ce854ba5452fd",
"c6f710667eeb3fd0"
]
]
},
{
"id": "03be4b6845126570",
"type": "delay",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "25ms",
"pauseType": "delay",
"timeout": "25",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "15",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 4210,
"y": 2080,
"wires": [
[
"39040470f343f07d"
]
]
},
{
"id": "97278629cfca2ea6",
"type": "debug",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "dbsSoC",
"active": true,
"tosidebar": false,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "auto",
"x": 4560,
"y": 2300,
"wires": []
},
{
"id": "25b11973814b5690",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "ahsoc",
"func": "msg.topic = 'ahsoc'\nconst digits = 1000\nmsg.payload = Math.round( digits * flow.get('ahsoc') )/digits\nlet text = ( msg.topic + ': ' + msg.payload )\nnode.status( text )\nreturn msg",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 4210,
"y": 2300,
"wires": [
[]
]
},
{
"id": "7ee0af1c8c88c984",
"type": "link in",
"z": "4dc207279e9d07bd",
"g": "642c881d3af1b38d",
"name": "link in 102",
"links": [
"c57234dd6a9bc1cd"
],
"x": 4135,
"y": 2300,
"wires": [
[
"25b11973814b5690"
]
]
},
{
"id": "d5a2f045046bcb35",
"type": "group",
"z": "4dc207279e9d07bd",
"name": "x",
"style": {
"label": true
},
"nodes": [
"135fa1cf2f7f9bd4",
"e2a02d8abf8be5ee",
"89e8dcacafe38f9a",
"7d9f2604e98ec284",
"f76261f283a6b915",
"b7858c4663839bfd",
"e64ed196a169b27e",
"3cc7bf6426c24f60",
"efd3cdb77955abe8",
"4ceb2c68b4151487",
"be5afdcfdb5c6ba0"
],
"x": 3254,
"y": 2439,
"w": 812,
"h": 142
},
{
"id": "135fa1cf2f7f9bd4",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "d5a2f045046bcb35",
"service": "com.victronenergy.system/0",
"path": "/DynamicEss/LastScheduledEnd",
"serviceObj": {
"service": "com.victronenergy.system/0",
"name": "com.victronenergy.system (0)"
},
"pathObj": {
"path": "/DynamicEss/LastScheduledEnd",
"name": "/DynamicEss/LastScheduledEnd",
"type": "number",
"value": 1762376400
},
"name": "dbsLASTEND",
"onlyChanges": true,
"x": 3530,
"y": 2480,
"wires": [
[]
]
},
{
"id": "e2a02d8abf8be5ee",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "d5a2f045046bcb35",
"service": "com.victronenergy.system/0",
"path": "/DynamicEss/LastScheduledStart",
"serviceObj": {
"service": "com.victronenergy.system/0",
"name": "com.victronenergy.system (0)"
},
"pathObj": {
"path": "/DynamicEss/LastScheduledStart",
"name": "/DynamicEss/LastScheduledStart",
"type": "number",
"value": 1762375500
},
"name": "dbsLASTSTART",
"onlyChanges": true,
"x": 3360,
"y": 2480,
"wires": [
[]
]
},
{
"id": "89e8dcacafe38f9a",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "d5a2f045046bcb35",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/0/Start",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/0/Start",
"name": "/Settings/DynamicEss/Schedule/0/Start",
"type": "number",
"value": 1762333200
},
"name": "dbsSTART",
"onlyChanges": true,
"x": 3680,
"y": 2480,
"wires": [
[
"7d9f2604e98ec284",
"e64ed196a169b27e"
]
]
},
{
"id": "7d9f2604e98ec284",
"type": "debug",
"z": "4dc207279e9d07bd",
"g": "d5a2f045046bcb35",
"name": "dbsSTART",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 3930,
"y": 2480,
"wires": []
},
{
"id": "f76261f283a6b915",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "d5a2f045046bcb35",
"name": "CurrentTime",
"func": "//\nmsg.timestamp = msg.payload\n\n\n//let date = new Date()\n//let time = date / 1000\nlet time = msg.payload / 1000\ntime = time - ( time % 1 )\nmsg.payload = time\n\nmsg.topic = 'CurrentTime'\n\nlet fill = ( 'green' )\nlet shape = 'dot'\nlet text = ( 'time : ' + time )\n//let text = ( 'timeslot : ' + timeslot )\nnode.status({fill, shape, text})\n\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3390,
"y": 2540,
"wires": [
[
"e64ed196a169b27e"
]
]
},
{
"id": "b7858c4663839bfd",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "d5a2f045046bcb35",
"name": "dbsindex",
"func": "let deltatime = msg.payload\n\nlet deltaminutes = deltatime / 60\n\nlet dbsindexf = ( deltaminutes / 15 ) \nlet dbsindex = dbsindexf - ( dbsindexf % 1 )\n\nlet fill = ( 'green' )\nlet shape = 'dot'\nlet text = ( 'dbsindex : ' + dbsindex )\nnode.status({fill, shape, text})\n\nmsg.payload = dbsindex\nmsg.dbsindex = dbsindex\nmsg.topic = 'dbsindex'\n\nif (msg.measurements == 2)\n{\n msg.average = null\n msg.measurements = null\n flow.set('dbsindex', dbsindex)\n return msg;\n}",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 3680,
"y": 2540,
"wires": [
[
"be5afdcfdb5c6ba0"
]
]
},
{
"id": "e64ed196a169b27e",
"type": "SumUltimate",
"z": "4dc207279e9d07bd",
"g": "d5a2f045046bcb35",
"name": "DeltaTime",
"property": "payload",
"math": "subtract",
"subtractstartfrom": "CurrentTime",
"x": 3540,
"y": 2540,
"wires": [
[
"b7858c4663839bfd"
]
]
},
{
"id": "3cc7bf6426c24f60",
"type": "debug",
"z": "4dc207279e9d07bd",
"g": "d5a2f045046bcb35",
"name": "dbsIndex",
"active": true,
"tosidebar": false,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "auto",
"x": 3940,
"y": 2540,
"wires": []
},
{
"id": "efd3cdb77955abe8",
"type": "link out",
"z": "4dc207279e9d07bd",
"g": "d5a2f045046bcb35",
"name": "link out 47",
"mode": "link",
"links": [
"46c237ebafab52a5",
"7a5396e1cb5b27f4",
"93342a5994b7ccdc",
"68ee5ab56a9713a6"
],
"x": 4025,
"y": 2540,
"wires": []
},
{
"id": "4ceb2c68b4151487",
"type": "link in",
"z": "4dc207279e9d07bd",
"g": "d5a2f045046bcb35",
"name": "link in 73",
"links": [
"a54dd6b5d40c9acb"
],
"x": 3295,
"y": 2540,
"wires": [
[
"f76261f283a6b915"
]
]
},
{
"id": "be5afdcfdb5c6ba0",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "d5a2f045046bcb35",
"name": "Status",
"property": "payload",
"x": 3810,
"y": 2540,
"wires": [
[
"3cc7bf6426c24f60",
"efd3cdb77955abe8"
]
]
},
{
"id": "bbc1e7f101c98388",
"type": "group",
"z": "4dc207279e9d07bd",
"name": "x",
"style": {
"label": true
},
"nodes": [
"fcdc277886a528d3",
"a2fd3c4c4999b564",
"7b179321fbdbc359",
"d80a7c7dfd737ceb",
"55286bd18f3b7a20",
"2a9192c769508d96",
"2a243c432e29bb12",
"4ca8cc829299c46f",
"2f95c6fa7aeee778",
"3e16883fc5c43151",
"e9a2449401ae4f30",
"d7b34cb5b44b5209"
],
"x": 4094,
"y": 2359,
"w": 572,
"h": 322
},
{
"id": "fcdc277886a528d3",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "bbc1e7f101c98388",
"name": "ahsoc",
"func": "msg.topic = 'ahsoc'\nconst digits = 1000\nmsg.payload = Math.round( digits * flow.get('ahsoc') )/digits\nlet text = ( msg.topic + ': ' + msg.payload )\nnode.status( text )\nreturn msg",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 4350,
"y": 2460,
"wires": [
[
"55286bd18f3b7a20"
]
]
},
{
"id": "a2fd3c4c4999b564",
"type": "victron-input-custom",
"z": "4dc207279e9d07bd",
"g": "bbc1e7f101c98388",
"service": "com.victronenergy.system/0",
"path": "/DynamicEss/ReactiveStrategy",
"serviceObj": {
"service": "com.victronenergy.system/0",
"name": "com.victronenergy.system (0)"
},
"pathObj": {
"path": "/DynamicEss/ReactiveStrategy",
"name": "/DynamicEss/ReactiveStrategy",
"type": "number",
"value": 9
},
"name": "REACTSTR",
"onlyChanges": true,
"x": 4190,
"y": 2400,
"wires": [
[
"7b179321fbdbc359",
"4ca8cc829299c46f"
]
]
},
{
"id": "7b179321fbdbc359",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "bbc1e7f101c98388",
"name": "mapreactstr",
"func": "var mapping = {\n 1: 'SCHEDULED_SELFCONSUME',\n 2: 'SCHEDULED_CHARGE_ALLOW_GRID',\n 3: 'SCHEDULED_CHARGE_ENHANCED',\n 4: 'SELFCONSUME_ACCEPT_CHARGE',\n 5: 'IDLE_SCHEDULED_FEEDIN',\n 6: 'SCHEDULED_DISCHARGE',\n 7: 'SELFCONSUME_ACCEPT_DISCHARGE',\n 8: 'IDLE_MAINTAIN_SURPLUS',\n 9: 'IDLE_MAINTAIN_TARGETSOC',\n 10: 'SCHEDULED_CHARGE_SMOOTH_TRANSITION',\n 11: 'SCHEDULED_CHARGE_FEEDIN',\n 12: 'SCHEDULED_CHARGE_NO_GRID',\n 13: 'SCHEDULED_MINIMUM_DISCHARGE',\n 14: 'SELFCONSUME_NO_GRID',\n 15: 'IDLE_NO_OPPORTUNITY',\n 16: 'UNSCHEDULED_CHARGE_CATCHUP_TARGETSOC',\n 17: 'SELFCONSUME_INCREASED_DISCHARGE',\n 18: 'KEEP_BATTERY_CHARGED',\n 19: 'SCHEDULED_DISCHARGE_SMOOTH_TRANSITION',\n 20: 'SELF_CONSUME_ACCEPT_BELOW_TSOC',\n 21: 'IDLE_NO_DISCHARGE_OPPORTUNITY',\n 92: 'DESS_DISABLED',\n 93: 'SELFCONSUME_UNEXPECTED_EXCEPTION',\n 94: 'SELFCONSUME_FAULTY_CHARGERATE',\n 95: 'UNKNOWN_OPERATING_MODE',\n 96: 'ESS_LOW_SOC',\n 97: 'SELFCONSUME_UNMAPPED_STATE',\n 98: 'SELFCONSUME_UNPREDICTED',\n 99: 'NO_WINDOW'\n};\nmsg.topic = 'reactstr';\nmsg.reactstr = msg.payload + ' (' + ( mapping[msg.payload] || 'Unknown' ) + ')';\nmsg.textvalue = ( mapping[msg.payload] || 'Unknown' );\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 4370,
"y": 2400,
"wires": [
[
"d80a7c7dfd737ceb"
]
]
},
{
"id": "d80a7c7dfd737ceb",
"type": "debug",
"z": "4dc207279e9d07bd",
"g": "bbc1e7f101c98388",
"name": "REACTSTR",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "reactstr",
"targetType": "msg",
"statusVal": "reactivestrategy",
"statusType": "auto",
"x": 4550,
"y": 2400,
"wires": []
},
{
"id": "55286bd18f3b7a20",
"type": "debug",
"z": "4dc207279e9d07bd",
"g": "bbc1e7f101c98388",
"name": "AHSOC",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "reactivestrategy",
"statusType": "auto",
"x": 4560,
"y": 2460,
"wires": []
},
{
"id": "2a9192c769508d96",
"type": "vrm-api",
"z": "4dc207279e9d07bd",
"g": "bbc1e7f101c98388",
"vrm": "9e7340b4a2802944",
"name": "FETCH DESS",
"api_type": "installations",
"idUser": "",
"idSite": "{{flow.siteId}}",
"installations": "fetch-dynamic-ess-schedules",
"attribute": "dynamic_ess",
"stats_interval": "15mins",
"show_instance": false,
"stats_start": "bod",
"stats_end": "eot",
"use_utc": false,
"gps_start": "",
"gps_end": "",
"widgets": "PVInverterStatus",
"instance": "",
"store_in_global_context": true,
"verbose": false,
"transform_price_schedule": false,
"outputs": 1,
"x": 4200,
"y": 2640,
"wires": [
[
"2a243c432e29bb12"
]
]
},
{
"id": "2a243c432e29bb12",
"type": "debug",
"z": "4dc207279e9d07bd",
"g": "bbc1e7f101c98388",
"name": "FETCH DESS",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload.schedule",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 4540,
"y": 2640,
"wires": []
},
{
"id": "4ca8cc829299c46f",
"type": "delay",
"z": "4dc207279e9d07bd",
"g": "bbc1e7f101c98388",
"name": "1/1m",
"pauseType": "rate",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "minute",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 4170,
"y": 2460,
"wires": [
[
"fcdc277886a528d3",
"2a9192c769508d96",
"2f95c6fa7aeee778",
"e9a2449401ae4f30"
]
]
},
{
"id": "2f95c6fa7aeee778",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "bbc1e7f101c98388",
"name": "dbsindex",
"func": "msg.topic = 'dbsindex'\nmsg.payload = flow.get('dbsindex')\nlet text = ( msg.topic + ': ' + msg.payload )\nnode.status( text )\nreturn msg",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 4360,
"y": 2520,
"wires": [
[
"3e16883fc5c43151"
]
]
},
{
"id": "3e16883fc5c43151",
"type": "debug",
"z": "4dc207279e9d07bd",
"g": "bbc1e7f101c98388",
"name": "INDEX",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "reactivestrategy",
"statusType": "auto",
"x": 4570,
"y": 2520,
"wires": []
},
{
"id": "e9a2449401ae4f30",
"type": "function",
"z": "4dc207279e9d07bd",
"d": true,
"g": "bbc1e7f101c98388",
"name": "vrmmetrics",
"func": "msg.topic = 'vrmMETRICS'\nmsg.payload = flow.get('vrmMETRICS')\nlet text = ( msg.topic + ': ' + msg.payload )\nnode.status( text )\nreturn msg",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 4370,
"y": 2580,
"wires": [
[
"d7b34cb5b44b5209"
]
]
},
{
"id": "d7b34cb5b44b5209",
"type": "debug",
"z": "4dc207279e9d07bd",
"g": "bbc1e7f101c98388",
"name": "vrmMETRICS",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "reactivestrategy",
"statusType": "auto",
"x": 4540,
"y": 2580,
"wires": []
},
{
"id": "489f1347e7f4e5eb",
"type": "group",
"z": "4dc207279e9d07bd",
"name": "",
"style": {
"label": true
},
"nodes": [
"b37a8f57dd090637",
"46c237ebafab52a5",
"220155f2e858dc4b",
"8f03905b31ffc362",
"07eb02a8a0bcdca8",
"90798104e80184ff",
"955a9ff5db971d31",
"6d9e0b0790658ced",
"88f541f676221a8e",
"da64f80bf8a9a3f0",
"efed898fb4a72f73",
"f08ae84be2a39f40",
"1f61a6028701f320",
"d90b2d619d8d46bf",
"4a12090c2cf18fe3",
"24868436b2836fe8",
"084186c0d96f8af4",
"b339b857265207f0",
"1561bf35c96381d1",
"ef6b55f005b2a97d"
],
"x": 4094,
"y": 2696.5,
"w": 672,
"h": 367
},
{
"id": "b37a8f57dd090637",
"type": "RailwaySwitchUltimate",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"name": "DBSIndex",
"triggertopic": "dbsindex",
"initializewith": "4",
"payloadPropName": "payload",
"translatorConfig": "",
"x": 4360,
"y": 2760,
"wires": [
[
"f08ae84be2a39f40"
],
[
"1f61a6028701f320"
],
[
"d90b2d619d8d46bf"
],
[
"4a12090c2cf18fe3"
],
[]
]
},
{
"id": "46c237ebafab52a5",
"type": "link in",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"name": "link in 90",
"links": [
"efd3cdb77955abe8"
],
"x": 4305,
"y": 2880,
"wires": [
[
"07eb02a8a0bcdca8"
]
]
},
{
"id": "220155f2e858dc4b",
"type": "RailwaySwitchUltimate",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"name": "DBSIndex",
"triggertopic": "dbsindex",
"initializewith": "4",
"payloadPropName": "payload",
"translatorConfig": "",
"x": 4360,
"y": 3000,
"wires": [
[
"24868436b2836fe8"
],
[
"084186c0d96f8af4"
],
[
"b339b857265207f0"
],
[
"efed898fb4a72f73"
],
[]
]
},
{
"id": "8f03905b31ffc362",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"name": "dbsindex0",
"func": "if ( msg.topic == 'dbsindex' ) \n{\n if ( msg.payload >= 4 )\n {\n msg.payload = 4;\n }\n}\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 4370,
"y": 2840,
"wires": [
[
"b37a8f57dd090637"
]
]
},
{
"id": "07eb02a8a0bcdca8",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"name": "Status",
"property": "payload",
"x": 4390,
"y": 2880,
"wires": [
[
"8f03905b31ffc362",
"90798104e80184ff"
]
]
},
{
"id": "90798104e80184ff",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"name": "dbsindex1",
"func": "if ( msg.topic == 'dbsindex' ) \n{\n if ( msg.payload < 4 )\n {\n msg.payload = 4;\n } else if ( msg.payload < 8 )\n {\n msg.payload = msg.payload - 4;\n }\n}\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 4370,
"y": 2940,
"wires": [
[
"220155f2e858dc4b"
]
]
},
{
"id": "955a9ff5db971d31",
"type": "InterruptFlowUltimate",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"name": "blk",
"triggertopic": "go",
"initializewith": "0",
"autoToggle": "0",
"payloadPropName": "payload",
"translatorConfig": "",
"x": 4180,
"y": 2940,
"wires": [
[
"b37a8f57dd090637",
"220155f2e858dc4b"
]
]
},
{
"id": "6d9e0b0790658ced",
"type": "link in",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"name": "link in 97",
"links": [
"c5b3f8bf2f23feb9"
],
"x": 4135,
"y": 3020,
"wires": [
[
"955a9ff5db971d31"
]
]
},
{
"id": "88f541f676221a8e",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"name": "Status",
"property": "payload",
"x": 4170,
"y": 2880,
"wires": [
[
"955a9ff5db971d31"
]
]
},
{
"id": "da64f80bf8a9a3f0",
"type": "change",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"name": "Res:3",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "3",
"tot": "num"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "dbsRes",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 4170,
"y": 2840,
"wires": [
[
"88f541f676221a8e"
]
]
},
{
"id": "efed898fb4a72f73",
"type": "victron-output-dess",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/7/Restrictions",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "Venus settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/7/Restrictions",
"type": "enum",
"name": "Active restrictions for schedule 7",
"enum": {
"0": "No restrictions between battery and the grid",
"1": "Grid to battery energy flow is restricted",
"2": "Battery to grid energy flow is restricted",
"3": "No energy flow between battery and grid"
},
"mode": "both"
},
"name": "dbsRes7",
"onlyChanges": false,
"x": 4680,
"y": 3020,
"wires": []
},
{
"id": "f08ae84be2a39f40",
"type": "victron-output-dess",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/0/Restrictions",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "Venus settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/0/Restrictions",
"type": "enum",
"name": "Active restrictions for schedule 0",
"enum": {
"0": "No restrictions between battery and the grid",
"1": "Grid to battery energy flow is restricted",
"2": "Battery to grid energy flow is restricted",
"3": "No energy flow between battery and grid"
},
"mode": "both"
},
"name": "dbsRes0",
"onlyChanges": false,
"x": 4560,
"y": 2740,
"wires": []
},
{
"id": "1f61a6028701f320",
"type": "victron-output-dess",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/1/Restrictions",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "Venus settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/1/Restrictions",
"type": "enum",
"name": "Active restrictions for schedule 1",
"enum": {
"0": "No restrictions between battery and the grid",
"1": "Grid to battery energy flow is restricted",
"2": "Battery to grid energy flow is restricted",
"3": "No energy flow between battery and grid"
},
"mode": "both"
},
"name": "dbsRes1",
"onlyChanges": false,
"x": 4600,
"y": 2780,
"wires": []
},
{
"id": "d90b2d619d8d46bf",
"type": "victron-output-dess",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/2/Restrictions",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "Venus settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/2/Restrictions",
"type": "enum",
"name": "Active restrictions for schedule 2",
"enum": {
"0": "No restrictions between battery and the grid",
"1": "Grid to battery energy flow is restricted",
"2": "Battery to grid energy flow is restricted",
"3": "No energy flow between battery and grid"
},
"mode": "both"
},
"name": "dbsRes2",
"onlyChanges": false,
"x": 4640,
"y": 2820,
"wires": []
},
{
"id": "4a12090c2cf18fe3",
"type": "victron-output-dess",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/3/Restrictions",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "Venus settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/3/Restrictions",
"type": "enum",
"name": "Active restrictions for schedule 3",
"enum": {
"0": "No restrictions between battery and the grid",
"1": "Grid to battery energy flow is restricted",
"2": "Battery to grid energy flow is restricted",
"3": "No energy flow between battery and grid"
},
"mode": "both"
},
"name": "dbsRes3",
"onlyChanges": false,
"x": 4680,
"y": 2860,
"wires": []
},
{
"id": "24868436b2836fe8",
"type": "victron-output-dess",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/4/Restrictions",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "Venus settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/4/Restrictions",
"type": "enum",
"name": "Active restrictions for schedule 4",
"enum": {
"0": "No restrictions between battery and the grid",
"1": "Grid to battery energy flow is restricted",
"2": "Battery to grid energy flow is restricted",
"3": "No energy flow between battery and grid"
},
"mode": "both"
},
"name": "dbsRes4",
"onlyChanges": false,
"x": 4560,
"y": 2900,
"wires": []
},
{
"id": "084186c0d96f8af4",
"type": "victron-output-dess",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/5/Restrictions",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "Venus settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/5/Restrictions",
"type": "enum",
"name": "Active restrictions for schedule 5",
"enum": {
"0": "No restrictions between battery and the grid",
"1": "Grid to battery energy flow is restricted",
"2": "Battery to grid energy flow is restricted",
"3": "No energy flow between battery and grid"
},
"mode": "both"
},
"name": "dbsRes5",
"onlyChanges": false,
"x": 4600,
"y": 2940,
"wires": []
},
{
"id": "b339b857265207f0",
"type": "victron-output-dess",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/6/Restrictions",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "Venus settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/6/Restrictions",
"type": "enum",
"name": "Active restrictions for schedule 6",
"enum": {
"0": "No restrictions between battery and the grid",
"1": "Grid to battery energy flow is restricted",
"2": "Battery to grid energy flow is restricted",
"3": "No energy flow between battery and grid"
},
"mode": "both"
},
"name": "dbsRes6",
"onlyChanges": false,
"x": 4640,
"y": 2980,
"wires": []
},
{
"id": "1561bf35c96381d1",
"type": "link in",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"name": "link in 89",
"links": [
"c5b3f8bf2f23feb9"
],
"x": 4135,
"y": 2740,
"wires": [
[
"ef6b55f005b2a97d"
]
]
},
{
"id": "ef6b55f005b2a97d",
"type": "delay",
"z": "4dc207279e9d07bd",
"g": "489f1347e7f4e5eb",
"name": "25ms",
"pauseType": "delay",
"timeout": "255",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "15",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 4170,
"y": 2800,
"wires": [
[
"da64f80bf8a9a3f0"
]
]
},
{
"id": "eec8f7b345c3cd9d",
"type": "group",
"z": "4dc207279e9d07bd",
"style": {
"stroke": "#999999",
"stroke-opacity": "1",
"fill": "none",
"fill-opacity": "1",
"label": true,
"label-position": "nw",
"color": "#a4a4a4"
},
"nodes": [
"fa5947cdaac82e6a",
"9ce92d06f01276b2",
"7a5396e1cb5b27f4",
"081e734ef9ab410e",
"adecfd02d3dbeb3c",
"27e7e9341318aee0",
"bd1c108419dfe5f7",
"9c2be7badc9cbdde",
"0acad2c7cc94a5fa",
"d16cd4f62d2d4d5f",
"e28619fcd16717d6",
"6fda48debe577123",
"d0c438e6f1c8f0a3",
"452989d6929da8e0",
"7dedc28e5383d430",
"b878c7631d71fa1d",
"54ebbeb028e0ca7d"
],
"x": 4094,
"y": 3076.5,
"w": 672,
"h": 367
},
{
"id": "fa5947cdaac82e6a",
"type": "link in",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"name": "link in 77",
"links": [
"9eb58497807ed1b6"
],
"x": 4135,
"y": 3120,
"wires": [
[
"54ebbeb028e0ca7d"
]
]
},
{
"id": "9ce92d06f01276b2",
"type": "RailwaySwitchUltimate",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"name": "DBSIndex",
"triggertopic": "dbsindex",
"initializewith": "4",
"payloadPropName": "payload",
"translatorConfig": "",
"x": 4360,
"y": 3140,
"wires": [
[
"e28619fcd16717d6"
],
[
"6fda48debe577123"
],
[
"d0c438e6f1c8f0a3"
],
[
"452989d6929da8e0"
],
[]
]
},
{
"id": "7a5396e1cb5b27f4",
"type": "link in",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"name": "link in 78",
"links": [
"efd3cdb77955abe8"
],
"x": 4305,
"y": 3260,
"wires": [
[
"b878c7631d71fa1d"
]
]
},
{
"id": "081e734ef9ab410e",
"type": "RailwaySwitchUltimate",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"name": "DBSIndex",
"triggertopic": "dbsindex",
"initializewith": "4",
"payloadPropName": "payload",
"translatorConfig": "",
"x": 4360,
"y": 3380,
"wires": [
[
"bd1c108419dfe5f7"
],
[
"9c2be7badc9cbdde"
],
[
"0acad2c7cc94a5fa"
],
[
"d16cd4f62d2d4d5f"
],
[]
]
},
{
"id": "adecfd02d3dbeb3c",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"name": "dbsindex0",
"func": "if ( msg.topic == 'dbsindex' ) \n{\n if ( msg.payload >= 4 )\n {\n msg.payload = 4;\n }\n}\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 4370,
"y": 3220,
"wires": [
[
"9ce92d06f01276b2"
]
]
},
{
"id": "27e7e9341318aee0",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"name": "dbsindex1",
"func": "if ( msg.topic == 'dbsindex' ) \n{\n if ( msg.payload < 4 )\n {\n msg.payload = 4;\n } else if ( msg.payload < 8 )\n {\n msg.payload = msg.payload - 4;\n }\n}\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 4370,
"y": 3320,
"wires": [
[
"081e734ef9ab410e"
]
]
},
{
"id": "bd1c108419dfe5f7",
"type": "victron-output-custom",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/4/Soc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/4/Soc",
"name": "/Settings/DynamicEss/Schedule/4/Soc",
"type": "number",
"value": 30
},
"name": "dbs4SoC",
"onlyChanges": false,
"x": 4560,
"y": 3280,
"wires": []
},
{
"id": "9c2be7badc9cbdde",
"type": "victron-output-custom",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/5/Soc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/5/Soc",
"name": "/Settings/DynamicEss/Schedule/5/Soc",
"type": "number",
"value": 30
},
"name": "dbs5SoC",
"onlyChanges": false,
"x": 4600,
"y": 3320,
"wires": []
},
{
"id": "0acad2c7cc94a5fa",
"type": "victron-output-custom",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/6/Soc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/6/Soc",
"name": "/Settings/DynamicEss/Schedule/6/Soc",
"type": "number",
"value": 30
},
"name": "dbs6SoC",
"onlyChanges": false,
"x": 4640,
"y": 3360,
"wires": []
},
{
"id": "d16cd4f62d2d4d5f",
"type": "victron-output-custom",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/7/Soc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/7/Soc",
"name": "/Settings/DynamicEss/Schedule/7/Soc",
"type": "number",
"value": 30
},
"name": "dbs7SoC",
"onlyChanges": false,
"x": 4680,
"y": 3400,
"wires": []
},
{
"id": "e28619fcd16717d6",
"type": "victron-output-custom",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/0/Soc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/0/Soc",
"name": "/Settings/DynamicEss/Schedule/0/Soc",
"type": "number",
"value": 30
},
"name": "dbs0SoC",
"onlyChanges": false,
"x": 4560,
"y": 3120,
"wires": []
},
{
"id": "6fda48debe577123",
"type": "victron-output-custom",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/1/Soc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/1/Soc",
"name": "/Settings/DynamicEss/Schedule/1/Soc",
"type": "number",
"value": 30
},
"name": "dbs1SoC",
"onlyChanges": false,
"x": 4600,
"y": 3160,
"wires": []
},
{
"id": "d0c438e6f1c8f0a3",
"type": "victron-output-custom",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/2/Soc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/2/Soc",
"name": "/Settings/DynamicEss/Schedule/2/Soc",
"type": "number",
"value": 30
},
"name": "dbs2SoC",
"onlyChanges": false,
"x": 4630,
"y": 3200,
"wires": []
},
{
"id": "452989d6929da8e0",
"type": "victron-output-custom",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/3/Soc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/3/Soc",
"name": "/Settings/DynamicEss/Schedule/3/Soc",
"type": "number",
"value": 30
},
"name": "dbs3SoC",
"onlyChanges": false,
"x": 4680,
"y": 3240,
"wires": []
},
{
"id": "7dedc28e5383d430",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"name": "Status",
"property": "payload",
"x": 4170,
"y": 3260,
"wires": [
[
"9ce92d06f01276b2",
"081e734ef9ab410e"
]
]
},
{
"id": "b878c7631d71fa1d",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"name": "Status",
"property": "payload",
"x": 4390,
"y": 3260,
"wires": [
[
"adecfd02d3dbeb3c",
"27e7e9341318aee0"
]
]
},
{
"id": "54ebbeb028e0ca7d",
"type": "change",
"z": "4dc207279e9d07bd",
"g": "eec8f7b345c3cd9d",
"name": "SoC:",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "dbsSoC",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 4170,
"y": 3220,
"wires": [
[
"7dedc28e5383d430"
]
]
},
{
"id": "a396d1277a82cc4e",
"type": "group",
"z": "4dc207279e9d07bd",
"name": "",
"style": {
"label": true
},
"nodes": [
"e9a5b3ca08d88dc5",
"68ee5ab56a9713a6",
"f74c68867739de2b",
"0451889aec68d27f",
"e959ce870394f15e",
"c46c8958903ceef7",
"376d467404b93fc8",
"a631e3c1de73092f",
"f278117248433f19",
"2f41acdcd6deb843",
"c052d84846829b0a",
"2b7a7074b8c930fd",
"a9b0b444cb920ea7",
"fb130228794295b0",
"8da417b57c8f4581",
"f1998aa01d429dd3",
"3a1f34f20f4074b9",
"5279442cee3af163",
"5e48788723f746c8",
"ac0d896a02b9a341"
],
"x": 4094,
"y": 3456.5,
"w": 672,
"h": 367
},
{
"id": "e9a5b3ca08d88dc5",
"type": "RailwaySwitchUltimate",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"name": "DBSIndex",
"triggertopic": "dbsindex",
"initializewith": "4",
"payloadPropName": "payload",
"translatorConfig": "",
"x": 4360,
"y": 3520,
"wires": [
[
"c052d84846829b0a"
],
[
"2b7a7074b8c930fd"
],
[
"a9b0b444cb920ea7"
],
[
"fb130228794295b0"
],
[]
]
},
{
"id": "68ee5ab56a9713a6",
"type": "link in",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"name": "link in 98",
"links": [
"efd3cdb77955abe8"
],
"x": 4305,
"y": 3640,
"wires": [
[
"e959ce870394f15e"
]
]
},
{
"id": "f74c68867739de2b",
"type": "RailwaySwitchUltimate",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"name": "DBSIndex",
"triggertopic": "dbsindex",
"initializewith": "4",
"payloadPropName": "payload",
"translatorConfig": "",
"x": 4360,
"y": 3760,
"wires": [
[
"376d467404b93fc8"
],
[
"a631e3c1de73092f"
],
[
"f278117248433f19"
],
[
"2f41acdcd6deb843"
],
[]
]
},
{
"id": "0451889aec68d27f",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"name": "dbsindex0",
"func": "if ( msg.topic == 'dbsindex' ) \n{\n if ( msg.payload >= 4 )\n {\n msg.payload = 4;\n }\n}\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 4370,
"y": 3600,
"wires": [
[
"e9a5b3ca08d88dc5"
]
]
},
{
"id": "e959ce870394f15e",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"name": "Status",
"property": "payload",
"x": 4390,
"y": 3640,
"wires": [
[
"0451889aec68d27f",
"c46c8958903ceef7"
]
]
},
{
"id": "c46c8958903ceef7",
"type": "function",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"name": "dbsindex1",
"func": "if ( msg.topic == 'dbsindex' ) \n{\n if ( msg.payload < 4 )\n {\n msg.payload = 4;\n } else if ( msg.payload < 8 )\n {\n msg.payload = msg.payload - 4;\n }\n}\nreturn msg",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 4370,
"y": 3700,
"wires": [
[
"f74c68867739de2b"
]
]
},
{
"id": "376d467404b93fc8",
"type": "victron-output-custom",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/4/Strategy",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/4/Strategy",
"name": "/Settings/DynamicEss/Schedule/4/Strategy",
"type": "number",
"value": 2
},
"name": "dbs4Str",
"onlyChanges": false,
"x": 4560,
"y": 3660,
"wires": []
},
{
"id": "a631e3c1de73092f",
"type": "victron-output-custom",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/5/Strategy",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/5/Strategy",
"name": "/Settings/DynamicEss/Schedule/5/Strategy",
"type": "number",
"value": 2
},
"name": "dbs5Str",
"onlyChanges": false,
"x": 4600,
"y": 3700,
"wires": []
},
{
"id": "f278117248433f19",
"type": "victron-output-custom",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/6/Strategy",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/6/Strategy",
"name": "/Settings/DynamicEss/Schedule/6/Strategy",
"type": "number",
"value": 2
},
"name": "dbs6Str",
"onlyChanges": false,
"x": 4640,
"y": 3740,
"wires": []
},
{
"id": "2f41acdcd6deb843",
"type": "victron-output-custom",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/7/Strategy",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/7/Strategy",
"name": "/Settings/DynamicEss/Schedule/7/Strategy",
"type": "number",
"value": 2
},
"name": "dbs7Str",
"onlyChanges": false,
"x": 4680,
"y": 3780,
"wires": []
},
{
"id": "c052d84846829b0a",
"type": "victron-output-custom",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/0/Strategy",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/0/Strategy",
"name": "/Settings/DynamicEss/Schedule/0/Strategy",
"type": "number",
"value": 2
},
"name": "dbs0Str",
"onlyChanges": false,
"x": 4560,
"y": 3500,
"wires": []
},
{
"id": "2b7a7074b8c930fd",
"type": "victron-output-custom",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/1/Strategy",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/1/Strategy",
"name": "/Settings/DynamicEss/Schedule/1/Strategy",
"type": "number",
"value": 2
},
"name": "dbs1Str",
"onlyChanges": false,
"x": 4600,
"y": 3540,
"wires": []
},
{
"id": "a9b0b444cb920ea7",
"type": "victron-output-custom",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/2/Strategy",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/2/Strategy",
"name": "/Settings/DynamicEss/Schedule/2/Strategy",
"type": "number",
"value": 1
},
"name": "dbs2Str",
"onlyChanges": false,
"x": 4640,
"y": 3580,
"wires": []
},
{
"id": "fb130228794295b0",
"type": "victron-output-custom",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/3/Strategy",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/3/Strategy",
"name": "/Settings/DynamicEss/Schedule/3/Strategy",
"type": "number",
"value": 1
},
"name": "dbs3Str",
"onlyChanges": false,
"x": 4680,
"y": 3620,
"wires": []
},
{
"id": "8da417b57c8f4581",
"type": "change",
"z": "4dc207279e9d07bd",
"d": true,
"g": "a396d1277a82cc4e",
"name": "Str:1",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "1",
"tot": "num"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "dbsStr",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 4170,
"y": 3600,
"wires": [
[
"5279442cee3af163"
]
]
},
{
"id": "f1998aa01d429dd3",
"type": "InterruptFlowUltimate",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"name": "blk",
"triggertopic": "go",
"initializewith": "0",
"autoToggle": "0",
"payloadPropName": "payload",
"translatorConfig": "",
"x": 4180,
"y": 3700,
"wires": [
[
"e9a5b3ca08d88dc5",
"f74c68867739de2b"
]
]
},
{
"id": "3a1f34f20f4074b9",
"type": "link in",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"name": "link in 99",
"links": [
"c5b3f8bf2f23feb9"
],
"x": 4135,
"y": 3780,
"wires": [
[
"f1998aa01d429dd3"
]
]
},
{
"id": "5279442cee3af163",
"type": "StatusUltimate",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"name": "Status",
"property": "payload",
"x": 4170,
"y": 3640,
"wires": [
[
"f1998aa01d429dd3"
]
]
},
{
"id": "5e48788723f746c8",
"type": "link in",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"name": "link in 25",
"links": [
"c5b3f8bf2f23feb9"
],
"x": 4135,
"y": 3500,
"wires": [
[
"ac0d896a02b9a341"
]
]
},
{
"id": "ac0d896a02b9a341",
"type": "delay",
"z": "4dc207279e9d07bd",
"g": "a396d1277a82cc4e",
"name": "25ms",
"pauseType": "delay",
"timeout": "255",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "15",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 4170,
"y": 3560,
"wires": [
[
"8da417b57c8f4581"
]
]
},
{
"id": "5484194f8e492911",
"type": "global-config",
"env": [],
"modules": {
"@victronenergy/node-red-contrib-victron": "1.6.52",
"node-red-contrib-boolean-logic-ultimate": "1.2.2",
"victron-vrm-api": "0.3.7"
}
}
]