GMTrevis / Homeassistant-NodeRed-Systemair-VTR300

Sytemair VTR300 integration to Homeassistant using Node Red
41 stars 10 forks source link

Mysterious error message #9

Closed pittbull closed 1 year ago

pittbull commented 1 year ago

I'm seeing this error repeated throughout the day, yet there is nothing wrong with my Netatmo sensor. Any insight?

image

The screenshot is from my slack channel but the same is reported in HA.

GMTrevis commented 1 year ago

@pittbull you probably need to have a look at or adapt the flow that is setting the alarm (ref. fig. below) I'm using the netatmo as default input to the outdoorcompensation calculation due to temp. dips in the VTR300 inlet, caused by the inlet location above the/my main/front door. (ref. readme "Aktiv utetemp.(Active outdoor temp. sensor"). If you dont need or want this feature, you need to adapt it to you requests.

If the netatmo outdoor temp. fails The alarm is set and the VTR300 inlet temp is given to be the new "in charge" (input) to the outdoorcompensation calculation if the Netatmo outdoor temp. is not changed within 2 hours, it happens once in a while that the netatmo outdoor temp. freeze (in my case, ref. fig. below). To prevent one alarm for each 10s poll, is the "Rate node" limiting the number of alarms in HA. I now see that the rate node should have been reset when Netatmo "is back" (changing value within 2 hours.) A reset message to the rate node (send msg.reset) will prevent one un-wanted alarm after 6 hours.

If i understand you correct, are the system throwing out this alarm continuously or with high frequency. From my perspective is this due to the fact that the netatmo temp. is not changing within 2 hours or because you need to adapt the system to your system. But as mentioned, a reset on the rate node would reduce one (1) unwanted alarm after 6 hours,

I hope that helps you on the way.
image

Frozen value for loonger then two hours: image

pittbull commented 1 year ago

Aha. I see. I have my inlet placed in a different spot so this will not be a problem for me.

I am not sure though what I need to change.

GMTrevis commented 1 year ago

@pittbull

  1. Backup

  2. Delete all the nodes except for the "Utekomp: Kalkulert tilluftstemp [°C]" (ref. fig below). image

  3. Import the flow below (ref. fig. & flow).

  4. Replace the debug node with the "Utekomp: Kalkulert tilluftstemp [°C]" node.

  5. Remove the following entities from UI "Utetemp_sensor_status" & "Utetemp_sensor_valgt".

That's pretty much it unless you have made other changes that i'm not familiar with. Hope it helps out.

New node flow: image

