8-Tasten Hue Dimmschalter mit Node-Red

Hallo homee-Fans,

vorab schon jetzt vielen Dank für Eure Verbesserungsvorschläge.

Die Idee:
Ein Hue-Dimmschalter mit 8 Tasten, welche im homee als Auslöser für Homeegramme verwendet werden könne. Vier Tasten sollen sich so verhalten wie bei dem normalen Hue-Dimmschalter und vier weitere wenn die jeweilige Taste lange gedrückt wird.

Die Ausgangssituation:
Im homee unterstützt der Hue-Dimmschalter standardmäßig ja leider nur die Information ob eine Taste gedrückt oder losgelassen wurde. In Node-Red liefert node-red-contrib-huemagic zusätzlich a.A. auch die Information ob eine Taste lange gedrückt wurde.

Das Vorhaben:
Erstellung eines Flows der einen echten Hue-Dimmschalter, angebunden über eine Hue-Bridge und in Node-Red mit Huemagic eingebunden, mittels node-red-contrib-homee als virtueller 8-Tasten Schalter per homee-in-homee in den homee einbindet.

Das Ergebnis:


Taste 1. 2. 3 und 4 sind die ganz normalen Tasten. Taste 11, 12, 13 und 14 sind die selben Tasten, wenn lange gedrückt.

Als Basis für meinen Flow habe ich das Beispiel wallmote_iobroker_hue_dimmschalter von Micha2536 verwendet (ist das der @Micha ? falls ja, vielen Dank!).

Hier mein Flow:

