cleanup boot and memory

This commit is contained in:
JcDenis 2024-08-24 19:58:44 +02:00
parent 6937f71bc7
commit 6a7e14ae01
12 changed files with 507 additions and 703 deletions

View file

@ -16,7 +16,7 @@ Flows are written under Node-red v4.0.2 with following nodes packages :
* [node-red-contrib-queue-gate](https://flows.nodered.org/node/node-red-contrib-queue-gate) 1.5.5
* [node-red-contrib-simple-gate](https://flows.nodered.org/node/node-red-contrib-simple-gate) 0.5.2
* [node-red-contrib-stackhero-influxdb-v2](https://flows.nodered.org/node/node-red-contrib-stackhero-influxdb-v2) 1.0.4
* [@flowfuse/node-red-dashboard](https://flows.nodered.org/node/@flowfuse/node-red-dashboard) 1.14.0 (nodered dashboard 2)
* [@flowfuse/node-red-dashboard](https://flows.nodered.org/node/@flowfuse/node-red-dashboard) 1.15.0 (nodered dashboard 2)
* [node-red-contrib-cpu](https://flows.nodered.org/node/node-red-contrib-cpu) 0.0.4
* [node-red-contrib-moment](https://flows.nodered.org/node/node-red-contrib-moment) 5.0.0
* [node-red-contrib-bigtimer](https://flows.nodered.org/node/node-red-contrib-bigtimer) 2.8.6

View file

@ -200,12 +200,12 @@
"ui": "2d75e4809d2a6fbf",
"path": "/pieces",
"icon": "door",
"layout": "flex",
"layout": "notebook",
"theme": "0e53487482752cfe",
"order": 1,
"className": "",
"visible": true,
"disabled": "false"
"disabled": false
},
{
"id": "36396f5285df476c",
@ -235,7 +235,8 @@
"pagePadding": "8px",
"groupGap": "8px",
"groupBorderRadius": "12px",
"widgetGap": "4px"
"widgetGap": "4px",
"density": "comfortable"
}
},
{
@ -299,7 +300,7 @@
"ui": "2d75e4809d2a6fbf",
"path": "/reglage",
"icon": "cog",
"layout": "flex",
"layout": "notebook",
"theme": "0e53487482752cfe",
"order": 3,
"className": "",
@ -352,7 +353,7 @@
"ui": "2d75e4809d2a6fbf",
"path": "/config",
"icon": "tune",
"layout": "flex",
"layout": "notebook",
"theme": "0e53487482752cfe",
"order": 4,
"className": "",
@ -664,11 +665,11 @@
"ui": "2d75e4809d2a6fbf",
"path": "/agenda",
"icon": "calendar",
"layout": "flex",
"layout": "notebook",
"theme": "0e53487482752cfe",
"order": 2,
"className": "",
"visible": true,
"visible": "true",
"disabled": "false"
},
{
@ -759,11 +760,11 @@
"ui": "2d75e4809d2a6fbf",
"path": "/entities",
"icon": "auto-fix",
"layout": "flex",
"layout": "notebook",
"theme": "b9e3784065d1d1b2",
"order": 5,
"className": "",
"visible": true,
"visible": "true",
"disabled": "false"
},
{
@ -895,12 +896,12 @@
"ui": "2d75e4809d2a6fbf",
"path": "/scenes",
"icon": "puzzle",
"layout": "flex",
"layout": "notebook",
"theme": "b9e3784065d1d1b2",
"order": 6,
"className": "",
"visible": true,
"disabled": false
"visible": "true",
"disabled": "false"
},
{
"id": "86da7af07264458b",

File diff suppressed because one or more lines are too long

View file

@ -433,8 +433,8 @@
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
"to": "false",
"tot": "bool"
}
],
"action": "",

View file

@ -388,7 +388,7 @@
},
{
"t": "delete",
"p": "query",
"p": "#:(onMemory)::query",
"pt": "flow"
}
],
@ -476,7 +476,7 @@
},
{
"t": "delete",
"p": "query",
"p": "#:(onMemory)::query",
"pt": "flow"
},
{
@ -568,7 +568,7 @@
},
{
"t": "delete",
"p": "query",
"p": "#:(onMemory)::query",
"pt": "flow"
},
{
@ -685,7 +685,7 @@
},
{
"t": "set",
"p": "query.bucket",
"p": "#:(onMemory)::query.bucket",
"pt": "flow",
"to": "bucket",
"tot": "msg"
@ -933,7 +933,7 @@
"rules": [
{
"t": "set",
"p": "query.measurement",
"p": "#:(onMemory)::query.measurement",
"pt": "flow",
"to": "payload.content",
"tot": "msg"
@ -961,7 +961,7 @@
"rules": [
{
"t": "delete",
"p": "query.measurement",
"p": "#:(onMemory)::query.measurement",
"pt": "flow"
}
],
@ -984,7 +984,7 @@
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "has measurement",
"property": "query.measurement",
"property": "#:(onMemory)::query.measurement",
"propertyType": "flow",
"rules": [
{
@ -1082,7 +1082,7 @@
},
{
"t": "delete",
"p": "query",
"p": "#:(onMemory)::query",
"pt": "flow"
},
{
@ -1123,7 +1123,7 @@
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "query.bucket",
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
},
{
@ -1173,7 +1173,7 @@
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "has measurement",
"property": "query.measurement",
"property": "#:(onMemory)::query.measurement",
"propertyType": "flow",
"rules": [
{
@ -1238,7 +1238,7 @@
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "query.bucket",
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
},
{
@ -1334,7 +1334,7 @@
},
{
"t": "delete",
"p": "query",
"p": "#:(onMemory)::query",
"pt": "flow"
}
],
@ -1362,7 +1362,7 @@
"t": "set",
"p": "tmp",
"pt": "msg",
"to": "query.bucket",
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
},
{
@ -1395,7 +1395,7 @@
},
{
"t": "delete",
"p": "query",
"p": "#:(onMemory)::query",
"pt": "flow"
},
{
@ -1521,7 +1521,7 @@
"t": "set",
"p": "tmp",
"pt": "msg",
"to": "query.bucket",
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
},
{
@ -1584,7 +1584,14 @@
"t": "set",
"p": "payload.caption",
"pt": "msg",
"to": "\"snapshot \" & flow.query.bucket",
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
},
{
"t": "set",
"p": "payload.caption",
"pt": "msg",
"to": "\"snapshot \" & msg.payload.caption",
"tot": "jsonata"
},
{
@ -1644,7 +1651,7 @@
},
{
"t": "delete",
"p": "query",
"p": "#:(onMemory)::query",
"pt": "flow"
},
{
@ -1683,7 +1690,7 @@
"rules": [
{
"t": "set",
"p": "query.measurement",
"p": "#:(onMemory)::query.measurement",
"pt": "flow",
"to": "payload.content",
"tot": "msg"
@ -1730,7 +1737,7 @@
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "has measurement",
"property": "query.measurement",
"property": "#:(onMemory)::query.measurement",
"propertyType": "flow",
"rules": [
{
@ -1754,7 +1761,7 @@
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "has measurement",
"property": "query.measurement",
"property": "#:(onMemory)::query.measurement",
"propertyType": "flow",
"rules": [
{
@ -1778,7 +1785,7 @@
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "has measurement",
"property": "query.measurement",
"property": "#:(onMemory)::query.measurement",
"propertyType": "flow",
"rules": [
{
@ -1943,7 +1950,7 @@
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "query.bucket",
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
},
{
@ -2014,7 +2021,7 @@
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "query.bucket",
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
},
{
@ -2263,7 +2270,7 @@
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "query.bucket",
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
},
{
@ -2334,7 +2341,7 @@
"t": "set",
"p": "scene.bucket",
"pt": "msg",
"to": "query.bucket",
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
}
],

File diff suppressed because it is too large Load diff

View file

@ -3306,7 +3306,7 @@
"t": "set",
"p": "th",
"pt": "msg",
"to": "thermostattest",
"to": "#:(onMemory)::thermostattest",
"tot": "flow"
},
{
@ -3318,7 +3318,7 @@
},
{
"t": "set",
"p": "thermostattest",
"p": "#:(onMemory)::thermostattest",
"pt": "flow",
"to": "th",
"tot": "msg"
@ -3353,7 +3353,7 @@
},
{
"t": "set",
"p": "thermostattest",
"p": "#:(onMemory)::thermostattest",
"pt": "flow",
"to": "th",
"tot": "msg"
@ -3384,7 +3384,7 @@
"t": "set",
"p": "payload",
"pt": "msg",
"to": "thermostattest['indoor temperature']",
"to": "#:(onMemory)::thermostattest['indoor temperature']",
"tot": "flow"
}
],
@ -3459,7 +3459,7 @@
"t": "set",
"p": "payload",
"pt": "msg",
"to": "thermostattest['outdoor temperature']",
"to": "#:(onMemory)::thermostattest['outdoor temperature']",
"tot": "flow"
}
],
@ -3567,7 +3567,7 @@
"t": "set",
"p": "payload",
"pt": "msg",
"to": "thermostattest['temperature setpoint']",
"to": "#:(onMemory)::thermostattest['temperature setpoint']",
"tot": "flow"
}
],
@ -3595,7 +3595,7 @@
"t": "set",
"p": "payload",
"pt": "msg",
"to": "thermostattest['indoor coefficient']",
"to": "#:(onMemory)::thermostattest['indoor coefficient']",
"tot": "flow"
}
],
@ -3623,7 +3623,7 @@
"t": "set",
"p": "payload",
"pt": "msg",
"to": "thermostattest['outdoor coefficient']",
"to": "#:(onMemory)::thermostattest['outdoor coefficient']",
"tot": "flow"
}
],
@ -3651,7 +3651,7 @@
"t": "set",
"p": "payload",
"pt": "msg",
"to": "thermostattest['preheat time']",
"to": "#:(onMemory)::thermostattest['preheat time']",
"tot": "flow"
}
],
@ -3679,7 +3679,7 @@
"t": "set",
"p": "payload",
"pt": "msg",
"to": "thermostattest['cycle time']",
"to": "#:(onMemory)::thermostattest['cycle time']",
"tot": "flow"
}
],
@ -6965,7 +6965,7 @@
"g": "bb2ebd173a2ba06c",
"name": "150 ms",
"pauseType": "delay",
"timeout": "150",
"timeout": "250",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
@ -7410,14 +7410,14 @@
},
{
"t": "set",
"p": "thermostat.options",
"p": "#:(onMemory)::thermostat.options",
"pt": "flow",
"to": "[]",
"tot": "jsonata"
},
{
"t": "set",
"p": "thermostat.options[0]",
"p": "#:(onMemory)::thermostat.options[0]",
"pt": "flow",
"to": "{\t 'label': 'non assigné',\t 'value': ''\t}",
"tot": "jsonata"
@ -7577,7 +7577,7 @@
"t": "set",
"p": "options",
"pt": "msg",
"to": "thermostat.options",
"to": "#:(onMemory)::thermostat.options",
"tot": "flow"
},
{
@ -7603,7 +7603,7 @@
},
{
"t": "set",
"p": "thermostat.options",
"p": "#:(onMemory)::thermostat.options",
"pt": "flow",
"to": "options",
"tot": "msg"
@ -7633,7 +7633,7 @@
"t": "set",
"p": "options",
"pt": "msg",
"to": "thermostat.options",
"to": "#:(onMemory)::thermostat.options",
"tot": "flow"
},
{
@ -7722,7 +7722,7 @@
"t": "set",
"p": "options",
"pt": "msg",
"to": "thermostat.options",
"to": "#:(onMemory)::thermostat.options",
"tot": "flow"
},
{
@ -7823,7 +7823,7 @@
"t": "set",
"p": "options",
"pt": "msg",
"to": "thermostat.options",
"to": "#:(onMemory)::thermostat.options",
"tot": "flow"
},
{
@ -7891,7 +7891,7 @@
"t": "set",
"p": "options",
"pt": "msg",
"to": "thermostat.options",
"to": "#:(onMemory)::thermostat.options",
"tot": "flow"
},
{
@ -7959,7 +7959,7 @@
"t": "set",
"p": "options",
"pt": "msg",
"to": "thermostat.options",
"to": "#:(onMemory)::thermostat.options",
"tot": "flow"
},
{
@ -9366,7 +9366,7 @@
"t": "set",
"p": "options",
"pt": "msg",
"to": "thermostat.options",
"to": "#:(onMemory)::thermostat.options",
"tot": "flow"
},
{

View file

@ -1947,7 +1947,7 @@
"rules": [
{
"t": "set",
"p": "ac[msg.bucket]",
"p": "#:(onMemory)::ac[msg.bucket]",
"pt": "flow",
"to": "{}",
"tot": "jsonata"

View file

@ -305,11 +305,12 @@
"1b7806eb440632ce",
"52c9ef8bf5d5f352",
"bbc4e7be116546f6",
"69f377a19c3aaebb"
"69f377a19c3aaebb",
"6785d06a0693d549"
],
"x": 94,
"y": 3039,
"w": 1112,
"w": 1192,
"h": 262
},
{
@ -375,11 +376,12 @@
"8d4d236424edbea8",
"f14ce35482fb5f06",
"087ef495d3f3bf63",
"c8ca16b97279bf5f"
"c8ca16b97279bf5f",
"b1a03065f5eb3535"
],
"x": 94,
"y": 3639,
"w": 1872,
"w": 2132,
"h": 202
},
{
@ -5719,7 +5721,7 @@
"y": 3140,
"wires": [
[
"52c9ef8bf5d5f352"
"6785d06a0693d549"
]
]
},
@ -5744,7 +5746,7 @@
"to": "",
"reg": false,
"x": 600,
"y": 3200,
"y": 3260,
"wires": [
[
"6076cbdfef84255d"
@ -5800,7 +5802,7 @@
"to": "",
"reg": false,
"x": 820,
"y": 3200,
"y": 3260,
"wires": [
[
"cb1e6d4592635001",
@ -5849,7 +5851,7 @@
"topic": "topic",
"topicType": "msg",
"x": 430,
"y": 3200,
"y": 3260,
"wires": [
[
"0031d2f1a7c3c8ac"
@ -5889,7 +5891,7 @@
"to": "",
"reg": false,
"x": 260,
"y": 3200,
"y": 3260,
"wires": [
[
"cf0c81d932939eeb"
@ -5934,16 +5936,10 @@
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "087716156d7ca3c7",
"name": "check room",
"name": "check name",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "regex",
"v": "(system|room|thermostat|agenda|home)",
"vt": "str",
"case": false
},
{
"t": "regex",
"v": "^[a-z]{4,20}$",
@ -5956,13 +5952,10 @@
],
"checkall": "false",
"repair": false,
"outputs": 3,
"x": 610,
"y": 3140,
"outputs": 2,
"x": 830,
"y": 3200,
"wires": [
[
"bbc4e7be116546f6"
],
[
"c819a68d55e52a48"
],
@ -5985,7 +5978,7 @@
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 880,
"x": 1100,
"y": 3140,
"wires": []
},
@ -6239,7 +6232,7 @@
"timeout": "",
"count": "",
"reduceRight": false,
"x": 1350,
"x": 1390,
"y": 3380,
"wires": [
[
@ -6267,7 +6260,7 @@
"from": "",
"to": "",
"reg": false,
"x": 1190,
"x": 1230,
"y": 3440,
"wires": [
[
@ -6280,14 +6273,15 @@
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "",
"name": "split rooms",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "room",
"x": 830,
"property": "payload",
"x": 850,
"y": 3380,
"wires": [
[
@ -6569,14 +6563,11 @@
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "check room",
"property": "room",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "regex",
"v": "(system|room|thermostat|agenda|home)",
"vt": "str",
"case": false
"t": "false"
},
{
"t": "else"
@ -6585,7 +6576,7 @@
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 1010,
"x": 1050,
"y": 3380,
"wires": [
[
@ -6616,7 +6607,7 @@
"from": "",
"to": "",
"reg": false,
"x": 1190,
"x": 1230,
"y": 3380,
"wires": [
[
@ -6835,14 +6826,15 @@
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"name": "",
"name": "split rooms",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "room",
"x": 770,
"property": "payload",
"x": 790,
"y": 3740,
"wires": [
[
@ -6891,15 +6883,14 @@
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"name": "check room",
"property": "room",
"propertyType": "msg",
"name": "check gobals",
"property": "rooms[msg.room]",
"propertyType": "global",
"rules": [
{
"t": "regex",
"v": "(system|room|thermostat|agenda|home)",
"vt": "str",
"case": false
"t": "istype",
"v": "boolean",
"vt": "boolean"
},
{
"t": "else"
@ -6908,14 +6899,14 @@
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 950,
"x": 990,
"y": 3740,
"wires": [
[
"d2997f50cec29cce"
],
[
"6f0c74e816a70334"
"b1a03065f5eb3535"
]
]
},
@ -6939,7 +6930,7 @@
"from": "",
"to": "",
"reg": false,
"x": 1140,
"x": 1400,
"y": 3740,
"wires": [
[
@ -6956,7 +6947,7 @@
"rules": [
{
"t": "set",
"p": "entities[msg.md5]",
"p": "rooms[msg.room]",
"pt": "global",
"to": "payload",
"tot": "msg",
@ -6968,7 +6959,7 @@
"from": "",
"to": "",
"reg": false,
"x": 1140,
"x": 1400,
"y": 3800,
"wires": [
[
@ -6989,11 +6980,16 @@
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": "false",
"useparts": true,
"accumulate": true,
"timeout": "",
"count": "",
"reduceRight": false,
"x": 1310,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 1570,
"y": 3740,
"wires": [
[
@ -7049,7 +7045,7 @@
"from": "",
"to": "",
"reg": false,
"x": 1520,
"x": 1780,
"y": 3740,
"wires": [
[
@ -7072,7 +7068,7 @@
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1800,
"x": 2060,
"y": 3680,
"wires": []
},
@ -7084,8 +7080,73 @@
"name": "entities - export room",
"mode": "link",
"links": [],
"x": 1695,
"x": 1955,
"y": 3740,
"wires": []
},
{
"id": "6785d06a0693d549",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "087716156d7ca3c7",
"name": "check globals",
"property": "rooms[msg.room]",
"propertyType": "global",
"rules": [
{
"t": "istype",
"v": "boolean",
"vt": "boolean"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 620,
"y": 3140,
"wires": [
[
"bbc4e7be116546f6"
],
[
"52c9ef8bf5d5f352"
]
]
},
{
"id": "b1a03065f5eb3535",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"name": "check name",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "regex",
"v": "^[a-z]{4,20}$",
"vt": "str",
"case": false
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 1190,
"y": 3800,
"wires": [
[
"6f0c74e816a70334"
],
[
"d2997f50cec29cce"
]
]
}
]

View file

@ -2056,11 +2056,17 @@
"outs": "end",
"topic": "reset timer",
"topicType": "str",
"thumbLabel": true,
"thumbLabel": "true",
"showTicks": "false",
"min": "1",
"max": "30",
"step": "0.5",
"className": "",
"iconPrepend": "",
"iconAppend": "",
"color": "",
"colorTrack": "",
"colorThumb": "",
"x": 1130,
"y": 300,
"wires": [
@ -4798,6 +4804,8 @@
"height": "1",
"passthru": false,
"multiple": false,
"chips": false,
"clearable": false,
"options": [
{
"label": "» recharger",
@ -4809,6 +4817,7 @@
"topic": "topic",
"topicType": "msg",
"className": "",
"typeIsComboBox": true,
"x": 2610,
"y": 540,
"wires": [
@ -5011,13 +5020,18 @@
"chartType": "line",
"category": "_field",
"categoryType": "property",
"xAxisLabel": "",
"xAxisProperty": "_time",
"xAxisPropertyType": "msg",
"xAxisType": "time",
"xAxisFormat": "",
"xAxisFormatType": "auto",
"yAxisLabel": "",
"yAxisProperty": "_value",
"ymin": "",
"ymax": "",
"action": "replace",
"stackSeries": false,
"pointShape": "false",
"pointRadius": "2",
"showLegend": false,
@ -5035,7 +5049,15 @@
"#9467bd",
"#c5b0d5"
],
"width": 6,
"textColor": [
"#666666"
],
"textColorDefault": true,
"gridColor": [
"#e5e5e5"
],
"gridColorDefault": true,
"width": "6",
"height": "6",
"className": "",
"x": 540,
@ -17231,8 +17253,8 @@
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
"to": "true",
"tot": "bool"
}
],
"action": "",
@ -17295,14 +17317,11 @@
"z": "aab0c030de7df5cc",
"g": "b64c96e257072f51",
"name": "exception",
"property": "room",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "regex",
"v": "(agenda|system)",
"vt": "str",
"case": false
"t": "false"
},
{
"t": "else"

View file

@ -6480,6 +6480,8 @@
"height": "1",
"passthru": false,
"multiple": false,
"chips": false,
"clearable": false,
"options": [
{
"label": "» recharger",
@ -6491,6 +6493,7 @@
"topic": "topic",
"topicType": "msg",
"className": "",
"typeIsComboBox": true,
"x": 4140,
"y": 2120,
"wires": [

View file

@ -941,8 +941,8 @@
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
"to": "false",
"tot": "bool"
},
{
"t": "set",