NEWS
node-red-contrib-amazon-echo Dimmen
-
Ich wollte meine KNX Leuchten über die node-red-contrib-amazon-echo Einschalten und Dimmen.
Jedoch klappt das ganze nicht so, wie es soll.
Ich kann zwar Leuchten nur ein/ausschalten, aber nicht dimmen.Es soll bei der Ansage "Dimme Leuchte 1 " zum Beispiel, der Dimmwert übergeben werden und dann eingeschalten werden. Und beim Ausschalten soll, ausgeschaltet werden und dann der Dimmwert wieder auf 0 gesetzt werden. Zudem sollte mit einem Dimmwert von 0 auch ausgeschaltet werden.
Hat hier eventuell jemand eine Lösung?
So sieht der Flow aus:
[ { "id": "793a823a.d4ec7c", "type": "switch", "z": "17c00ccb.376443", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "on", "vt": "str" }, { "t": "eq", "v": "off", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 630, "y": 280, "wires": [ [ "2a2bc042.ec27b" ], [ "5df963ef.9513ec" ] ] }, { "id": "c525be0a.069a", "type": "function", "z": "17c00ccb.376443", "name": "Funktion Dimmen", "func": "msg.payload = msg.payload.bri_normalized;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 750, "y": 420, "wires": [ [ "50384801.c6aef8", "effcacb2.88097" ] ] }, { "id": "6b1d4e8.c42ebb", "type": "ioBroker out", "z": "17c00ccb.376443", "name": "Beleuchtung Küche Esstisch schalten", "topic": "knx.0.Erdgeschoss_Beleuchtung.Küche.Beleuchtung_Küche_Esstisch_schalten", "ack": "false", "autoCreate": "false", "stateName": "", "role": "", "payloadType": "", "readonly": "", "stateUnit": "", "stateMin": "", "stateMax": "", "x": 1150, "y": 280, "wires": [] }, { "id": "effcacb2.88097", "type": "ioBroker out", "z": "17c00ccb.376443", "name": "Beleuchtung Küche Esstisch dimmen relativ", "topic": "knx.0.Erdgeschoss_Beleuchtung.Küche.Beleuchtung_Küche_Esstisch_dimmen_relativ", "ack": "false", "autoCreate": "false", "stateName": "", "role": "", "payloadType": "", "readonly": "", "stateUnit": "", "stateMin": "", "stateMax": "", "x": 1170, "y": 340, "wires": [] }, { "id": "ac5177e8.b4c3c8", "type": "amazon-echo-device", "z": "17c00ccb.376443", "name": "Tischlampe Kueche", "topic": "", "x": 410, "y": 300, "wires": [ [ "793a823a.d4ec7c", "e5924f13.bba9f", "c525be0a.069a" ] ], "icon": "node-red/light.svg" }, { "id": "e5924f13.bba9f", "type": "debug", "z": "17c00ccb.376443", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 530, "y": 460, "wires": [] }, { "id": "50384801.c6aef8", "type": "debug", "z": "17c00ccb.376443", "name": "dimmen", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1140, "y": 460, "wires": [] }, { "id": "5df963ef.9513ec", "type": "function", "z": "17c00ccb.376443", "name": "Funktion AUS", "func": "msg.payload = 0;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 800, "y": 320, "wires": [ [ "6b1d4e8.c42ebb" ] ] }, { "id": "2a2bc042.ec27b", "type": "function", "z": "17c00ccb.376443", "name": "Funktion EIN", "func": "msg.payload = true;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 790, "y": 260, "wires": [ [ "6b1d4e8.c42ebb" ] ] } ]
-
[ { "id": "818cc523.70a218", "type": "switch", "z": "9897550e.b3e51", "name": "msg.on", "property": "on", "propertyType": "msg", "rules": [ { "t": "true" }, { "t": "false" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 680, "y": 320, "wires": [ [ "5bd767bb.40e59" ], [ "88308fac.10f1e8" ] ] }, { "id": "5bd767bb.40e59", "type": "change", "z": "9897550e.b3e51", "name": "true", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "true", "tot": "bool" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 830, "y": 300, "wires": [ [ "8ca29571.90098" ] ] }, { "id": "88308fac.10f1e8", "type": "change", "z": "9897550e.b3e51", "name": "false", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "false", "tot": "bool" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 830, "y": 340, "wires": [ [ "8ca29571.90098" ] ] }, { "id": "3eed8b30.6ddffc", "type": "amazon-echo-device", "z": "9897550e.b3e51", "name": "Licht im Arbeitszimmer", "topic": "", "x": 420, "y": 380, "wires": [ [ "818cc523.70a218", "480ca570.d789b4", "47933284.674bfc" ] ] }, { "id": "de1cbbd9.e03ba", "type": "link in", "z": "9897550e.b3e51", "name": "", "links": [ "ee8bef37.935848" ], "x": 275, "y": 380, "wires": [ [ "3eed8b30.6ddffc" ] ] }, { "id": "480ca570.d789b4", "type": "change", "z": "9897550e.b3e51", "name": "msg.percentage", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "percentage", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 700, "y": 380, "wires": [ [ "aa073208.f337f8" ] ] } ]
-
Danke dafür, was müsste nach dem msg.percentage angehängt werden?
-
@quorle das wurde irgendwie abgeschnitten. Hier jetzt das komplette.
[ { "id": "50ca757a.f0189c", "type": "tab", "label": "Flow 2", "disabled": false, "info": "" }, { "id": "4073d95d.6b27f", "type": "switch", "z": "50ca757a.f0189c", "name": "msg.on", "property": "on", "propertyType": "msg", "rules": [ { "t": "true" }, { "t": "false" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 740, "y": 280, "wires": [ [ "29bc1d6f.4936a2" ], [ "d7e707ee.644a48" ] ] }, { "id": "29bc1d6f.4936a2", "type": "change", "z": "50ca757a.f0189c", "name": "true", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "true", "tot": "bool" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 890, "y": 260, "wires": [ [ "1a0443be.49b954" ] ] }, { "id": "d7e707ee.644a48", "type": "change", "z": "50ca757a.f0189c", "name": "false", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "false", "tot": "bool" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 890, "y": 300, "wires": [ [ "1a0443be.49b954" ] ] }, { "id": "67e388f8.9e106", "type": "amazon-echo-device", "z": "50ca757a.f0189c", "name": "Licht im Arbeitszimmer", "topic": "", "x": 480, "y": 340, "wires": [ [ "4073d95d.6b27f", "a2a7a519.e697d", "c1a4227.22574e" ] ] }, { "id": "883011fe.b28878", "type": "link in", "z": "50ca757a.f0189c", "name": "", "links": [ "ee8bef37.935848" ], "x": 335, "y": 340, "wires": [ [ "67e388f8.9e106" ] ] }, { "id": "a2a7a519.e697d", "type": "change", "z": "50ca757a.f0189c", "name": "msg.percentage", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "percentage", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 760, "y": 340, "wires": [ [ "5751e74.59a9f98" ] ] }, { "id": "1a0443be.49b954", "type": "ioBroker out", "z": "50ca757a.f0189c", "name": "Arbeitszimmer_Licht", "topic": "zigbee.0.14b457fffe40f0da.state", "ack": "false", "autoCreate": "false", "x": 1100, "y": 280, "wires": [] }, { "id": "5751e74.59a9f98", "type": "ioBroker out", "z": "50ca757a.f0189c", "name": "Arbeitszimmer.bri", "topic": "zigbee.0.14b457fffe40f0da.brightness", "ack": "false", "autoCreate": "false", "x": 1090, "y": 340, "wires": [] }, { "id": "c1a4227.22574e", "type": "change", "z": "50ca757a.f0189c", "name": "msg.rgb", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "rgb", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 740, "y": 400, "wires": [ [ "cd161b48.46ae2" ] ] }, { "id": "cd161b48.46ae2", "type": "ioBroker out", "z": "50ca757a.f0189c", "name": "Arbeitszimmer.colortemp", "topic": "zigbee.0.14b457fffe40f0da.colortemp", "ack": "false", "autoCreate": "false", "x": 1110, "y": 400, "wires": [] } ]
Die Prüfung beim msg_on ist auch irgendwie schwachsinnig. Liegt halt daran, dass man bei manchen Geräten unterschiedliche Outputs für off und on hat. Hie rkönntest du das aber demnach einfach durchreichen.
-
@Hc-Yami
Hättest du vielleicht eine Lösung für eine Kommazahl?
Ich würde gerne einem Thermostat z. B. 21,5 Grad sagen, kriege aber nur 21 Grad hin.
Hier mal mein Flow dazu:[ { "id": "dd38aaa4.70c92", "type": "ioBroker out", "z": "f5398f06.034ec8", "name": "Wz_Thermostat:2.SET_TEMPERATURE", "topic": "hm-rpc.0.QEQ12345678.2.SET_TEMPERATURE", "ack": "false", "autoCreate": "false", "stateName": "", "role": "", "stateUnit": "", "stateMin": "", "stateMax": "", "x": 860, "y": 120, "wires": [] }, { "id": "31159ce5.476aa4", "type": "change", "z": "f5398f06.034ec8", "name": "msg.percentage", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "percentage", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 520, "y": 120, "wires": [ [ "dd38aaa4.70c92" ] ] }, { "id": "f7c6ccbf.e6dee8", "type": "amazon-echo-device", "z": "f5398f06.034ec8", "name": "Thermostat", "topic": "", "x": 310, "y": 120, "wires": [ [ "31159ce5.476aa4" ] ] } ]
-
@vepman du könntest nur 21°C sagen und den Wert auf 21,5°C ändern lassen.
Amazon lässt nicht zu "Glühbirnen" 21,5% Helligkeit anzusteuern. -
@Hc-Yami
Habe ich mir fast schon gedacht.
Danke für deine Hilfe.