[
    {
        "id": "cb51b872.be9528",
        "type": "homeeDevice",
        "z": "fbae2920.e11b18",
        "virtual-homee": "",
        "name": "Schalter Küche",
        "nodeId": "38",
        "showNodeId": true,
        "profile": "26",
        "icon": "",
        "attributes": "[{\"id\":481,\"node_id\":38,\"instance\":1,\"minimum\":1,\"maximum\":2,\"current_value\":2,\"target_value\":2,\"last_value\":1,\"unit\":\"n%2Fa\",\"step_value\":1,\"editable\":0,\"type\":40,\"state\":1,\"last_changed\":1573065520,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":1,\"data\":\"\"},{\"id\":482,\"node_id\":38,\"instance\":2,\"minimum\":1,\"maximum\":2,\"current_value\":2,\"target_value\":2,\"last_value\":1,\"unit\":\"n%2Fa\",\"step_value\":1,\"editable\":0,\"type\":40,\"state\":1,\"last_changed\":1573065520,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":1,\"data\":\"\"},{\"id\":483,\"node_id\":38,\"instance\":3,\"minimum\":1,\"maximum\":2,\"current_value\":2,\"target_value\":2,\"last_value\":1,\"unit\":\"n%2Fa\",\"step_value\":1,\"editable\":0,\"type\":40,\"state\":1,\"last_changed\":1573065520,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":1,\"data\":\"\"},{\"id\":484,\"node_id\":38,\"instance\":4,\"minimum\":1,\"maximum\":2,\"current_value\":2,\"target_value\":2,\"last_value\":1,\"unit\":\"n%2Fa\",\"step_value\":1,\"editable\":0,\"type\":40,\"state\":1,\"last_changed\":1573065520,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":1,\"data\":\"\"},{\"id\":485,\"node_id\":38,\"instance\":11,\"minimum\":1,\"maximum\":2,\"current_value\":2,\"target_value\":2,\"last_value\":1,\"unit\":\"n%2Fa\",\"step_value\":1,\"editable\":0,\"type\":40,\"state\":1,\"last_changed\":1573065520,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":1,\"data\":\"\"},{\"id\":486,\"node_id\":38,\"instance\":12,\"minimum\":1,\"maximum\":2,\"current_value\":2,\"target_value\":2,\"last_value\":1,\"unit\":\"n%2Fa\",\"step_value\":1,\"editable\":0,\"type\":40,\"state\":1,\"last_changed\":1573065520,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":1,\"data\":\"\"},{\"id\":487,\"node_id\":38,\"instance\":13,\"minimum\":1,\"maximum\":2,\"current_value\":2,\"target_value\":2,\"last_value\":1,\"unit\":\"n%2Fa\",\"step_value\":1,\"editable\":0,\"type\":40,\"state\":1,\"last_changed\":1573065520,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":1,\"data\":\"\"},{\"id\":488,\"node_id\":38,\"instance\":14,\"minimum\":1,\"maximum\":2,\"current_value\":2,\"target_value\":2,\"last_value\":1,\"unit\":\"n%2Fa\",\"step_value\":1,\"editable\":0,\"type\":40,\"state\":1,\"last_changed\":1573065520,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":1,\"data\":\"\"},{\"id\":489,\"node_id\":38,\"instance\":0,\"minimum\":0,\"maximum\":100,\"current_value\":100,\"target_value\":100,\"last_value\":100,\"unit\":\"%25\",\"step_value\":1,\"editable\":0,\"type\":8,\"state\":1,\"last_changed\":1573065517,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":1,\"data\":\"\"},{\"id\":490,\"node_id\":38,\"instance\":0,\"minimum\":0,\"maximum\":0,\"current_value\":0,\"target_value\":0,\"last_value\":0,\"unit\":\"text\",\"step_value\":1,\"editable\":0,\"type\":43,\"state\":1,\"last_changed\":1573711842,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":1,\"data\":\"Taste gedrückt -> kurz: 1-4; lang: 11-14\"},{\"id\":491,\"node_id\":38,\"instance\":0,\"minimum\":0,\"maximum\":0,\"current_value\":0,\"target_value\":0,\"last_value\":0,\"unit\":\"text\",\"step_value\":1,\"editable\":0,\"type\":44,\"state\":1,\"last_changed\":1573711842,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":1,\"data\":\"\"},{\"id\":492,\"node_id\":38,\"instance\":0,\"minimum\":0,\"maximum\":0,\"current_value\":0,\"target_value\":0,\"last_value\":0,\"unit\":\"text\",\"step_value\":1,\"editable\":0,\"type\":45,\"state\":1,\"last_changed\":1573065500,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":1,\"data\":\"\"}]",
        "x": 1031,
        "y": 4159,
        "wires": [
            []
        ]
    },
    {
        "id": "49d82f67.abbca",
        "type": "template",
        "z": "fbae2920.e11b18",
        "name": "Button state 1",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":481,\"value\":{{payload}}}}",
        "output": "json",
        "x": 744.125,
        "y": 4102,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "28d8caf4.23b18e",
        "type": "template",
        "z": "fbae2920.e11b18",
        "name": "Button state 2",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":482,\"value\":{{payload}}}}",
        "output": "json",
        "x": 744.125,
        "y": 4134,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "ab66260d.cfcca8",
        "type": "template",
        "z": "fbae2920.e11b18",
        "name": "Button state 3",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":483,\"value\":{{payload}}}}",
        "output": "json",
        "x": 744.125,
        "y": 4166,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "bf7669c.7688718",
        "type": "template",
        "z": "fbae2920.e11b18",
        "name": "Button state 4",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":484,\"value\":{{payload}}}}",
        "output": "json",
        "x": 744.125,
        "y": 4198,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "7aadd9d6.d0f5b8",
        "type": "template",
        "z": "fbae2920.e11b18",
        "name": "Battery level",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":489,\"value\":{{payload}}}}",
        "output": "json",
        "x": 755.125,
        "y": 4013,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "ad7bcd87.8f9198",
        "type": "switch",
        "z": "fbae2920.e11b18",
        "name": "Input",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "1002 ",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "2002",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "3002",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "4002",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "1001",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "2001",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "3001",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "4001",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "1003",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "2003",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "3003",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "4003",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 12,
        "x": 163.65985107421875,
        "y": 4285.685546875,
        "wires": [
            [
                "d1be07c4.081eb",
                "e7e61c1.d050d6"
            ],
            [
                "9e1bc716.7a5278",
                "e7e61c1.d050d6"
            ],
            [
                "afb9222d.b56418",
                "e7e61c1.d050d6"
            ],
            [
                "a5522494.96cc3",
                "e7e61c1.d050d6"
            ],
            [
                "c46c942b.ca3f08"
            ],
            [
                "8e4a9290.49555"
            ],
            [
                "78fe378e.7c9e68"
            ],
            [
                "6fa80c6a.fc6074"
            ],
            [
                "6852c7cb.a356c"
            ],
            [
                "f2da57b7.2eb0f8"
            ],
            [
                "6c8b2fe7.2b2a68"
            ],
            [
                "51ead2a2.96a1ac"
            ]
        ],
        "info": "Just expand the flow.count to how ever many\npresses you want/need."
    },
    {
        "id": "d1be07c4.081eb",
        "type": "change",
        "z": "fbae2920.e11b18",
        "name": "Send: 1 (1002 short released)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 453.4376220703125,
        "y": 4017.35205078125,
        "wires": [
            [
                "49d82f67.abbca"
            ]
        ]
    },
    {
        "id": "e5c53e4d.84065",
        "type": "function",
        "z": "fbae2920.e11b18",
        "name": "return button",
        "func": "\nreturn {payload: msg.payload.button };",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 158.31256103515625,
        "y": 4043.11083984375,
        "wires": [
            [
                "ad7bcd87.8f9198"
            ]
        ]
    },
    {
        "id": "2d42557e.b910e2",
        "type": "hue-switch",
        "z": "fbae2920.e11b18",
        "name": "Schalter Küche",
        "bridge": "11bfbfbc.82419",
        "sensorid": "39",
        "x": 168.00006103515625,
        "y": 3965.314453125,
        "wires": [
            [
                "e5c53e4d.84065",
                "c86db76.a3f9048",
                "1d1613b9.e24b8c",
                "39f7f50e.285362"
            ]
        ]
    },
    {
        "id": "9e1bc716.7a5278",
        "type": "change",
        "z": "fbae2920.e11b18",
        "name": "Send: 1 (2002 short released)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 453.4583740234375,
        "y": 4050.444121360779,
        "wires": [
            [
                "28d8caf4.23b18e"
            ]
        ]
    },
    {
        "id": "afb9222d.b56418",
        "type": "change",
        "z": "fbae2920.e11b18",
        "name": "Send: 1 (3002 short released)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 454.4583511352539,
        "y": 4082.9995889663696,
        "wires": [
            [
                "ab66260d.cfcca8"
            ]
        ]
    },
    {
        "id": "a5522494.96cc3",
        "type": "change",
        "z": "fbae2920.e11b18",
        "name": "Send: 1 (4002 short released)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 454.4584426879883,
        "y": 4114.6658635139465,
        "wires": [
            [
                "bf7669c.7688718"
            ]
        ]
    },
    {
        "id": "c86db76.a3f9048",
        "type": "function",
        "z": "fbae2920.e11b18",
        "name": "return battery level",
        "func": "\nreturn {payload: msg.info.battery };",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 734.9028930664062,
        "y": 3961.4443359375,
        "wires": [
            [
                "7aadd9d6.d0f5b8"
            ]
        ]
    },
    {
        "id": "c46c942b.ca3f08",
        "type": "change",
        "z": "fbae2920.e11b18",
        "name": "Send: 1 (1001 holded)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 424.00011444091797,
        "y": 4147.0001521110535,
        "wires": [
            [
                "7db6940c.fef06c"
            ]
        ]
    },
    {
        "id": "8e4a9290.49555",
        "type": "change",
        "z": "fbae2920.e11b18",
        "name": "Send: 1 (2001 holded)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 424.02086639404297,
        "y": 4179.092222690582,
        "wires": [
            [
                "f75cab0d.ede828"
            ]
        ]
    },
    {
        "id": "78fe378e.7c9e68",
        "type": "change",
        "z": "fbae2920.e11b18",
        "name": "Send: 1 (3001 holded)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 424.0208435058594,
        "y": 4210.647690296173,
        "wires": [
            [
                "76792acf.7cfe9c"
            ]
        ]
    },
    {
        "id": "6fa80c6a.fc6074",
        "type": "change",
        "z": "fbae2920.e11b18",
        "name": "Send: 1 (4001 holded)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 424.02093505859375,
        "y": 4242.31396484375,
        "wires": [
            [
                "ffabc6d0.706e8"
            ]
        ]
    },
    {
        "id": "7db6940c.fef06c",
        "type": "template",
        "z": "fbae2920.e11b18",
        "name": "Button state 11",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":485,\"value\":{{payload}}}}",
        "output": "json",
        "x": 744,
        "y": 4230,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "f75cab0d.ede828",
        "type": "template",
        "z": "fbae2920.e11b18",
        "name": "Button state 12",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":486,\"value\":{{payload}}}}",
        "output": "json",
        "x": 744,
        "y": 4262,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "76792acf.7cfe9c",
        "type": "template",
        "z": "fbae2920.e11b18",
        "name": "Button state 13",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":487,\"value\":{{payload}}}}",
        "output": "json",
        "x": 744,
        "y": 4294,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "ffabc6d0.706e8",
        "type": "template",
        "z": "fbae2920.e11b18",
        "name": "Button state 14",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":488,\"value\":{{payload}}}}",
        "output": "json",
        "x": 744,
        "y": 4326,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "1d1613b9.e24b8c",
        "type": "function",
        "z": "fbae2920.e11b18",
        "name": "return type as firmware",
        "func": "var firmware = msg.info.type;\n\nreturn {\n    payload: {\"attribute\": {\"id\": 491, \"value\": 0, \"data\": firmware}}\n}\n\n\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 725.0000610351562,
        "y": 3928,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "39f7f50e.285362",
        "type": "function",
        "z": "fbae2920.e11b18",
        "name": "return sw-version",
        "func": "var software = msg.info.softwareVersion;\n\nreturn {\n    payload: {\"attribute\": {\"id\": 492, \"value\": 0, \"data\": software}}\n}\n\n\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 735,
        "y": 3895,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "59fc53ae.8258a4",
        "type": "delay",
        "z": "fbae2920.e11b18",
        "name": "",
        "pauseType": "delay",
        "timeout": "40",
        "timeoutUnits": "milliseconds",
        "rate": "1",
        "nbRateUnits": "",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "x": 552,
        "y": 3985,
        "wires": [
            [
                "49d82f67.abbca",
                "28d8caf4.23b18e",
                "ab66260d.cfcca8",
                "bf7669c.7688718"
            ]
        ]
    },
    {
        "id": "6852c7cb.a356c",
        "type": "change",
        "z": "fbae2920.e11b18",
        "name": "Send: 2 (1001 long released)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "2",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 442.9999809265137,
        "y": 4274.000019073486,
        "wires": [
            [
                "7db6940c.fef06c"
            ]
        ]
    },
    {
        "id": "f2da57b7.2eb0f8",
        "type": "change",
        "z": "fbae2920.e11b18",
        "name": "Send: 2 (2001 long released)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "2",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 443.0207328796387,
        "y": 4306.092089653015,
        "wires": [
            [
                "f75cab0d.ede828"
            ]
        ]
    },
    {
        "id": "6c8b2fe7.2b2a68",
        "type": "change",
        "z": "fbae2920.e11b18",
        "name": "Send: 2 (3001 long released)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "2",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 443.0207099914551,
        "y": 4337.647557258606,
        "wires": [
            [
                "76792acf.7cfe9c"
            ]
        ]
    },
    {
        "id": "51ead2a2.96a1ac",
        "type": "change",
        "z": "fbae2920.e11b18",
        "name": "Send: 2 (4001 long released)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "2",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 443.02080154418945,
        "y": 4369.313831806183,
        "wires": [
            [
                "ffabc6d0.706e8"
            ]
        ]
    },
    {
        "id": "e7e61c1.d050d6",
        "type": "change",
        "z": "fbae2920.e11b18",
        "name": "Send: 2  reset",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "2",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 394,
        "y": 3985,
        "wires": [
            [
                "59fc53ae.8258a4"
            ]
        ]
    },
    {
        "id": "11bfbfbc.82419",
        "type": "hue-bridge",
        "z": "",
        "name": "Philips hue",
        "bridge": "192.168.178.5",
        "key": "geheim",
        "interval": "3000"
    }
]

