rlindner / node-red-contrib-sma-webconnect

Node-RED node to query the web interface of SMA inverters
MIT License
13 stars 9 forks source link

Node stoped after few minutes #19

Closed phmevideo closed 3 years ago

phmevideo commented 3 years ago

Node stoped after a few minutes (5 to up to 120min). Use this node for a while in Redmatic and sometimes I saw on the tablet "connection lost". After this message Redmatic started once again and the logfile gives a hint to the sma-webconnect node. See also https://homematic-forum.de/forum/viewtopic.php?f=77&t=67229&p=658291#p658291 or https://homematic-forum.de/forum/viewtopic.php?f=18&t=65931 Andreas redmatic.2021-04-18T19 24 11.846Z.log

phmevideo commented 3 years ago

redmatic.2021-04-18T20 07 33.221Z.log Additional debug file after restart (10min) Using SMA Tripower 8.0 and Sunny Boy Storage 3.7, Homematic CCU3 with Redmatic 7.2.1

HoLo85 commented 3 years ago

@phmevideo what version of the node do you use and are you using the default presets or are you providing your own config? In what interval do you request the data from your Tripower?

phmevideo commented 3 years ago

Am 20.04.2021 um 18:45 schrieb HoLo85:

@phmevideo https://github.com/phmevideo what version of the node are you using and are you using the default preset or are you providing your own config?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rlindner/node-red-contrib-sma-webconnect/issues/19#issuecomment-823431111, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATXRSLYDC5XPVYQBPM2JQ33TJWVSHANCNFSM43ERZ6WQ.

Hi, ich verwende die Version 0.2.0 node-red-contrib-sma-webconnect,

In folgenden flow ist die Abfrage für die Solaranlage als auch für die Batterie eingebaut.

Ich teste gerade noch flow für flow welcher denn wirklich Redmatic immer wieder zum Einsturz bringt

Gruß

Andreas

