Themabewertung:
  • 4 Bewertung(en) - 5 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
Eigener MyGekko-Node für Node-Red
#68
Top. Funktioniert jetzt alles so wie es soll.


Hatte ja HIER mal das Problem erwähnt, dass die Shelly's HT seit einem Update nur noch sehr kurz online sind und der Gekko es eventuell nicht mehr schafft den Wert ab zugreifen.

Wenn man die IP des Shelly's im Browser aufruft, hat man bei "Internet setting" die Möglichkeit das der Shelly aktiv an ein MQTT Topic sendet. Die Option ist mittels App nicht verfügbar.

Dadurch das ich diesen Wert jetzt beliebig in eine Flow-Variable speichern kann, sobald sich der MQTT-Topic-Wert ändert, ist das Problem hinfällig. Der letzte, aktiv vom Shelly gesendete Wert steht dem Gekko somit immer zur Verfügung.


Danke für die Hilfe. Ich hab das jetzt so gelöst. (Beispiel mit 3 Shelly's)

Code:
[{"id":"5bf4ffbd.c7e46","type":"tab","label":"Shelly HT","disabled":false,"info":""},{"id":"5a6a835d.b2b73c","type":"http in","z":"5bf4ffbd.c7e46","name":"/Shelly/HT","url":"/Shelly/HT","method":"get","upload":false,"swaggerDoc":"","x":100,"y":620,"wires":[["d7622984.f7d2f8"]]},{"id":"4f6f3ad9.8560f4","type":"function","z":"5bf4ffbd.c7e46","name":"","func":"flow.set('46-Temperatur',Number(msg.payload))\nreturn msg;","outputs":0,"noerr":0,"x":270,"y":80,"wires":[]},{"id":"d7622984.f7d2f8","type":"function","z":"5bf4ffbd.c7e46","name":"","func":"var o=\n        {\n        Temp_46:flow.get('46-Temperatur',0),\n        Feucht_46:flow.get('46-Feuchtigkeit',0), \n        Batt_46:flow.get('46-Batterie',0),\n        Temp_49:flow.get('49-Temperatur',0),\n        Feucht_49:flow.get('49-Feuchtigkeit',0), \n        Batt_49:flow.get('49-Batterie',0),\n        Temp_31:flow.get('31-Temperatur',0),\n        Feucht_31:flow.get('31-Feuchtigkeit',0), \n        Batt_31:flow.get('31-Batterie',0)\n        };\nmsg.payload  = JSON.stringify(o);\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":620,"wires":[["a9250ec6.4a3e3"]]},{"id":"1cbef30a.4a99cd","type":"mqtt in","z":"5bf4ffbd.c7e46","name":"46-Temperatur","topic":"shellies/46-shelly/sensor/temperature","qos":"2","datatype":"auto","broker":"7438383a.9fc788","x":120,"y":80,"wires":[["4f6f3ad9.8560f4"]]},{"id":"a9250ec6.4a3e3","type":"http response","z":"5bf4ffbd.c7e46","name":"HTTP-Response","statusCode":"200","headers":{"content-type":"text/html"},"x":450,"y":620,"wires":[]},{"id":"811244cc.f13ea8","type":"mqtt in","z":"5bf4ffbd.c7e46","name":"46-Feutigkeit","topic":"shellies/46-shelly/sensor/humidity","qos":"2","datatype":"auto","broker":"7438383a.9fc788","x":110,"y":120,"wires":[["cb1f88e3.5f0188"]]},{"id":"3b9881e9.cdce6e","type":"mqtt in","z":"5bf4ffbd.c7e46","name":"46-Batterie","topic":"shellies/46-shelly/sensor/battery","qos":"2","datatype":"auto","broker":"7438383a.9fc788","x":100,"y":160,"wires":[["5063bd42.7934b4"]]},{"id":"cb1f88e3.5f0188","type":"function","z":"5bf4ffbd.c7e46","name":"","func":"flow.set('46-Feuchtigkeit',Number(msg.payload))\nreturn msg;","outputs":0,"noerr":0,"x":270,"y":120,"wires":[]},{"id":"5063bd42.7934b4","type":"function","z":"5bf4ffbd.c7e46","name":"","func":"flow.set('46-Batterie',Number(msg.payload))\nreturn msg;","outputs":0,"noerr":0,"x":270,"y":160,"wires":[]},{"id":"8aae745d.c6b918","type":"comment","z":"5bf4ffbd.c7e46","name":"Nebengebäude","info":"","x":120,"y":40,"wires":[]},{"id":"40934432.6b281c","type":"function","z":"5bf4ffbd.c7e46","name":"","func":"flow.set('31-Temperatur',Number(msg.payload))\nreturn msg;","outputs":0,"noerr":0,"x":270,"y":260,"wires":[]},{"id":"5b004095.e1754","type":"mqtt in","z":"5bf4ffbd.c7e46","name":"31-Temperatur","topic":"shellies/31-shelly/sensor/temperature","qos":"2","datatype":"auto","broker":"7438383a.9fc788","x":120,"y":260,"wires":[["40934432.6b281c"]]},{"id":"ed4d314.2bc29d","type":"mqtt in","z":"5bf4ffbd.c7e46","name":"31-Feutigkeit","topic":"shellies/31-shelly/sensor/humidity","qos":"2","datatype":"auto","broker":"7438383a.9fc788","x":110,"y":300,"wires":[["b33134c7.cd25c8"]]},{"id":"de25a419.92e628","type":"mqtt in","z":"5bf4ffbd.c7e46","name":"31-Batterie","topic":"shellies/31-shelly/sensor/battery","qos":"2","datatype":"auto","broker":"7438383a.9fc788","x":100,"y":340,"wires":[["240b7093.1ba26"]]},{"id":"b33134c7.cd25c8","type":"function","z":"5bf4ffbd.c7e46","name":"","func":"flow.set('31-Feuchtigkeit',Number(msg.payload))\nreturn msg;","outputs":0,"noerr":0,"x":270,"y":300,"wires":[]},{"id":"240b7093.1ba26","type":"function","z":"5bf4ffbd.c7e46","name":"","func":"flow.set('31-Batterie',Number(msg.payload))\nreturn msg;","outputs":0,"noerr":0,"x":270,"y":340,"wires":[]},{"id":"fdd22cd5.d273f","type":"comment","z":"5bf4ffbd.c7e46","name":"Dachboden","info":"","x":110,"y":220,"wires":[]},{"id":"585cbe6f.6c03f","type":"function","z":"5bf4ffbd.c7e46","name":"","func":"flow.set('49-Temperatur',Number(msg.payload))\nreturn msg;","outputs":0,"noerr":0,"x":270,"y":440,"wires":[]},{"id":"7c2b5c50.e35964","type":"mqtt in","z":"5bf4ffbd.c7e46","name":"49-Temperatur","topic":"shellies/49-shelly/sensor/temperature","qos":"2","datatype":"auto","broker":"7438383a.9fc788","x":120,"y":440,"wires":[["585cbe6f.6c03f"]]},{"id":"2a5156a3.de3a8a","type":"mqtt in","z":"5bf4ffbd.c7e46","name":"49-Feutigkeit","topic":"shellies/49-shelly/sensor/humidity","qos":"2","datatype":"auto","broker":"7438383a.9fc788","x":110,"y":480,"wires":[["ff5894c5.2e7a98"]]},{"id":"b79f6534.a90fd8","type":"mqtt in","z":"5bf4ffbd.c7e46","name":"49-Batterie","topic":"shellies/49-shelly/sensor/battery","qos":"2","datatype":"auto","broker":"7438383a.9fc788","x":100,"y":520,"wires":[["62edd254.f1221c"]]},{"id":"ff5894c5.2e7a98","type":"function","z":"5bf4ffbd.c7e46","name":"","func":"flow.set('49-Feuchtigkeit',Number(msg.payload))\nreturn msg;","outputs":0,"noerr":0,"x":270,"y":480,"wires":[]},{"id":"62edd254.f1221c","type":"function","z":"5bf4ffbd.c7e46","name":"","func":"flow.set('49-Batterie',Number(msg.payload))\nreturn msg;","outputs":0,"noerr":0,"x":270,"y":520,"wires":[]},{"id":"c95f88aa.0ba268","type":"comment","z":"5bf4ffbd.c7e46","name":"Formekarium","info":"","x":110,"y":400,"wires":[]},{"id":"7438383a.9fc788","type":"mqtt-broker","z":"","name":"MQTT Broker","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]


Nachrichten in diesem Thema
RE: Eigener MyGekko-Node für Node-Red - von Strabbit - 23.01.2020, 19:03

Möglicherweise verwandte Themen...
Thema Verfasser Antworten Ansichten Letzter Beitrag
  eMail mit Node Red versenden Tora 1 1.331 14.11.2023, 08:48
Letzter Beitrag: Strabbit
  Jalousie steuern und Temperatur Abfragen über Alexa / Node red OsramBulb 1 1.959 22.01.2023, 23:05
Letzter Beitrag: Strabbit
  Klingel über Node-Red abfragen Matze 6 9.322 01.03.2021, 12:45
Letzter Beitrag: Strabbit
  MyGekko-QueryAPI Anbindung an Node-Red über offizielles Repository Bluescreen 33 44.913 19.01.2021, 17:43
Letzter Beitrag: Strabbit
  Node-RED Befehle auf Gekko ausführen eschy 4 7.052 26.06.2020, 13:42
Letzter Beitrag: eschy

Gehe zu:


Benutzer, die gerade dieses Thema anschauen:
15 Gast/Gäste