New node flow: [{"id":"f2c43e33eaf6dbe2","type":"function","z":"c1e03843.9d14a8","name":"Kalk.: utekomp [°C]","func":"// X :Y(ute temp) og X (ønsket tilluft) plot:\n// X1 :5,0,\tY6 :22,0 (Eks.) - Slope 1\n// X2 :7,5,\tY5 :21,0 (Eks.) - Slope 1\n// X3 :10,0,\tY4 :20,0 (Eks.) - Slope 2\n// X4 :12,5,\tY3 :18,0 (Eks.) - Slope 2\n// X5 :15,0,\tY2 :17,0 (Eks.) - Slope 3\n// X6 :20,0,\tY1 :15,0 (Eks.) - Slope 3\n\n// Slope = \"change in Y/change in X=deltaY/deltaX\"\n\nvar x= msg.payload; // utetemp.\nvar Y_output; // Ønsket tilluftstemp.\n\n// Utetmp plot:\nvar X1 = flow.get (\"vtr300_tilluftstemp_utekomp_x1\",\"default\"); // Henter settpunkt fra HA, lagrer i memory.\nvar X2 = flow.get (\"vtr300_tilluftstemp_utekomp_x2\",\"default\");\nvar X3 = flow.get (\"vtr300_tilluftstemp_utekomp_x3\",\"default\");\t\nvar X4 = flow.get (\"vtr300_tilluftstemp_utekomp_x4\",\"default\");\t\nvar X5 = flow.get (\"vtr300_tilluftstemp_utekomp_x5\",\"default\");\t\nvar X6 = flow.get (\"vtr300_tilluftstemp_utekomp_x6\",\"default\");\n\n// Ønsket tillufts temp. plot:\nvar Y6 = flow.get (\"vtr300_tilluftstemp_utekomp_y6\",\"default\"); // Henter settpunkt fra HA, lagrer i memory.\nvar Y5 = flow.get (\"vtr300_tilluftstemp_utekomp_y5\",\"default\"); \nvar Y4 = flow.get (\"vtr300_tilluftstemp_utekomp_y4\",\"default\"); \nvar Y3 = flow.get (\"vtr300_tilluftstemp_utekomp_y3\",\"default\"); \nvar Y2 = flow.get (\"vtr300_tilluftstemp_utekomp_y2\",\"default\"); \nvar Y1 = flow.get (\"vtr300_tilluftstemp_utekomp_y1\",\"default\"); \n\nvar slope_1 = (Y6-Y5)/(X1-X2); // Kalk. stigning \nvar slope_2 = (Y5-Y4)/(X2-X3);\nvar slope_3 = (Y4-Y3)/(X3-X4);\nvar slope_4 = (Y3-Y2)/(X4-X5);\nvar slope_5 = (Y2-Y1)/(X5-X6);\n\nvar Y_out_1 = Y6+slope_1*(x-X1); // Kalk. linje (Y1 --> Y2) \nvar Y_out_2 = Y5+slope_2*(x-X2); // Kalk. linje (Y2 --> Y3) \nvar Y_out_3 = Y4+slope_3*(x-X3); // Kalk. linje (Y3 --> Y4) \nvar Y_out_4 = Y3+slope_4*(x-X4); // Kalk. linje (Y4 --> Y5) \nvar Y_out_5 = Y2+slope_5*(x-X5); // Kalk. linje (Y5 --> Y6) \n\n// Sjekker for \"isNotNumber, ved \"isNan\" tidlig \"exit\" (ved evt. feil ved HA reconnect ell.) (prøv igjen).\n if (isNaN(Y_out_1) || isNaN(Y_out_2) || isNaN(Y_out_3) || isNaN(Y_out_4) || isNaN(Y_out_5)) {\n return;\n }\n\n// Bruker Y6 som for max ytterpunkt (Utetemp < X1)\nif (x < X1) { \n Y_output = Y6;\n}\n//Rak linje for Y1 & Y2 (Ved X1 & X2) \nelse if (x >= X1 && x < X2) { \n Y_output = Y_out_1;\n}\n//Rak linje for Y2 & Y3 (Ved X2 & X3) \nelse if (x >= X2 && x < X3) { \n Y_output = Y_out_2;\n}\n//Rak linje for Y3 & Y4 (Ved X3 & X4) \nelse if (x >= X3 && x < X4) { \n Y_output = Y_out_3;\n}\n//Rak linje for Y4 & Y5 (Ved X4 & X5) \nelse if (x >= X4 && x < X5) { \n Y_output = Y_out_4;\n}\n//Rak linje for Y5 & Y6 (Ved X5 & X6) \nelse if (x >= X5 && x <= X6) { \n Y_output = Y_out_5;\n}\n// Bruker Y1 som min ytterpunkt (Utetemp > X6)\nelse if (x > X6) { \n Y_output = Y1;\n}\n// Bruker Y6 som min ytterpunkt\nelse { \n Y_output = Y6;\n}\n\nvar Y_output_out = {payload:parseFloat((Y_output).toFixed(1))}; // Kalkulert utekompensert tilluftstemperatur\n\nreturn [Y_output_out];\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2970,"y":1340,"wires":[["ae02c1216f2b57f6","0d6acdc220238dbb"]],"outputLabels":["Kalkulert tilluftstemperatur"]},{"id":"cfbe60bc6dbe6892","type":"smooth","z":"c1e03843.9d14a8","name":"Avg.5 min","property":"payload","action":"mean","count":"30","round":"1","mult":"single","reduce":false,"x":2800,"y":1340,"wires":[["f2c43e33eaf6dbe2"]]},{"id":"3d4d1acd5ad52dd8","type":"inject","z":"c1e03843.9d14a8","name":"Poll 10s (inlet temp)","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"vtr300_inntak_temp","payloadType":"flow","x":2620,"y":1340,"wires":[["cfbe60bc6dbe6892"]]},{"id":"ae02c1216f2b57f6","type":"debug","z":"c1e03843.9d14a8","name":"debug 54","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":3140,"y":1340,"wires":[]},{"id":"0d6acdc220238dbb","type":"change","z":"c1e03843.9d14a8","name":"Tilluftstemp. Kalk. - Set flow","rules":[{"t":"set","p":"vtr300_tilluftstemp_utekomp_kalk","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":3100,"y":1300,"wires":[[]]}]

pittbull commented 1 year ago

Cool. Will try this when I find the time :)

pittbull commented 1 year ago

Works! :) Thanks.