[     {         "id": "73601004.100a8",         "type": "tab",         "label": "PV",         "disabled": true,         "info": ""     },     {         "id": "f6b78416.0ce198",         "type": "debug",         "z": "73601004.100a8",         "name": "87",         "active": false,         "tosidebar": true,         "console": false,         "tostatus": false,         "complete": "payload",         "targetType": "msg",         "statusVal": "",         "statusType": "auto",         "x": 550,         "y": 20,         "wires": []     },     {         "id": "f3679e8c.d7852",         "type": "function",         "z": "73601004.100a8",         "name": "PV Power [kW]",         "func": "var power = {};\npower.payload = Math.round( msg.payload.power / 10 ) / 100;\nreturn power;",         "outputs": 1,         "noerr": 0,         "initialize": "",         "finalize": "",         "x": 640,         "y": 520,         "wires": [             [                 "f174748.9006088"             ]         ]     },     {         "id": "2346c812.729148",         "type": "function",         "z": "73601004.100a8",         "name": "grid_consumption [kW]",         "func": "var grid_consumption = {};\ngrid_consumption.payload = Math.round( msg.payload.grid_consumption /10) / 100;\nreturn grid_consumption;",         "outputs": 1,         "noerr": 0,         "initialize": "",         "finalize": "",         "x": 670,         "y": 560,         "wires": [             [                 "25f553e2.1c4654"             ]         ]     },     {         "id": "6a0e855a.7a332c",         "type": "function",         "z": "73601004.100a8",         "name": "Gesamtverbrauch [W]",         "func": "var consumption = {};\nvar direct_consumption = {};\ndirect_consumption = Number(( msg.payload.power - msg.payload.current_charging_w - msg.payload.grid_feedin ));\nif (direct_consumption < 0) \n{ \n    consumption.payload = Number(msg.payload.grid_consumption + msg.payload.current_discharge_w);\n} else \n{ \n consumption.payload = Number(direct_consumption + msg.payload.grid_consumption + msg.payload.current_discharge_w);\n}\nreturn consumption;",         "outputs": 1,         "noerr": 0,         "initialize": "",         "finalize": "",         "x": 720,         "y": 840,         "wires": [             [                 "6a1c8624.b574c8",                 "45ba9c42.4222e4",                 "6f8cdb12.3e7374"             ]         ],         "info": "negative Werte werden berücksichtigt und auf 0 gesetzt"     },     {         "id": "fc5e11eb.ba21a",         "type": "debug",         "z": "73601004.100a8",         "name": "90",         "active": false,         "tosidebar": true,         "console": false,         "tostatus": false,         "complete": "payload",         "targetType": "msg",         "x": 650,         "y": 1340,         "wires": []     },     {         "id": "a4c26300.abcf4",         "type": "sma-webconnect",         "z": "73601004.100a8",         "d": true,         "ip_address": "192.168.178.56",         "right": "istl",         "use_tls": true,         "device_selection": "sb_storage",         "x": 300,         "y": 1040,         "wires": [             [                 "fc5e11eb.ba21a",                 "3bfa5404.4d703c",                 "5e69c7db.dafd38",                 "1086b520.5d1b7b",                 "77af498b.03e25",                 "f615d918.178278"             ]         ]     },     {         "id": "a31e461f.8e82a8",         "type": "sma-webconnect",         "z": "73601004.100a8",         "d": true,         "ip_address": "192.168.178.44",         "right": "istl",         "use_tls": true,         "device_selection": "sb_tripower",         "x": 320,         "y": 80,         "wires": [             [                 "f6b78416.0ce198",                 "f3679e8c.d7852",                 "2346c812.729148",                 "1086b520.5d1b7b",                 "47389e8e.c9eb38",                 "7dd2a67.d2b3058",                 "1c9d9585.7182f2",                 "1eca9bac.996fdc",                 "a58f93ee.249618"             ]         ]     },     {         "id": "3bfa5404.4d703c",         "type": "function",         "z": "73601004.100a8",         "name": "Batteriefüllung",         "func": "var ladung = {};\nladung.payload = ( msg.payload.charge_percent );\nreturn ladung;",         "outputs": 1,         "noerr": 0,         "x": 680,         "y": 1080,         "wires": [             [                 "486ee9ca.3c39f8",                 "5e1bbeba.dd405"             ]         ]     },     {         "id": "5e69c7db.dafd38",         "type": "function",         "z": "73601004.100a8",         "name": "Batterieentladung",         "func": "var entladung = {};\nentladung.payload = Math.round (0

HoLo85 commented 3 years ago

Danke, leider nur sehr unübersichtlich. Bitte nutze die Code Funktion '<>' in der Toolleiste wenn du Code posten willst.

Mir ging es aber eigentlich nur darum, ob du dem sma-webconnect node eine eigene Config gibst, mit der du spezifische Werte deiner Anlage ausliest, oder ob du die vordefinierten Werte in der Node Config benutzt.

Wenn ich mir deine Logs ansehe sieht es so aus als ob die Node-Red Restarts mit Tail.latestPosition (/usr/local/addons/redmatic/var/node_modules/node-red-node-tail/node_modules/tail/lib/tail.js:81:23 zusammenhängen. Im ersten Log startet Node das erste mal neu nachdem dieser Fehler geworfen wurde und erst dann verursacht auch sma-webconnect einen Fehler. Im zweiten Log sehe ich nur ein Neustart, dieser wurde aber ebenfalls von node-red-node-tail verursacht.

HoLo85 commented 3 years ago

@phmevideo konntest du deine Abstürze beheben?

HoLo85 commented 3 years ago

@rlindner I think this issue can be closed. As suspected the problem was tail and not this node and it also has been confirmed in an answer to the forum post, linked in the opening post, that tail has a problem. Since there has been no answer from @phmevideo till now I suggest we close this issue.

rlindner commented 3 years ago

Hey @HoLo85, thanks for the heads up, I'm fine with closing this here then.