Grundsätzlich funktioniert der Flow soweit ganz gut. Ich kann über einfachen Tastendruck und über langen Tastendruck meine Homeegramme individuell ansprechen.
Ein paar kleinigkeiten gefallen mir allerdings nicht ganz so sehr.
Der Flow recht groß geraten (ja, ich bin kein Entwickler) und ich hätte für den Reset der ersten vier Tasten lieber eine andere Lösung. Wird eine Taste lange gedrückt, gibt es beim Loslassen durch Huemagic die Information, dass eine lange gedrückte Taste jetzt losgelassen wurde. Dies bietet die Möglichkeit den Wert der gedrückten Taste von 1 auf 2 zurück zu setzen und genau so habe ich es auch umgesetzt. Für einfaches Drücken liefert Huemagic leider nur die Information, dass eine kurz gedrückte Taste wieder losgelassen worden ist. Ja, ich weiß, es gibt auch einen Wert für „Taste gedrückt“, aber in der Praxis kann ich die Taste 30x drücken und nur ein bis zwei Mal wird dieser Wert übermittelt und deshalb eignet er sich nicht als zuverlässiger Auslöser.
Falls einer von Euch hier Verbesserungsvorschläge und Ideen hat, immer gerne her damit.

1 „Gefällt mir“

Ja ertappt :see_no_evil::+1:
Bei der Wallmote ist das Verhalten anders als bei den hue Dimmschaltern.

