Switch Fibaro wall plug on/off

Hi all, i am quite new in using Node Red.
I try to build a flow to switch a FIBARO wall plug on/off via a switch node.
The wall plug is working when i switch it on/off via Z-WAVE JS -> binary switch -> target value.
Inside my flow i will receive the following error:
17.9.2023, 12:07:35node: Wohnzimmer Steckdosemsg : error
"Error: Only modes: CCAPI,ValueAPI are allowed through this node type."
But i can't find usefull information about the error.

[
    {
        "id": "534cc7cc1e8eb893",
        "type": "ui_switch",
        "z": "b9b31cf0f070f6c2",
        "name": "Steckdose Wohnzimmer",
        "label": "Steckdose Wohnzimmer",
        "tooltip": "",
        "group": "af4f1a5de982cf71",
        "order": 6,
        "width": 0,
        "height": 0,
        "passthru": false,
        "decouple": "false",
        "topic": "payload",
        "topicType": "msg",
        "style": "",
        "onvalue": "true",
        "onvalueType": "bool",
        "onicon": "",
        "oncolor": "",
        "offvalue": "false",
        "offvalueType": "bool",
        "officon": "",
        "offcolor": "",
        "animate": true,
        "className": "",
        "x": 230,
        "y": 200,
        "wires": [
            [
                "b81d2e2f5e9531e8"
            ]
        ],
        "info": "var g_alarm = msg.payload"
    },
    {
        "id": "7ca7c7c312be5c2a",
        "type": "ui_template",
        "z": "b9b31cf0f070f6c2",
        "group": "af4f1a5de982cf71",
        "name": "Steckdose Wohnzimmer",
        "order": 5,
        "width": 0,
        "height": 0,
        "format": "<div layout=\"row\" layout-align=\"space-between center\" style=\"padding: 0 6px;\">\n    <p>Steckdose Wohnzimmer</p>\n    <font color=\"{{msg.payload ? 'green' : 'red'}}\">\n        {{msg.payload ? 'ein' : 'aus'}}\n    <i class=\"fa fa-square\" aria-hidden=\"true\"></i>\n    </font>\n</div>",
        "storeOutMessages": true,
        "fwdInMessages": true,
        "resendOnRefresh": true,
        "templateScope": "local",
        "className": "",
        "x": 1030,
        "y": 200,
        "wires": [
            []
        ]
    },
    {
        "id": "b81d2e2f5e9531e8",
        "type": "zwave-device",
        "z": "b9b31cf0f070f6c2",
        "networkIdentifier": 1,
        "name": "Wohnzimmer Steckdose",
        "filteredNodeId": "2",
        "multicast": false,
        "datamode": "Send/Receive",
        "messagesPerMS": 1,
        "messageInterval": 250,
        "isolated": true,
        "outputs": 1,
        "inputs": 1,
        "showStatus": true,
        "x": 670,
        "y": 200,
        "wires": [
            [
                "7ca7c7c312be5c2a"
            ]
        ]
    },
    {
        "id": "d372f27556593d08",
        "type": "inject",
        "z": "b9b31cf0f070f6c2",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 170,
        "y": 260,
        "wires": [
            [
                "b81d2e2f5e9531e8"
            ]
        ]
    },
    {
        "id": "fcce5d57fced75f6",
        "type": "inject",
        "z": "b9b31cf0f070f6c2",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "false",
        "payloadType": "bool",
        "x": 170,
        "y": 300,
        "wires": [
            [
                "b81d2e2f5e9531e8"
            ]
        ]
    },
    {
        "id": "af4f1a5de982cf71",
        "type": "ui_group",
        "name": "Überwachung",
        "tab": "24c6f17501e9810b",
        "order": 3,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "24c6f17501e9810b",
        "type": "ui_tab",
        "name": "Räume",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    }
]

Hi @barnyundmax - Welcome to the forums.

You are not sending a valid Command to the Device.

You are sending a boolean - nothing more, but devices have various Zwave Data Types, so you must tell the device what data type (or Command Class in Zwave Terms) that this boolean value relates to.

Therefore, if you want to turn a Binary switch value off, you need to.

  • Tell the device this is for a Binary Switch (remember devices have various types)
  • Give it the value.

Sending this to the device - will turn it on (using a function node).

You can also use the CMD Factory Node - but if new to Node RED, this might be a little daunting

let ValueID = {
      "commandClass": 37 /* 37 -   Binary Switch */
      "endpoint": 0, /* A Device can have multiple Binary Switches */
      "property": "targetValue",
}
let Message = {
    "payload": {
        "mode": "ValueAPI",
        "method": "setValue",
        "params": [ValueID,true]
    }
}
return Message

Example I have a siren that has a Binary switch and a Colour Switch, so when I send it a value - I need to address what property this value belongs - that's the job of the ValueID

See here:

Also Note:
The Side Bar has a message log - that will print the commands being sent via the side bar - so you can copy and paste and reuse in the flow

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.