NEWS
Lichtschalter und iobroker und manuelles auslösen
-
@Ente OK importier mal diesen Flow:
[ { "id": "95fe1d43.5b40e", "type": "ioBroker in", "z": "816d1036.bc2a78", "name": "", "topic": "0_userdata.0.example_state.test", "payloadType": "value", "onlyack": "", "func": "rbe", "gap": "", "fireOnStart": "false", "x": 370, "y": 340, "wires": [ [ "33ce8287.5bc756" ] ] }, { "id": "32a2cf7a.f26bd", "type": "ioBroker out", "z": "816d1036.bc2a78", "name": "", "topic": "0_userdata.0.example_state.test", "ack": "false", "autoCreate": "false", "stateName": "", "role": "", "payloadType": "", "readonly": "", "stateUnit": "", "stateMin": "", "stateMax": "", "x": 1010, "y": 400, "wires": [] }, { "id": "11450bfd.8107c4", "type": "ewelink-power-state-read", "z": "816d1036.bc2a78", "name": "", "deviceId": "1000519e49", "channel": 1, "auth": "", "x": 500, "y": 400, "wires": [ [ "c1a8c003.a50b8" ] ] }, { "id": "dc47e9fb.4654", "type": "ewelink-power-state-write", "z": "816d1036.bc2a78", "name": "", "deviceId": "1000519e49", "channel": 1, "auth": "", "x": 960, "y": 340, "wires": [ [] ] }, { "id": "18482006.cffd8", "type": "inject", "z": "816d1036.bc2a78", "name": "", "topic": "", "payload": " ", "payloadType": "str", "repeat": "1", "crontab": "", "once": false, "onceDelay": 0.1, "x": 310, "y": 400, "wires": [ [ "11450bfd.8107c4" ] ] }, { "id": "33ce8287.5bc756", "type": "change", "z": "816d1036.bc2a78", "name": "", "rules": [ { "t": "change", "p": "payload", "pt": "msg", "from": "true", "fromt": "str", "to": "on", "tot": "str" }, { "t": "change", "p": "payload", "pt": "msg", "from": "false", "fromt": "str", "to": "off", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 640, "y": 340, "wires": [ [ "dc47e9fb.4654" ] ] }, { "id": "c1a8c003.a50b8", "type": "change", "z": "816d1036.bc2a78", "name": "", "rules": [ { "t": "change", "p": "payload", "pt": "msg", "from": "on", "fromt": "str", "to": "true", "tot": "str" }, { "t": "change", "p": "payload", "pt": "msg", "from": "off", "fromt": "str", "to": "false", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 740, "y": 400, "wires": [ [ "32a2cf7a.f26bd" ] ] } ]
In den beiden userdata nodes muss test groß geschrieben werden also "Test"
-
-
@Ente Wenn du test gegen Test getauscht hast kannst du das ja mal testen. Werte auslesen und schalten in einem Datenpunkt ist in Nodered sehr kompliziert. evtl. lösen wir das gleich anders
-
Und deployed ist es auch.
-
@Ente OK ich sehe gerade in der API das da kein string rauskommt sonder ein json element. Das muss gesondert behandelt werden.
-
@Ente Also nachmal:
[{"id":"eeaafec1.64e1c8","type":"ioBroker in","z":"816d1036.bc2a78","name":"","topic":"0_userdata.0.example_state.Test","payloadType":"value","onlyack":"","func":"rbe","gap":"","fireOnStart":"false","x":550,"y":260,"wires":[["a0eca12f.40b61"]]},{"id":"1ee747f3.f1012","type":"ioBroker out","z":"816d1036.bc2a78","name":"","topic":"0_userdata.0.example_state.Test","ack":"false","autoCreate":"false","stateName":"","role":"","payloadType":"","readonly":"","stateUnit":"","stateMin":"","stateMax":"","x":1320,"y":320,"wires":[]},{"id":"8ee7ecff.83d5a8","type":"ewelink-power-state-read","z":"816d1036.bc2a78","name":"","deviceId":"1000519e49","channel":1,"auth":"","x":680,"y":320,"wires":[["884e67c2.8507a8"]]},{"id":"75ded6ec.b0fc7","type":"ewelink-power-state-write","z":"816d1036.bc2a78","name":"","deviceId":"1000519e49","channel":1,"auth":"","x":1300,"y":260,"wires":[[]]},{"id":"6789feab.7e625","type":"inject","z":"816d1036.bc2a78","name":"","topic":"","payload":" ","payloadType":"str","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":490,"y":320,"wires":[["8ee7ecff.83d5a8"]]},{"id":"884e67c2.8507a8","type":"switch","z":"816d1036.bc2a78","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"on","vt":"str"},{"t":"cont","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":870,"y":320,"wires":[["60c17500.006144"],["c79b99e8.9954a"]]},{"id":"60c17500.006144","type":"change","z":"816d1036.bc2a78","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":300,"wires":[["1ee747f3.f1012"]]},{"id":"c79b99e8.9954a","type":"change","z":"816d1036.bc2a78","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":340,"wires":[["1ee747f3.f1012"]]},{"id":"a0eca12f.40b61","type":"change","z":"816d1036.bc2a78","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"str","to":"on","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"str","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":260,"wires":[["75ded6ec.b0fc7"]]}]
-
deployed.
-
@Ente OK passiert irgendwas? Siehst du irgendwo werte?
-
@CrunkFX
Böde Frage, wo soll ich denn die Werte sehen? Muss ich irgendwas in IOB oder vis integrieren? -
@Ente Nein wenn dort Werte rauskommen, stehen die unter dem State, bei dir hier:
-
@Ente importier das mal, drück den Knopf links und zeig was im Debug fenster steht
[{"id":"8ee7ecff.83d5a8","type":"ewelink-power-state-read","z":"816d1036.bc2a78","name":"","deviceId":"1000519e49","channel":1,"auth":"","x":660,"y":500,"wires":[["b7be1488.deabe"]]},{"id":"6789feab.7e625","type":"inject","z":"816d1036.bc2a78","name":"","topic":"","payload":"<-- Da klicken","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":430,"y":500,"wires":[["8ee7ecff.83d5a8"]]},{"id":"b7be1488.deabe","type":"debug","z":"816d1036.bc2a78","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":900,"y":500,"wires":[]}]
-
-
Das steht im IOB
-
Können wir morgen weiter machen. Mein 5jähriger stand grad da, schlecht geträumt. Ich kümmere mich mal um ihn.
Bitte nicht falsch verstehen, ist echt krass, Deine Unterstützung.
-
@Ente Gar kein Problem. Dann werde ich morgen mal 2 Sonoff geräte rauskramen und via Ewelink mitmachen vielleich findet sich ja eine einfache lösung.
-
@Ente Ich hab mal bei mit einen Sonoff 4ch R2 in eWeLink eingebunden. Die API ist wirklich sehr schlecht von eWeLink. Das könnte einder der gründe sein warum das vorher bei dir nicht funktioniert hat. Wie auch immer, ich hab mir einen kleinen Flow gebastelt, mit dem schalten und abfragen in einem Datenpunkt möglich ist. Wichtig ist das der Taster nicht schnell hintereinander betätigt oder abgefragt wird, da sonst "Err 503" kommt. Probier mal diesen Flow aus, ich sollte alle deine Angaben korrekt eingefügt haben, du kannst aber gerne nochmal nachschauen ob Device ID und IOB Datenpunkt korrekt sind.
[{"id":"95fe1d43.5b40e","type":"ioBroker in","z":"816d1036.bc2a78","name":"IOB Datenpunkt","topic":"0_userdata.0.example_state.Test","payloadType":"value","onlyack":"","func":"rbe","gap":"","fireOnStart":"false","x":340,"y":160,"wires":[["33ce8287.5bc756"]]},{"id":"32a2cf7a.f26bd","type":"ioBroker out","z":"816d1036.bc2a78","name":"IOB Datenpunkt","topic":"0_userdata.0.example_state.Text","ack":"false","autoCreate":"false","stateName":"","role":"","payloadType":"","readonly":"","stateUnit":"","stateMin":"","stateMax":"","x":980,"y":280,"wires":[]},{"id":"11450bfd.8107c4","type":"ewelink-power-state-read","z":"816d1036.bc2a78","name":"Zustand abfragen","deviceId":"1000519e49","channel":1,"auth":"f9622a6.c35c9d8","x":550,"y":220,"wires":[["b9390314.6cf9f"]]},{"id":"dc47e9fb.4654","type":"ewelink-power-state-write","z":"816d1036.bc2a78","name":"eWeLink Status senden","deviceId":"1000519e49","channel":1,"auth":"f9622a6.c35c9d8","x":1070,"y":160,"wires":[[]]},{"id":"33ce8287.5bc756","type":"change","z":"816d1036.bc2a78","name":"Werte konvertieren","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"str","to":"on","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"str","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":160,"wires":[["f6d231f2.e928f"]]},{"id":"c1a8c003.a50b8","type":"change","z":"816d1036.bc2a78","name":"An in Bool konvertieren","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":770,"y":260,"wires":[["32a2cf7a.f26bd"]]},{"id":"fc6b2932.787fb8","type":"switch","z":"816d1036.bc2a78","name":"On Off Filter","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"on","vt":"str"},{"t":"cont","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":990,"y":220,"wires":[["c1a8c003.a50b8"],["33c0bd48.c102e2"]]},{"id":"33c0bd48.c102e2","type":"change","z":"816d1036.bc2a78","name":"Aus in Bool konvertieren","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":770,"y":300,"wires":[["32a2cf7a.f26bd"]]},{"id":"b9390314.6cf9f","type":"json","z":"816d1036.bc2a78","name":"JSON in String konvertieren","property":"payload","action":"","pretty":false,"x":780,"y":220,"wires":[["fc6b2932.787fb8"]]},{"id":"9979a035.4da09","type":"ewelink-event-listener","z":"816d1036.bc2a78","name":"Änderung abfragen","deviceId":"1000519e49","auth":"f9622a6.c35c9d8","x":350,"y":220,"wires":[["11450bfd.8107c4","aabd4846.2161e8"]]},{"id":"57fcee70.43879","type":"change","z":"816d1036.bc2a78","name":"Zustandsüberwachung unterbrechen","rules":[{"t":"set","p":"payload","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":360,"wires":[[]]},{"id":"aabd4846.2161e8","type":"trigger","z":"816d1036.bc2a78","op1":"ok","op2":"nok","op1type":"str","op2type":"str","duration":"300","extend":false,"units":"ms","reset":"","bytopic":"all","name":"","x":540,"y":360,"wires":[["57fcee70.43879"]]},{"id":"f6d231f2.e928f","type":"switch","z":"816d1036.bc2a78","name":"Zustandsüberwachung unterbrechen","property":"payload","propertyType":"flow","rules":[{"t":"neq","v":"ok","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":790,"y":160,"wires":[["dc47e9fb.4654"],[]]},{"id":"f9622a6.c35c9d8","type":"ewelink-credentials","z":""}]
MFG
CrunkFX -
@CrunkFX said in Lichtschalter und iobroker und manuelles auslösen:
Danke für den Flow. Habe ihn importiert. Alles auf grün:
Der node Auslöser 300 macht kurz einen grünen Punkt, wenn ich das Licht via Alexa schalte.
Bei object, object ändert sich nichts.Was mache ich als nächsten Schritt?
-
@Ente OK setz mal einen debug node darein und verbinde ihn mit der rechten seite von Zustand abfragen
Dann wieder rechts in dem fenster mit der Wanze ein Foto machen
-
Interressanterweise ist Änderung abfagen = disconnected und die anderen beiden connected. Wenn ich Änderung abfragen connecte, werden die anderen beiden disconnected.
Alle 3 connecten bekomme ich nicht mehr hin.
-
@Ente Kannst du mal direkt am schalter schalten?