Ich kann mir die Sache gerne mal anschauen und sehen was sich da verkürzen lässt.
Werde mal einen Dimmschalter anlernen und Testen.

2 „Gefällt mir“

Vielen Dank!
So viel anders verhält sich der über ioBroker eingebundene Wallmote gar nicht. Es sieht aber so aus als wenn das ioBroker Objekt bei gedrückter Taste den Wert 2 liefert (dies ist auch über den homee Adapter für den Dimmschalter der Fall), aber die homee-node in Node-Red für gedrückt eine 1 verlangt und zudem den Wert bei losgelassener Taste nicht selbstständig wieder auch 2 zurück setzt.

Hallo zusammen,

ich habe hier den Flow von @danfuh bei mir eingebunden. Den Taster habe ich auch sauber in Homee einbinden können. Aber die Schaltzustände werden irgendwie nicht übergeben. Ich habe den Flow hier einmal einkopiert:

[
    {
        "id": "4ead76bc41de9ac2",
        "type": "tab",
        "label": "Dimmschalter",
        "disabled": false,
        "info": ""
    },
    {
        "id": "f70b600b.ada3c",
        "type": "hue-buttons",
        "z": "4ead76bc41de9ac2",
        "name": "Schlafzimmer",
        "bridge": "585fa553.01ee0c",
        "sensorid": "c19f365f-8e34-42b1-9b59-313b98f7e2d3",
        "skipevents": false,
        "initevents": false,
        "x": 140,
        "y": 160,
        "wires": [
            [
                "e5c53e4d.84065",
                "39f7f50e.285362",
                "1d1613b9.e24b8c",
                "c86db76.a3f9048"
            ]
        ]
    },
    {
        "id": "cb51b872.be9528",
        "type": "homeeDevice",
        "z": "4ead76bc41de9ac2",
        "virtual-homee": "",
        "name": "Taster Schlafzimmer",
        "nodeId": "40",
        "showNodeId": true,
        "profile": "26",
        "icon": "",
        "attributes": [
            {
                "instance": 1,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 1,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 40,
                "state": 1,
                "last_changed": 1573065520,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "id": "481",
                "node_id": "40"
            },
            {
                "instance": 2,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 1,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 40,
                "state": 1,
                "last_changed": 1573065520,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "id": "482",
                "node_id": "40"
            },
            {
                "instance": 3,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 1,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 40,
                "state": 1,
                "last_changed": 1573065520,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "id": "483",
                "node_id": "40"
            },
            {
                "instance": 4,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 1,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 40,
                "state": 1,
                "last_changed": 1573065520,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "id": "484",
                "node_id": "40"
            },
            {
                "instance": 11,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 1,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 40,
                "state": 1,
                "last_changed": 1573065520,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "id": "485",
                "node_id": "40"
            },
            {
                "instance": 12,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 1,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 40,
                "state": 1,
                "last_changed": 1573065520,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "id": "486",
                "node_id": "40"
            },
            {
                "instance": 13,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 1,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 40,
                "state": 1,
                "last_changed": 1573065520,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "id": "487",
                "node_id": "40"
            },
            {
                "instance": 14,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 1,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 40,
                "state": 1,
                "last_changed": 1573065520,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "id": "488",
                "node_id": "40"
            },
            {
                "instance": 0,
                "minimum": 0,
                "maximum": 100,
                "current_value": 100,
                "target_value": 100,
                "last_value": 100,
                "unit": "%25",
                "step_value": 1,
                "editable": 0,
                "type": 8,
                "state": 1,
                "last_changed": 1573065517,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "id": "489",
                "node_id": "40"
            },
            {
                "instance": 0,
                "minimum": 0,
                "maximum": 0,
                "current_value": 0,
                "target_value": 0,
                "last_value": 0,
                "unit": "text",
                "step_value": 1,
                "editable": 0,
                "type": 43,
                "state": 1,
                "last_changed": 1573711842,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "Taste gedrückt -> kurz: 1-4; lang: 11-14",
                "id": "490",
                "node_id": "40"
            },
            {
                "instance": 0,
                "minimum": 0,
                "maximum": 0,
                "current_value": 0,
                "target_value": 0,
                "last_value": 0,
                "unit": "text",
                "step_value": 1,
                "editable": 0,
                "type": 44,
                "state": 1,
                "last_changed": 1573711842,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "id": "491",
                "node_id": "40"
            },
            {
                "instance": 0,
                "minimum": 0,
                "maximum": 0,
                "current_value": 0,
                "target_value": 0,
                "last_value": 0,
                "unit": "text",
                "step_value": 1,
                "editable": 0,
                "type": 45,
                "state": 1,
                "last_changed": 1573065500,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "id": "492",
                "node_id": "40"
            }
        ],
        "statusTemplate": "",
        "x": 1070,
        "y": 460,
        "wires": [
            []
        ]
    },
    {
        "id": "49d82f67.abbca",
        "type": "template",
        "z": "4ead76bc41de9ac2",
        "name": "Button state 1",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":481,\"value\":{{payload}}}}",
        "output": "json",
        "x": 773.125,
        "y": 403,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "28d8caf4.23b18e",
        "type": "template",
        "z": "4ead76bc41de9ac2",
        "name": "Button state 2",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":482,\"value\":{{payload}}}}",
        "output": "json",
        "x": 773.125,
        "y": 435,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "ab66260d.cfcca8",
        "type": "template",
        "z": "4ead76bc41de9ac2",
        "name": "Button state 3",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":483,\"value\":{{payload}}}}",
        "output": "json",
        "x": 773.125,
        "y": 467,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "bf7669c.7688718",
        "type": "template",
        "z": "4ead76bc41de9ac2",
        "name": "Button state 4",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":484,\"value\":{{payload}}}}",
        "output": "json",
        "x": 773.125,
        "y": 499,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "7aadd9d6.d0f5b8",
        "type": "template",
        "z": "4ead76bc41de9ac2",
        "name": "Battery level",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":489,\"value\":{{payload}}}}",
        "output": "json",
        "x": 784.125,
        "y": 314,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "ad7bcd87.8f9198",
        "type": "switch",
        "z": "4ead76bc41de9ac2",
        "name": "Input",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "1002 ",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "2002",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "3002",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "4002",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "1001",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "2001",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "3001",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "4001",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "1003",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "2003",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "3003",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "4003",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 12,
        "x": 192.65985107421875,
        "y": 586.685546875,
        "wires": [
            [
                "d1be07c4.081eb",
                "e7e61c1.d050d6"
            ],
            [
                "9e1bc716.7a5278",
                "e7e61c1.d050d6"
            ],
            [
                "afb9222d.b56418",
                "e7e61c1.d050d6"
            ],
            [
                "a5522494.96cc3",
                "e7e61c1.d050d6"
            ],
            [
                "c46c942b.ca3f08"
            ],
            [
                "8e4a9290.49555"
            ],
            [
                "78fe378e.7c9e68"
            ],
            [
                "6fa80c6a.fc6074"
            ],
            [
                "6852c7cb.a356c"
            ],
            [
                "f2da57b7.2eb0f8"
            ],
            [
                "6c8b2fe7.2b2a68"
            ],
            [
                "51ead2a2.96a1ac"
            ]
        ],
        "info": "Just expand the flow.count to how ever many\npresses you want/need."
    },
    {
        "id": "d1be07c4.081eb",
        "type": "change",
        "z": "4ead76bc41de9ac2",
        "name": "Send: 1 (1002 short released)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 482.4376220703125,
        "y": 318.35205078125,
        "wires": [
            [
                "49d82f67.abbca"
            ]
        ]
    },
    {
        "id": "e5c53e4d.84065",
        "type": "function",
        "z": "4ead76bc41de9ac2",
        "name": "return button",
        "func": "\nreturn {payload: msg.payload.button };",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 187.31256103515625,
        "y": 344.11083984375,
        "wires": [
            [
                "ad7bcd87.8f9198"
            ]
        ]
    },
    {
        "id": "9e1bc716.7a5278",
        "type": "change",
        "z": "4ead76bc41de9ac2",
        "name": "Send: 1 (2002 short released)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 482.4583740234375,
        "y": 351.4441213607788,
        "wires": [
            [
                "28d8caf4.23b18e"
            ]
        ]
    },
    {
        "id": "afb9222d.b56418",
        "type": "change",
        "z": "4ead76bc41de9ac2",
        "name": "Send: 1 (3002 short released)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 483.4583511352539,
        "y": 383.99958896636963,
        "wires": [
            [
                "ab66260d.cfcca8"
            ]
        ]
    },
    {
        "id": "a5522494.96cc3",
        "type": "change",
        "z": "4ead76bc41de9ac2",
        "name": "Send: 1 (4002 short released)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 483.4584426879883,
        "y": 415.66586351394653,
        "wires": [
            [
                "bf7669c.7688718"
            ]
        ]
    },
    {
        "id": "c86db76.a3f9048",
        "type": "function",
        "z": "4ead76bc41de9ac2",
        "name": "return battery level",
        "func": "\nreturn {payload: msg.info.battery };",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 763.9028930664062,
        "y": 262.4443359375,
        "wires": [
            [
                "7aadd9d6.d0f5b8"
            ]
        ]
    },
    {
        "id": "c46c942b.ca3f08",
        "type": "change",
        "z": "4ead76bc41de9ac2",
        "name": "Send: 1 (1001 holded)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 453.00011444091797,
        "y": 448.00015211105347,
        "wires": [
            [
                "7db6940c.fef06c"
            ]
        ]
    },
    {
        "id": "8e4a9290.49555",
        "type": "change",
        "z": "4ead76bc41de9ac2",
        "name": "Send: 1 (2001 holded)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 453.02086639404297,
        "y": 480.0922226905823,
        "wires": [
            [
                "f75cab0d.ede828"
            ]
        ]
    },
    {
        "id": "78fe378e.7c9e68",
        "type": "change",
        "z": "4ead76bc41de9ac2",
        "name": "Send: 1 (3001 holded)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 453.0208435058594,
        "y": 511.6476902961731,
        "wires": [
            [
                "76792acf.7cfe9c"
            ]
        ]
    },
    {
        "id": "6fa80c6a.fc6074",
        "type": "change",
        "z": "4ead76bc41de9ac2",
        "name": "Send: 1 (4001 holded)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 453.02093505859375,
        "y": 543.31396484375,
        "wires": [
            [
                "ffabc6d0.706e8"
            ]
        ]
    },
    {
        "id": "7db6940c.fef06c",
        "type": "template",
        "z": "4ead76bc41de9ac2",
        "name": "Button state 11",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":485,\"value\":{{payload}}}}",
        "output": "json",
        "x": 773,
        "y": 531,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "f75cab0d.ede828",
        "type": "template",
        "z": "4ead76bc41de9ac2",
        "name": "Button state 12",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":486,\"value\":{{payload}}}}",
        "output": "json",
        "x": 773,
        "y": 563,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "76792acf.7cfe9c",
        "type": "template",
        "z": "4ead76bc41de9ac2",
        "name": "Button state 13",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":487,\"value\":{{payload}}}}",
        "output": "json",
        "x": 773,
        "y": 595,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "ffabc6d0.706e8",
        "type": "template",
        "z": "4ead76bc41de9ac2",
        "name": "Button state 14",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "{\"attribute\":{\"id\":488,\"value\":{{payload}}}}",
        "output": "json",
        "x": 773,
        "y": 627,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "1d1613b9.e24b8c",
        "type": "function",
        "z": "4ead76bc41de9ac2",
        "name": "return type as firmware",
        "func": "var firmware = msg.info.type;\n\nreturn {\n    payload: {\"attribute\": {\"id\": 491, \"value\": 0, \"data\": firmware}}\n}\n\n\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 754.0000610351562,
        "y": 229,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "39f7f50e.285362",
        "type": "function",
        "z": "4ead76bc41de9ac2",
        "name": "return sw-version",
        "func": "var software = msg.info.softwareVersion;\n\nreturn {\n    payload: {\"attribute\": {\"id\": 492, \"value\": 0, \"data\": software}}\n}\n\n\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 764,
        "y": 196,
        "wires": [
            [
                "cb51b872.be9528"
            ]
        ]
    },
    {
        "id": "59fc53ae.8258a4",
        "type": "delay",
        "z": "4ead76bc41de9ac2",
        "name": "",
        "pauseType": "delay",
        "timeout": "40",
        "timeoutUnits": "milliseconds",
        "rate": "1",
        "nbRateUnits": "",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "x": 530,
        "y": 140,
        "wires": [
            [
                "49d82f67.abbca",
                "28d8caf4.23b18e",
                "ab66260d.cfcca8",
                "bf7669c.7688718"
            ]
        ]
    },
    {
        "id": "6852c7cb.a356c",
        "type": "change",
        "z": "4ead76bc41de9ac2",
        "name": "Send: 2 (1001 long released)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "2",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 471.9999809265137,
        "y": 575.0000190734863,
        "wires": [
            [
                "7db6940c.fef06c"
            ]
        ]
    },
    {
        "id": "f2da57b7.2eb0f8",
        "type": "change",
        "z": "4ead76bc41de9ac2",
        "name": "Send: 2 (2001 long released)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "2",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 472.0207328796387,
        "y": 607.0920896530151,
        "wires": [
            [
                "f75cab0d.ede828"
            ]
        ]
    },
    {
        "id": "6c8b2fe7.2b2a68",
        "type": "change",
        "z": "4ead76bc41de9ac2",
        "name": "Send: 2 (3001 long released)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "2",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 472.0207099914551,
        "y": 638.647557258606,
        "wires": [
            [
                "76792acf.7cfe9c"
            ]
        ]
    },
    {
        "id": "51ead2a2.96a1ac",
        "type": "change",
        "z": "4ead76bc41de9ac2",
        "name": "Send: 2 (4001 long released)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "2",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 472.02080154418945,
        "y": 670.3138318061829,
        "wires": [
            [
                "ffabc6d0.706e8"
            ]
        ]
    },
    {
        "id": "e7e61c1.d050d6",
        "type": "change",
        "z": "4ead76bc41de9ac2",
        "name": "Send: 2  reset",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "2",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 423,
        "y": 286,
        "wires": [
            [
                "59fc53ae.8258a4"
            ]
        ]
    },
    {
        "id": "585fa553.01ee0c",
        "type": "hue-bridge",
        "name": "Philips hue",
        "bridge": "192.168.178.112",
        "key": "geheim",
        "worker": "10",
        "autoupdates": true,
        "disableupdates": false
    }
]

