NEWS
Probleme bei Umsetzung eines Flows
-
Hallo,
ich kriege die einfache Funktion nicht sauber hin. Oberhalb einer Spannung X soll eine LED signalisieren, dass die Anlage per Hand gestartet werden kann. Unterhalb Spannung X soll die LED aus sein. Als Erweiterung soll die LED auch oberhalb Spannung X ausgehen, wenn die Anlage gestartet wurde. Wird die Anlage oberhalb der Spannung X ausgeschaltet, soll die LED wieder an gehen.[{"id":"5c4848b5cbcb4807","type":"tab","label":"Flow 2","disabled":false,"info":"","env":[]},{"id":"e53cc585f788027f","type":"mqtt out","z":"5c4848b5cbcb4807","name":"Handstart LED ok","topic":"mansteuerung/handstartok","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"d0d69da0d3c24301","x":790,"y":240,"wires":[]},{"id":"2e4e08a293d7fa3d","type":"server-state-changed","z":"5c4848b5cbcb4807","name":"Batteriespannung","server":"6d6a06a0.fdabd8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.victron150_battery_voltage","entityIdType":"exact","outputInitially":false,"stateType":"num","ifState":"52.4","ifStateType":"num","ifStateOperator":"gte","outputOnlyOnStateChange":true,"for":"200","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":100,"y":260,"wires":[["f00434527acb17db","6e96bfc5abbe6e8f"],["4036622dfdd33572","f435cbc6c1aa4ed7"]],"info":"Sinkt die Batteriespannung unter eingestellten Wert\r\ndann soll der Wechselrichter abgeschaltet\r\nwerden"},{"id":"6e96bfc5abbe6e8f","type":"change","z":"5c4848b5cbcb4807","name":"Handstart ok","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":240,"wires":[["e53cc585f788027f"]]},{"id":"4036622dfdd33572","type":"change","z":"5c4848b5cbcb4807","name":"Handstart ok","rules":[{"t":"set","p":"payload","pt":"msg","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":300,"wires":[["e53cc585f788027f"]]},{"id":"f435cbc6c1aa4ed7","type":"api-current-state","z":"5c4848b5cbcb4807","name":"WR aus","server":"6d6a06a0.fdabd8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.victron_battery_protect","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"on","valueType":"str"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":300,"y":360,"wires":[["e53cc585f788027f"],[]]},{"id":"f00434527acb17db","type":"api-current-state","z":"5c4848b5cbcb4807","name":"WR an","server":"6d6a06a0.fdabd8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.victron_battery_protect","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"off","valueType":"str"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":290,"y":180,"wires":[["e53cc585f788027f"],[]]},{"id":"d0d69da0d3c24301","type":"mqtt-broker","name":"","broker":"192.168.10.9","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"6d6a06a0.fdabd8","type":"server","name":"Home Assistant","addon":true}]
Danke und Gruß
-
Mal abgesehen davon, dass ich Deine Nodes nicht installiere - sehe ich weder switch Nodes noch dass Du die Logik richtig implementiert hast.
Am Besten arbeitest Du erst mal mit INject Nodes und simulierst Dein Verhalten. Ausserdem hast Du 2 Trigger - einmal der Zustand Deiner Anlage, zum anderen Die Quelle, die DIr die Spannung liefert. Dann formuliere Deine Logik, wenn einmal die Spannung geliefert wird und einmal die Logik
Probiere es mal so:
Oben musst Du halt die Quelle für die Spannung, unten für den Zustand der Anlage einsetzen. Hier der Flow zum Import:
-
@mickym Wow, wieder mein Retter. Das hätte ich so nicht geschafft. Die Abfrage der Spannung und des Anlagenstatus habe ich über eine "current state" node alle 20s parallel abgefragt. Hier hat es bei Anlage Start und Spannung zu gering komischerweise manchmal zum hin und herschalten der LED geführt. Nachdem ich eine Verzögerung von 100ms für die Spannung eingebaut habe ist Ruhe. Mit Inject nodes hat es von vorherein geklappt.
Eine Zusatzfrage... mein Programm läuft auf einem ESP32. Diesen möchte ich mobil im Haus nutzen. Heißt mal hier anstecken und mal da. Wenn der ESP hochfährt, dann werden zwei "link in/out" nodes aktiviert. Das verhagelt mir Funktionen, die auf meinem Raspi laufen, der 24/7 an ist. Gibt es die Möglichkeit beim Start die nodes nicht abzufragen?
Ganz dickes Danke
-
@derklotz Also ich weiß zwar nicht genau, was Du meinst- Grundsätzlich halte ich nichts davon irgendwas in festen Zeitabständen abzufragen, ausser Deine Spannungsquelle würde permanent triggern. Aber letztlich ist alles gut - wenn es funktioniert.
Zu dem anderen Problem. Wenn NodeRed hochfährt, kann man ja mit Inject Nodes einmal triggern, um den Start zu erkennen. Mit diesem Zustand blockierst Du Deinen Flow - wann Du ihn wieder frei gibst, geht aus Deiner Beschreibung nicht hervor.
-
@mickym Ich halte auch nicht so viel von den festen Zeitabständen. Ich hatte ja geschrieben, dass ich manchmal den Standort des Gerätes ändern möchte. Dann ist der ESP32 spannungslos. Beim Neustart muss der Zustand der Anlage ("WR" im Bild) ja abgefragt werden, um die Funktion der "Handstart LED ok" zu gewährleisten. Der Zustand kommt aus meinem Pi, der 24/7 läuft. Hier ändert sich der Zustand der Anlage meistens nur 1 bis 2x am Tag. Somit funktioniert die Handstart LED nur, wenn die Anlage ihren Zustand irgendwann geändert hat und nicht "sofort".
Hier ein Screenshot kurz nach Neustart ESP. Einmal "current state" und einmal "events state"
Zum Abschluß noch wo die link nodes beim ESP Start geblockt werden sollen
[{"id":"92ec0c29a2830a62","type":"tab","label":"Start ESP","disabled":false,"info":"","env":[]},{"id":"1ee4af50ff10e357","type":"mqtt out","z":"92ec0c29a2830a62","name":"Batterie LED voll","topic":"mansteuerung/batvoll","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"d0d69da0d3c24301","x":750,"y":420,"wires":[]},{"id":"8cdb152118f9e0fe","type":"mqtt out","z":"92ec0c29a2830a62","name":"Handstart LED ok","topic":"mansteuerung/handstartok","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"d0d69da0d3c24301","x":730,"y":1060,"wires":[]},{"id":"5d72ef787a0c55c3","type":"change","z":"92ec0c29a2830a62","name":"Batterie voll","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":400,"wires":[["1ee4af50ff10e357"]]},{"id":"ee9f6d5fa4f0dd86","type":"mqtt out","z":"92ec0c29a2830a62","name":"Batterie LED leer","topic":"mansteuerung/batleer","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"d0d69da0d3c24301","x":750,"y":300,"wires":[]},{"id":"56ce718db01ba346","type":"change","z":"92ec0c29a2830a62","name":"Batterie leer","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":300,"wires":[["ee9f6d5fa4f0dd86"]]},{"id":"065b5253838f950b","type":"change","z":"92ec0c29a2830a62","name":"Batterie leer","rules":[{"t":"set","p":"payload","pt":"msg","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":340,"wires":[["ee9f6d5fa4f0dd86"]]},{"id":"7cc6d8c897d9953e","type":"change","z":"92ec0c29a2830a62","name":"Batterie voll","rules":[{"t":"set","p":"payload","pt":"msg","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":440,"wires":[["1ee4af50ff10e357"]]},{"id":"bb6ed9c6498d1c44","type":"mqtt out","z":"92ec0c29a2830a62","name":"Wechselrichter LED an","topic":"mansteuerung/wechselrichteran","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"d0d69da0d3c24301","x":680,"y":580,"wires":[]},{"id":"a54f7956f36feb59","type":"mqtt in","z":"92ec0c29a2830a62","name":"Handstopp","topic":"mansteuerung/binary_sensor/handstopp/state","qos":"2","datatype":"auto-detect","broker":"d0d69da0d3c24301","nl":false,"rap":true,"rh":0,"inputs":0,"x":100,"y":200,"wires":[["dc949d1a61dff0fc"]]},{"id":"dc949d1a61dff0fc","type":"switch","z":"92ec0c29a2830a62","name":"Handstopp off","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"ON","vt":"str"},{"t":"eq","v":"OFF","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":340,"y":200,"wires":[[],["1adce5ae514fb3da"]]},{"id":"1adce5ae514fb3da","type":"change","z":"92ec0c29a2830a62","name":"Handstopp 0","rules":[{"t":"set","p":"payload","pt":"msg","to":"OFF","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":200,"wires":[["92feaacbed03e1a8"]]},{"id":"e1913f61f2f9ec95","type":"inject","z":"92ec0c29a2830a62","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"OFF","payloadType":"str","x":110,"y":260,"wires":[["dc949d1a61dff0fc"]]},{"id":"7927957d53784ef9","type":"mqtt in","z":"92ec0c29a2830a62","name":"Handstart","topic":"mansteuerung/binary_sensor/handstart/state","qos":"0","datatype":"auto","broker":"d0d69da0d3c24301","nl":false,"rap":true,"rh":0,"inputs":0,"x":100,"y":60,"wires":[["2e0141a48fd8c473"]]},{"id":"97ecb4ff335391f1","type":"inject","z":"92ec0c29a2830a62","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":110,"y":140,"wires":[["2e0141a48fd8c473"]]},{"id":"f9479f1f3382de62","type":"change","z":"92ec0c29a2830a62","name":"Handstart 1","rules":[{"t":"set","p":"payload","pt":"msg","to":"ON","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":60,"wires":[["fcce539a82af1eca"]]},{"id":"fcce539a82af1eca","type":"link out","z":"92ec0c29a2830a62","name":"Handstart on","mode":"link","links":["a521f637d1c09984"],"x":735,"y":60,"wires":[]},{"id":"92feaacbed03e1a8","type":"link out","z":"92ec0c29a2830a62","name":"Handstopp off","mode":"link","links":["61e10de6c9bf9e35"],"x":735,"y":200,"wires":[]},{"id":"2e0141a48fd8c473","type":"api-current-state","z":"92ec0c29a2830a62","name":"Handstartspannung hoch genug","server":"6d6a06a0.fdabd8","version":3,"outputs":2,"halt_if":"52.6","halt_if_type":"num","halt_if_compare":"gt","entity_id":"sensor.victron150_battery_voltage","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":390,"y":120,"wires":[["5f6b964cdec04673"],[]]},{"id":"8f5b5943f28eb6c1","type":"mqtt out","z":"92ec0c29a2830a62","name":"Wechselrichter LED aus","topic":"mansteuerung/wechselrichteraus","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"d0d69da0d3c24301","x":690,"y":640,"wires":[]},{"id":"5f6b964cdec04673","type":"switch","z":"92ec0c29a2830a62","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"52.6","vt":"num"},{"t":"lt","v":"52.6","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":430,"y":60,"wires":[["f9479f1f3382de62"],[]]},{"id":"55dd726e837da0a2","type":"api-current-state","z":"92ec0c29a2830a62","name":"WR","server":"6d6a06a0.fdabd8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"switch.victron_battery_protect","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":90,"y":900,"wires":[["fe7eb5132d8c5c96"],["fe7eb5132d8c5c96"]]},{"id":"a32458c01747376b","type":"link in","z":"92ec0c29a2830a62","name":"Trigger","links":["3a717d6267e39229"],"x":115,"y":500,"wires":[["8a38ef60eac00166","d3d20d56f26fd163","55dd726e837da0a2","1b4060be5f2b2d0e"]]},{"id":"8a38ef60eac00166","type":"api-current-state","z":"92ec0c29a2830a62","name":"Wechselrichter LED an","server":"6d6a06a0.fdabd8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.victron_battery_protect","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":160,"y":580,"wires":[["bb6ed9c6498d1c44"],["bb6ed9c6498d1c44"]]},{"id":"d3d20d56f26fd163","type":"api-current-state","z":"92ec0c29a2830a62","name":"Wechselrichter LED aus","server":"6d6a06a0.fdabd8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.victron_battery_protect","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":170,"y":640,"wires":[["8f5b5943f28eb6c1"],["8f5b5943f28eb6c1"]]},{"id":"34aa9bcbe17c2dae","type":"api-current-state","z":"92ec0c29a2830a62","name":"Batteriespannung Handstart","server":"6d6a06a0.fdabd8","version":3,"outputs":2,"halt_if":"52.6","halt_if_type":"num","halt_if_compare":"gte","entity_id":"sensor.victron150_battery_voltage","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":180,"y":780,"wires":[["b35ffe022d42d72f"],["b35ffe022d42d72f"]]},{"id":"b35ffe022d42d72f","type":"switch","z":"92ec0c29a2830a62","name":"52.6V","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"52.6","vt":"str"},{"t":"lt","v":"52.6","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":780,"wires":[["68f2e716764ef0cc"],["02e85ab3fc903d45"]]},{"id":"fe7eb5132d8c5c96","type":"change","z":"92ec0c29a2830a62","name":"Setze Flow Anlage","rules":[{"t":"set","p":"anlage","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":900,"wires":[["b877d66b5fef52a4"]]},{"id":"02e85ab3fc903d45","type":"change","z":"92ec0c29a2830a62","name":"Handbetrieb = false, payload = false","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"},{"t":"set","p":"handbetrieb","pt":"flow","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":800,"wires":[["552bdb3b6c10f7f3"]]},{"id":"552bdb3b6c10f7f3","type":"change","z":"92ec0c29a2830a62","name":"translate","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"on","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"bool","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":1000,"wires":[["8cdb152118f9e0fe"]]},{"id":"68f2e716764ef0cc","type":"change","z":"92ec0c29a2830a62","name":"Handbetrieb = true, payload != Anlage","rules":[{"t":"set","p":"payload","pt":"msg","to":"anlage","tot":"flow"},{"t":"set","p":"payload","pt":"msg","to":"$not(payload)\t","tot":"jsonata"},{"t":"set","p":"handbetrieb","pt":"flow","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":760,"wires":[["552bdb3b6c10f7f3"]]},{"id":"b877d66b5fef52a4","type":"switch","z":"92ec0c29a2830a62","name":"Status Anlage ?","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":500,"y":900,"wires":[["4fb91def78fce916"],["7e875e6adac44696"]]},{"id":"4fb91def78fce916","type":"change","z":"92ec0c29a2830a62","name":"payload != Handbetrieb","rules":[{"t":"set","p":"payload","pt":"msg","to":"handbetrieb","tot":"flow"},{"t":"set","p":"payload","pt":"msg","to":"$not(payload)\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":860,"wires":[["552bdb3b6c10f7f3"]]},{"id":"7e875e6adac44696","type":"change","z":"92ec0c29a2830a62","name":"payload = Handbetrieb","rules":[{"t":"set","p":"payload","pt":"msg","to":"handbetrieb","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":920,"wires":[["552bdb3b6c10f7f3"]]},{"id":"18525b5aaffd0800","type":"debug","z":"92ec0c29a2830a62","name":"debug 52","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":440,"y":1020,"wires":[]},{"id":"c426cc06d385fc87","type":"inject","z":"92ec0c29a2830a62","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"52.8","payloadType":"num","x":310,"y":840,"wires":[[]]},{"id":"654b8d616bef7dd4","type":"inject","z":"92ec0c29a2830a62","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"52","payloadType":"num","x":170,"y":840,"wires":[[]]},{"id":"5b90705cd1293310","type":"inject","z":"92ec0c29a2830a62","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":110,"y":960,"wires":[[]]},{"id":"58fb5e9f5e5d0366","type":"inject","z":"92ec0c29a2830a62","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":110,"y":1020,"wires":[[]]},{"id":"1b4060be5f2b2d0e","type":"trigger","z":"92ec0c29a2830a62","name":"100ms Verzögerung","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"100","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":140,"y":720,"wires":[["34aa9bcbe17c2dae"]],"info":"Trigger setzen, weil sonst alle Zustände\r\ngleichzeitig kommen"},{"id":"5b51d3bf5a8bf96d","type":"server-state-changed","z":"92ec0c29a2830a62","name":"Batteriespannung","server":"6d6a06a0.fdabd8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.victron150_battery_voltage","entityIdType":"exact","outputInitially":false,"stateType":"num","ifState":"51.4","ifStateType":"num","ifStateOperator":"lt","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":320,"wires":[["56ce718db01ba346"],["065b5253838f950b"]]},{"id":"f1181d621fe48e10","type":"server-state-changed","z":"92ec0c29a2830a62","name":"Batteriespannung","server":"6d6a06a0.fdabd8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.victron150_battery_voltage","entityIdType":"exact","outputInitially":false,"stateType":"num","ifState":"53","ifStateType":"num","ifStateOperator":"gte","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":420,"wires":[["5d72ef787a0c55c3"],["7cc6d8c897d9953e"]]},{"id":"d0d69da0d3c24301","type":"mqtt-broker","name":"","broker":"192.168.10.9","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"6d6a06a0.fdabd8","type":"server","name":"Home Assistant","addon":true}]
-
@derklotz sagte in Probleme bei Umsetzung eines Flows:
Beim Neustart muss der Zustand der Anlage ("WR" im Bild) ja abgefragt werden, um die Funktion der "Handstart LED ok" zu gewährleisten. Der Zustand kommt aus meinem Pi, der 24/7 läuft. Hier ändert sich der Zustand der Anlage meistens nur 1 bis 2x am Tag. Somit funktioniert die Handstart LED nur, wenn die Anlage ihren Zustand irgendwann geändert hat und nicht "sofort".
Dann fragst du den Zustand der Alange nicht ab, sondern wartest bis die Anlage durch Zustandsänderung sich meldet.
Nehmen wir den Flow, den ich vorher gemacht habe:
Sprich hier wird ja die Flowvariable anlage erst durch eine Injectnode oder durch eine Zustandsänderung irgendwann erstmalig gesetzt .
Sprich wenn NodeRed komplett neu gestartet wird, sind die Flowvariablen ja noch nicht gesetzt.
Nun kannst Du ja über einen switch den flow solange blockieren, bis die Anlage die Flowvariable gesetzt hat. Sprich das Nachrichtenobjekt erst durchgelassen wird, wenn die Flowvariable definiert wurde.
-
@mickym Danke... heute krieg ich das nicht mehr auf die Kette. Die letzten beiden Sätze muss ich mir morgen nochmal genauer ansehen.
Lasse die Funktion jetzt so wie sie ist.
Was mir immer noch fehlt ist, dass link nodes beim Start des ESP beglockt werden sollen.