[
    {
        "id": "c88923ef7194371e",
        "type": "tab",
        "label": "X-Keys backlights test",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "61a76167fdf0d8f8",
        "type": "xkeys_backlight",
        "z": "c88923ef7194371e",
        "newname": "Any X-keys Backlight all",
        "name": "",
        "device": "Any X-keys",
        "productid": "",
        "pid_list": "[]",
        "unit_id": "",
        "duplicate_id": "",
        "control_id": "",
        "flashing": "false",
        "buttonState": true,
        "hue_channels": "ff00ff",
        "x": 810,
        "y": 140,
        "wires": []
    },
    {
        "id": "0fe89669f08f4531",
        "type": "xkeys_button",
        "z": "c88923ef7194371e",
        "newname": "Any X-keys Button",
        "name": "",
        "device": "Any X-keys",
        "productid": "",
        "pid_list": "[]",
        "unit_id": "",
        "duplicate_id": "",
        "button_id": "",
        "presstype": "all",
        "x": 270,
        "y": 280,
        "wires": [
            [
                "c2f3aa1563085c4b"
            ]
        ]
    },
    {
        "id": "54033e3b7ea2b9a2",
        "type": "inject",
        "z": "c88923ef7194371e",
        "name": "Start backlights red",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"action\": \"start\", \"hue_channels\": \"ff0000\"}",
        "payloadType": "json",
        "x": 510,
        "y": 140,
        "wires": [
            [
                "61a76167fdf0d8f8"
            ]
        ]
    },
    {
        "id": "09c0713063eb8a9b",
        "type": "inject",
        "z": "c88923ef7194371e",
        "name": "Stop Backlights",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"action\":\"stop\"}",
        "payloadType": "json",
        "x": 520,
        "y": 200,
        "wires": [
            [
                "61a76167fdf0d8f8"
            ]
        ]
    },
    {
        "id": "0f19a02419dad17f",
        "type": "xkeys_intensity",
        "z": "c88923ef7194371e",
        "newname": "Any X-keys Intensity 255,255",
        "name": "",
        "device": "Any X-keys",
        "productid": "",
        "pid_list": "[]",
        "unit_id": "",
        "duplicate_id": "",
        "blue_intensity": "255",
        "red_intensity": "255",
        "intensity": "[255,255]",
        "x": 820,
        "y": 360,
        "wires": []
    },
    {
        "id": "c2f3aa1563085c4b",
        "type": "function",
        "z": "c88923ef7194371e",
        "name": "Button to Backlight",
        "func": "var pid_list = [];\npid_list.push(msg.payload.product_id);\nif (msg.payload.action == 1) {\n    msg.payload[\"pid_list\"] = pid_list;\n    // Enable the red channel\n    msg.payload[\"hue_channels\"] = \"ff0000\";\n    msg.payload.action = \"start\";\n}\nif (msg.payload.action == 0) {\n    msg.payload[\"pid_list\"] = pid_list;\n    //Enable the blue channel\n    msg.payload[\"hue_channels\"] = \"0000ff\";\n    msg.payload.action = \"start\";\n}\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 510,
        "y": 280,
        "wires": [
            [
                "e5fd2e286d6e1ce7"
            ]
        ]
    },
    {
        "id": "d95d8991edba1ae1",
        "type": "inject",
        "z": "c88923ef7194371e",
        "name": "Start backlights blue",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"action\": \"start\", \"hue_channels\": \"0000ff\"}",
        "payloadType": "json",
        "x": 510,
        "y": 100,
        "wires": [
            [
                "61a76167fdf0d8f8"
            ]
        ]
    },
    {
        "id": "2f2aba54e6516d19",
        "type": "inject",
        "z": "c88923ef7194371e",
        "name": "Start backlights",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"action\": \"start\"}",
        "payloadType": "json",
        "x": 520,
        "y": 60,
        "wires": [
            [
                "61a76167fdf0d8f8"
            ]
        ]
    },
    {
        "id": "e5fd2e286d6e1ce7",
        "type": "xkeys_backlight",
        "z": "c88923ef7194371e",
        "newname": "Any X-keys Backlight all",
        "name": "",
        "device": "Any X-keys",
        "productid": "",
        "pid_list": "[]",
        "unit_id": "",
        "duplicate_id": "",
        "control_id": "",
        "flashing": "false",
        "buttonState": true,
        "hue_channels": "",
        "x": 810,
        "y": 280,
        "wires": []
    }
]