Hat da vielleicht noch jemand eine Idee?

Gruß
Daniel

1 „Gefällt mir“

Ja , durch das Update hat sich der Aufbau des json verändert und deshalb muss das alles angepasst werden.
@Domba hat nen Flow wo ich das mal geändert habe für den normalen Short Klick.
Muss dann nur mal angepasst werden auf den Longpress.

1 „Gefällt mir“

Nicht nur der Aufbau hat sich geändert, es gibt auch noch immer Probleme, wenn man eine homee-Node einbindet, die nicht im eigenen Node-Red konfiguriert worden ist (kann natürlich auch sein, dass das Problem nur bei mir besteht). Dazu einfach alle importierten homee-Nodes läschen, speichern und eigene anlegen. Wichtig wäre auch den mit der importierten Note angelegten homee in der Note vorher zu löschen. Bei mir hatte dies schon zur Folge, dass keine Verbindung zwischen Homee und Node-Red aufgebaut werden konnte.

Habe das mal für die FB zusammengebaut.


[
    {
        "id": "8499f34b.2bfac",
        "type": "hue-buttons",
        "z": "4722aa5b.8cf2ac",
        "name": "Hue dimmer switch 1",
        "bridge": "b2d878b5.8f8568",
        "sensorid": "f9961a63-42d2-4eeb-b6a6-b3bf96e91a82",
        "skipevents": false,
        "initevents": true,
        "x": 180,
        "y": 380,
        "wires": [
            [
                "9bf00ebc.40502"
            ]
        ]
    },
    {
        "id": "9f197f49.bbb6b8",
        "type": "homeeDevice",
        "z": "4722aa5b.8cf2ac",
        "virtual-homee": "",
        "name": "FB",
        "nodeId": "94657",
        "showNodeId": true,
        "profile": "26",
        "icon": "default",
        "attributes": [
            {
                "instance": 1,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 2,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 40,
                "state": 1,
                "last_changed": 1645643789,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "name": "",
                "id": "232",
                "node_id": "94657"
            },
            {
                "instance": 1,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 2,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 310,
                "state": 1,
                "last_changed": 1645643789,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "name": "",
                "id": "233",
                "node_id": "94657"
            },
            {
                "instance": 1,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 2,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 176,
                "state": 1,
                "last_changed": 1645643789,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "name": "",
                "id": "235",
                "node_id": "94657"
            },
            {
                "instance": 2,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 2,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 40,
                "state": 1,
                "last_changed": 1645643789,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "name": "",
                "id": "237",
                "node_id": "94657"
            },
            {
                "instance": 2,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 2,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 310,
                "state": 1,
                "last_changed": 1645643789,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "name": "",
                "id": "239",
                "node_id": "94657"
            },
            {
                "instance": 2,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 2,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 176,
                "state": 1,
                "last_changed": 1645643789,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "name": "",
                "id": "240",
                "node_id": "94657"
            },
            {
                "instance": 3,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 1,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 40,
                "state": 1,
                "last_changed": 1645643789,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "name": "",
                "id": "241",
                "node_id": "94657"
            },
            {
                "instance": 3,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 2,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 310,
                "state": 1,
                "last_changed": 1645643789,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "name": "",
                "id": "242",
                "node_id": "94657"
            },
            {
                "instance": 3,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 2,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 176,
                "state": 1,
                "last_changed": 1645643789,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "name": "",
                "id": "243",
                "node_id": "94657"
            },
            {
                "instance": 4,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 2,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 40,
                "state": 1,
                "last_changed": 1645643789,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "name": "",
                "id": "244",
                "node_id": "94657"
            },
            {
                "instance": 4,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 2,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 310,
                "state": 1,
                "last_changed": 1645643789,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "name": "",
                "id": "245",
                "node_id": "94657"
            },
            {
                "instance": 4,
                "minimum": 1,
                "maximum": 2,
                "current_value": 2,
                "target_value": 2,
                "last_value": 2,
                "unit": "n%2Fa",
                "step_value": 1,
                "editable": 0,
                "type": 176,
                "state": 1,
                "last_changed": 1645643789,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "data": "",
                "name": "",
                "id": "246",
                "node_id": "94657"
            }
        ],
        "statusTemplate": "",
        "x": 1010,
        "y": 380,
        "wires": [
            []
        ]
    },
    {
        "id": "b3e7c53c.cca3a8",
        "type": "comment",
        "z": "4722aa5b.8cf2ac",
        "name": "232 , 234, 235 Taster 1",
        "info": "",
        "x": 500,
        "y": 320,
        "wires": []
    },
    {
        "id": "9bf00ebc.40502",
        "type": "function",
        "z": "4722aa5b.8cf2ac",
        "name": "",
        "func": "var b = msg.payload.button;\nvar a = msg.payload.action;\n\nif (b === 1){\n    if(a === \"short_release\"){\n        node.send({\n            payload:{\n                attribute:{\n                    \"id\":232,\n                    \"value\":1\n                }\n                \n            }\n            \n        })\n        \n    }\n   else if(a === \"repeat\"){\n        node.send([null,{\n            payload:{\n                attribute:{\n                    \"id\":233,\n                    \"value\":1\n                }\n                \n            }\n            \n        }])\n    }\n    else if(a === \"long_release\"){\n        node.send({\n            payload:{\n                attribute:{\n                    \"id\":235,\n                    \"value\":1\n                }\n                \n            }\n            \n        });\n        node.send({\n            payload:{\n                attribute:{\n                    \"id\":233,\n                    \"value\":2\n                }\n                \n            }\n            \n        })\n    }\n}\nelse if (b === 2){\n    if(a === \"short_release\"){\n        node.send({\n            payload:{\n                attribute:{\n                    \"id\":237,\n                    \"value\":1\n                }\n                \n            }\n            \n        })\n        \n    }\n   else if(a === \"repeat\"){\n        node.send([null,{\n            payload:{\n                attribute:{\n                    \"id\":239,\n                    \"value\":1\n                }\n                \n            }\n            \n        }])\n    }\n    else if(a === \"long_release\"){\n        node.send({\n            payload:{\n                attribute:{\n                    \"id\":240,\n                    \"value\":1\n                }\n                \n            }\n            \n        });\n        node.send({\n            payload:{\n                attribute:{\n                    \"id\":239,\n                    \"value\":2\n                }\n                \n            }\n            \n        })\n    }\n}\nelse if (b === 3){\n    if(a === \"short_release\"){\n        node.send({\n            payload:{\n                attribute:{\n                    \"id\":241,\n                    \"value\":1\n                }\n                \n            }\n            \n        })\n        \n    }\n   else if(a === \"repeat\"){\n        node.send([null,{\n            payload:{\n                attribute:{\n                    \"id\":242,\n                    \"value\":1\n                }\n                \n            }\n            \n        }])\n    }\n    else if(a === \"long_release\"){\n        node.send({\n            payload:{\n                attribute:{\n                    \"id\":243,\n                    \"value\":1\n                }\n                \n            }\n            \n        });\n        node.send({\n            payload:{\n                attribute:{\n                    \"id\":242,\n                    \"value\":2\n                }\n                \n            }\n            \n        })\n    }\n}\nelse if (b === 4){\n    if(a === \"short_release\"){\n        node.send({\n            payload:{\n                attribute:{\n                    \"id\":244,\n                    \"value\":1\n                }\n                \n            }\n            \n        })\n        \n    }\n   else if(a === \"repeat\"){\n        node.send([null,{\n            payload:{\n                attribute:{\n                    \"id\":245,\n                    \"value\":1\n                }\n                \n            }\n            \n        }])\n    }\n    else if(a === \"long_release\"){\n        node.send({\n            payload:{\n                attribute:{\n                    \"id\":246,\n                    \"value\":1\n                }\n                \n            }\n            \n        });\n        node.send({\n            payload:{\n                attribute:{\n                    \"id\":245,\n                    \"value\":2\n                }\n                \n            }\n            \n        })\n    }\n}",
        "outputs": 2,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 380,
        "y": 380,
        "wires": [
            [
                "11e9ed56.fa0793",
                "c8b94d54.621e6"
            ],
            [
                "c8b94d54.621e6"
            ]
        ]
    },
    {
        "id": "11e9ed56.fa0793",
        "type": "delay",
        "z": "4722aa5b.8cf2ac",
        "name": "",
        "pauseType": "delay",
        "timeout": "500",
        "timeoutUnits": "milliseconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "x": 560,
        "y": 380,
        "wires": [
            [
                "866a110a.3068b8"
            ]
        ]
    },
    {
        "id": "866a110a.3068b8",
        "type": "function",
        "z": "4722aa5b.8cf2ac",
        "name": "",
        "func": "msg.payload.attribute.value = 2;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 740,
        "y": 380,
        "wires": [
            [
                "c8b94d54.621e6"
            ]
        ]
    },
    {
        "id": "c8b94d54.621e6",
        "type": "rbe",
        "z": "4722aa5b.8cf2ac",
        "name": "",
        "func": "rbe",
        "gap": "",
        "start": "",
        "inout": "out",
        "septopics": true,
        "property": "payload",
        "x": 870,
        "y": 380,
        "wires": [
            [
                "9f197f49.bbb6b8"
            ]
        ]
    },
    {
        "id": "5d270b77.7d488c",
        "type": "comment",
        "z": "4722aa5b.8cf2ac",
        "name": "237, 239, 240 Taster 2",
        "info": "",
        "x": 700,
        "y": 320,
        "wires": []
    },
    {
        "id": "cba765b.8530098",
        "type": "comment",
        "z": "4722aa5b.8cf2ac",
        "name": "241, 242, 243 Taster 3",
        "info": "",
        "x": 500,
        "y": 280,
        "wires": []
    },
    {
        "id": "f2a1b150.7c9778",
        "type": "comment",
        "z": "4722aa5b.8cf2ac",
        "name": "244, 245, 246 Taster 4",
        "info": "",
        "x": 700,
        "y": 280,
        "wires": []
    },
    {
        "id": "b2d878b5.8f8568",
        "type": "hue-bridge",
        "name": "Philips hue",
        "bridge": "",
        "key": "",
        "worker": "10",
        "autoupdates": true,
        "disableupdates": false
    }
]

Damit könnt Ihr alle drei Zustände jedes einzelnen Tasters nutzen.

Viel Spass damit

3 „Gefällt mir“

Was @Micha da gebaut hast, ist schon ziemlich genial, muss ich sagen. Vielen Dank! Funktioniert völlig problemlos. Alle Tasterzustände werden an Homee weitergegeben. Wenn ich jetzt noch ein Homeegramm hinbekommen würde, welches eine Lampe bei einem langem Klick dimmt, wäre ich vollends glücklich :upside_down_face:

1 „Gefällt mir“

Das ist eigentlich recht einfach.

:stuck_out_tongue_winking_eye: für dich offenbar - toll, danke nochmal! Soweit reicht mein logisches denken nicht :sweat_smile: