node-red-contrib-huemagic icon indicating copy to clipboard operation
node-red-contrib-huemagic copied to clipboard

Universal mode of group node not working

Open aL1aL7 opened this issue 3 years ago • 5 comments

Describe the bug There are 2 issues with universal mode: a) sending group ID (ID for API version 2) as msg.topic and msg.payload = true || false to group node in universal mode works at the first shot - doing it again results in an error of the group node "No group ID defined" Sending the message a third time to the group node --> group node is working as expected Sending the message a fourth time to the group node --> group node is not working

b) Group node in universal mode doesn't create any output messages - according to the docs, the group nodes should create output messages for every status messages of the same type

Flow to Reproduce

[
    {
        "id": "71643ee79f0c90ad",
        "type": "tab",
        "label": "Hue-Test",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "f075c6e7150bb7d9",
        "type": "hue-group",
        "z": "71643ee79f0c90ad",
        "name": "UNIVERSAL GROUP MODE",
        "bridge": "dea3c250.dbc968",
        "groupid": "",
        "skipevents": false,
        "initevents": false,
        "x": 710,
        "y": 80,
        "wires": [
            [
                "7577787d699f731e"
            ]
        ]
    },
    {
        "id": "db2fb2b06cdf9f40",
        "type": "function",
        "z": "71643ee79f0c90ad",
        "name": "ON FNC",
        "func": "msg.topic = \"e5c8e65b-c669-4035-847a-450c199f3302\";\nmsg.payload = true;\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 360,
        "y": 60,
        "wires": [
            [
                "f075c6e7150bb7d9"
            ]
        ]
    },
    {
        "id": "e82159ecdb57d0e4",
        "type": "function",
        "z": "71643ee79f0c90ad",
        "name": "OFF FNC",
        "func": "msg.topic = \"e5c8e65b-c669-4035-847a-450c199f3302\";\nmsg.payload= false;\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 360,
        "y": 120,
        "wires": [
            [
                "f075c6e7150bb7d9"
            ]
        ]
    },
    {
        "id": "a02c18a193fdb95b",
        "type": "inject",
        "z": "71643ee79f0c90ad",
        "name": "INJECT-BUTTON",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 160,
        "y": 60,
        "wires": [
            [
                "db2fb2b06cdf9f40"
            ]
        ]
    },
    {
        "id": "8475d7a8a44de8a5",
        "type": "inject",
        "z": "71643ee79f0c90ad",
        "name": "INJECT BUTTON",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 160,
        "y": 120,
        "wires": [
            [
                "e82159ecdb57d0e4"
            ]
        ]
    },
    {
        "id": "7577787d699f731e",
        "type": "debug",
        "z": "71643ee79f0c90ad",
        "name": "FULL MESSAGE",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 1030,
        "y": 80,
        "wires": []
    },
    {
        "id": "dea3c250.dbc968",
        "type": "hue-bridge",
        "name": "hue-bridge01",
        "bridge": "192.168.2.49",
        "key": "B6iyXcKu22q346FYBKn38kvN2Knh8GIXR9OW8zyf",
        "worker": "10",
        "disableupdates": false
    }
]

Expected behavior a) every message with ID as string at msg.topic should work in universal group mode b) group node receives and outputs all status messages of the same type in universal mode

Screenshots If applicable, add screenshots to help explain your problem. Screenshot_20220129_143536

Please complete the following information:

  • Node-RED version: [2.1.6]
  • NodeJS version: [14.18.3]
  • Device running Node-RED: [...]

Additional context Add any other context about the problem here.

aL1aL7 avatar Jan 29 '22 13:01 aL1aL7

Can confirm the bug - same behavior here.

MBombeck avatar Feb 01 '22 14:02 MBombeck

I can also confirm this.

ralfhille avatar Feb 08 '22 17:02 ralfhille

same with light in universal modus

ralfhille avatar Feb 08 '22 20:02 ralfhille

I can also confirm the bug - similar behaviour. Sometimes group node doesn't work for a number of inputs. Sometimes it seems to work every other input. I also see "No group ID defined" error messages.

jacobdeane avatar Feb 15 '22 21:02 jacobdeane

I also confirm this bug

mkatanski avatar Feb 27 '22 20:02 mkatanski