Aeotec LED Strip

Nun bin ich dazu gekommen und habe den Aeon mal mit nem Modusschalter versehen.

[
    {
        "id": "ba34b1fa.a4d58",
        "type": "homeeDevice",
        "z": "76b6d694.226ff8",
        "virtual-homee": "",
        "name": "Aeon Modus Switch",
        "nodeId": "145",
        "showNodeId": true,
        "profile": "1004",
        "icon": "default",
        "attributes": [
            {
                "type": 1,
                "state": 1,
                "instance": 0,
                "minimum": 0,
                "maximum": 1,
                "current_value": 0,
                "target_value": 0,
                "last_value": 0,
                "data": "",
                "name": "",
                "unit": "",
                "step_value": 1,
                "editable": 1,
                "last_changed": 1618602109,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "options": [],
                "id": 145,
                "node_id": 145
            },
            {
                "type": 1,
                "state": 1,
                "instance": 1,
                "minimum": 0,
                "maximum": 1,
                "current_value": 0,
                "target_value": 0,
                "last_value": 0,
                "data": "",
                "name": "",
                "unit": "",
                "step_value": 1,
                "editable": 1,
                "last_changed": 1618602111,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "options": [],
                "id": 146,
                "node_id": 145
            },
            {
                "type": 1,
                "state": 1,
                "instance": 2,
                "minimum": 0,
                "maximum": 1,
                "current_value": 0,
                "target_value": 0,
                "last_value": 0,
                "data": "",
                "name": "",
                "unit": "",
                "step_value": 1,
                "editable": 1,
                "last_changed": 1618602112,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "options": [],
                "id": 147,
                "node_id": 145
            },
            {
                "type": 1,
                "state": 1,
                "instance": 3,
                "minimum": 0,
                "maximum": 1,
                "current_value": 0,
                "target_value": 0,
                "last_value": 0,
                "data": "",
                "name": "",
                "unit": "",
                "step_value": 1,
                "editable": 1,
                "last_changed": 1618602114,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "options": [],
                "id": 148,
                "node_id": 145
            },
            {
                "type": 1,
                "state": 1,
                "instance": 4,
                "minimum": 0,
                "maximum": 1,
                "current_value": 0,
                "target_value": 0,
                "last_value": 0,
                "data": "",
                "name": "",
                "unit": "",
                "step_value": 1,
                "editable": 1,
                "last_changed": 1618603848,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "options": [],
                "id": 149,
                "node_id": 145
            },
            {
                "type": 2,
                "state": 1,
                "instance": 0,
                "minimum": 0,
                "maximum": 2147483647,
                "current_value": 0,
                "target_value": 0,
                "last_value": 0,
                "data": "",
                "name": "",
                "unit": "",
                "step_value": 1,
                "editable": 1,
                "last_changed": 1618603869,
                "changed_by": 1,
                "changed_by_id": 0,
                "based_on": 1,
                "options": [],
                "id": 150,
                "node_id": 145
            }
        ],
        "statusTemplate": "",
        "x": 330,
        "y": 1580,
        "wires": [
            [
                "e7554237.21386"
            ]
        ]
    },
    {
        "id": "e7554237.21386",
        "type": "function",
        "z": "76b6d694.226ff8",
        "name": "",
        "func": "if (msg.payload.attributeId == 145){\n    if (msg.payload.targetValue == 1){\n        return [\n            {payload: \"PUT:nodes/908?configure=1&parameter=40&byte_size=1&value=1\"},\n             {payload:{\n                 attributes:[\n                     {id:146,value:0},\n                     {id:147,value:0},\n                     {id:148,value:0},\n                     {id:149,value:0}\n                ]\n             }\n            }\n        ]\n    }\n    else if (msg.payload.targetValue == 0){\n        return {\n        payload: \"put:nodes/908/attributes/2376?target_value=0\"\n        }\n    }\n}\nelse if (msg.payload.attributeId == 146){\n    if (msg.payload.targetValue == 1){\n         return [\n            {payload: \"PUT:nodes/908?configure=1&parameter=40&byte_size=1&value=2\"},\n             {payload:{\n                 attributes:[\n                     {id:145,value:0},\n                     {id:147,value:0},\n                     {id:148,value:0},\n                     {id:149,value:0}\n                ]\n             }\n            }\n        ]\n    }\n    else if (msg.payload.targetValue == 0){\n        return {\n            payload: \"put:nodes/908/attributes/2376?target_value=0\"\n        }\n    }\n}\nelse if (msg.payload.attributeId == 147){\n    if (msg.payload.targetValue == 1){\n        return [\n            {payload: \"PUT:nodes/908?configure=1&parameter=40&byte_size=1&value=3\"},\n             {payload:{\n                 attributes:[\n                     {id:146,value:0},\n                     {id:145,value:0},\n                     {id:148,value:0},\n                     {id:149,value:0}\n                ]\n             }\n            }\n        ]\n    }\n    else if (msg.payload.targetValue == 0){\n        return {\n            payload: \"put:nodes/908/attributes/2376?target_value=0\"\n        }\n    }\n}\nelse if (msg.payload.attributeId == 148){\n    if (msg.payload.targetValue == 1){\n        return [\n            {payload: \"PUT:nodes/908?configure=1&parameter=40&byte_size=1&value=4\"},\n             {payload:{\n                 attributes:[\n                     {id:146,value:0},\n                     {id:147,value:0},\n                     {id:145,value:0},\n                     {id:149,value:0}\n                ]\n             }\n            }\n        ]\n    }\n    else if (msg.payload.targetValue == 0){\n        return {\n            payload: \"put:nodes/908/attributes/2376?target_value=0\"\n        }\n    }\n}\nelse if (msg.payload.attributeId == 149){\n    if (msg.payload.targetValue == 1){\n         return [\n            {payload: \"PUT:nodes/908?configure=1&parameter=40&byte_size=1&value=5\"},\n             {payload:{\n                 attributes:[\n                     {id:146,value:0},\n                     {id:147,value:0},\n                     {id:148,value:0},\n                     {id:145,value:0}\n                ]\n             }\n            }\n        ]\n    }\n    else if (msg.payload.targetValue == 0){\n        return {\n            payload: \"put:nodes/908/attributes/2376?target_value=0\"\n        }\n    }\n}\nelse if (msg.payload.attributeId == 150){\n    if (msg.payload.targetValue > 1){\n        return {\n            payload: \"PUT:nodes/908?configure=1&parameter=39&byte_size=4&value=\"+msg.payload.targetValue\n        }\n    }\n    else if (msg.payload.targetValue == 0){\n        return {\n            payload: \"put:nodes/908/attributes/2376?target_value=0\"\n        }\n    }\n}",
        "outputs": 2,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 560,
        "y": 1580,
        "wires": [
            [
                "9c76c109.81e58"
            ],
            [
                "ba34b1fa.a4d58"
            ]
        ]
    },
    {
        "id": "9c76c109.81e58",
        "type": "link out",
        "z": "76b6d694.226ff8",
        "name": "",
        "links": [
            "e204158a.3c9808"
        ],
        "x": 685,
        "y": 1580,
        "wires": []
    },
    {
        "id": "ddb2f60d.860f88",
        "type": "comment",
        "z": "76b6d694.226ff8",
        "name": "Link zum homee Node",
        "info": "",
        "x": 820,
        "y": 1580,
        "wires": []
    }
]