Zigbee-Steckdose und CuxD birektional verbinden

Node-RED als CCU3/RaspberryMatic Addon, WebApp, HomeKit, ...

Moderator: Co-Administratoren

Antworten
beetle-fan
Beiträge: 9
Registriert: 20.10.2022, 19:19
System: CCU
Hat sich bedankt: 1 Mal

Zigbee-Steckdose und CuxD birektional verbinden

Beitrag von beetle-fan » 16.11.2022, 14:53

Hallo zusammen,

ich habe hier eine Zigbee Steckdose, die ich erfolgreich mit einem entsprechenden CuxD verbunden habe.
Ich kann also die Steckdose in der CCU3 steuern bzw. in Programmen berücksichtigen.
Hier der entsprechende Flow:

Code: Alles auswählen

[
    {
        "id": "8b28fbb4.81e1c8",
        "type": "ccu-value",
        "z": "d4cb59e7.43fcc8",
        "name": "",
        "iface": "CUxD",
        "channel": "CUX2801008:1 Zigbee_Steckdose_1:1",
        "datapoint": "STATE",
        "mode": "",
        "start": true,
        "change": true,
        "cache": false,
        "queue": false,
        "on": 0,
        "onType": "undefined",
        "ramp": 0,
        "rampType": "undefined",
        "working": false,
        "ccuConfig": "38263145.35ea0e",
        "topic": "${CCU}/${Interface}/${channel}/${datapoint}",
        "x": 160,
        "y": 420,
        "wires": [
            [
                "7eb67564.338b6c"
            ]
        ]
    },
    {
        "id": "3f705d33.f16a42",
        "type": "zigbee-converter",
        "z": "d4cb59e7.43fcc8",
        "shepherd": "cf6657ee.37f0d8",
        "name": "",
        "topic": "zigbee/${name}",
        "settopic": "zigbee/${name}/set",
        "gettopic": "zigbee/${name}/get",
        "device": "0x842e14fffe5ace2d",
        "attribute": "",
        "payload": "json",
        "x": 780,
        "y": 420,
        "wires": [
            [
                "34065c32.704254"
            ]
        ]
    },
    {
        "id": "34065c32.704254",
        "type": "debug",
        "z": "d4cb59e7.43fcc8",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 990,
        "y": 420,
        "wires": []
    },
    {
        "id": "7eb67564.338b6c",
        "type": "change",
        "z": "d4cb59e7.43fcc8",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "zigbee/${name}/set",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 460,
        "y": 420,
        "wires": [
            [
                "3f705d33.f16a42"
            ]
        ]
    },
    {
        "id": "38263145.35ea0e",
        "type": "ccu-connection",
        "name": "localhost",
        "host": "localhost",
        "regaEnabled": true,
        "bcrfEnabled": true,
        "iprfEnabled": true,
        "virtEnabled": true,
        "bcwiEnabled": false,
        "cuxdEnabled": true,
        "regaPoll": true,
        "regaInterval": "30",
        "rpcPingTimeout": "60",
        "rpcInitAddress": "127.0.0.1",
        "rpcServerHost": "127.0.0.1",
        "rpcBinPort": "2047",
        "rpcXmlPort": "2048",
        "tls": false,
        "inSecure": false,
        "authentication": false,
        "username": "",
        "password": "",
        "queueTimeout": "5000",
        "queuePause": "250",
        "contextStore": ""
    },
    {
        "id": "cf6657ee.37f0d8",
        "type": "zigbee-shepherd",
        "name": "zigbee_stick",
        "path": "/dev/ttyACM0",
        "baudRate": "115200",
        "rtscts": true,
        "channelList": [
            11
        ],
        "led": "enabled",
        "adapter": "zstack"
    }
]
Was nicht funktioniert: wenn ich an der Steckdose selbst schalte, wird der Status nicht in der CCU angezeigt.
Wie kann ich das umsetzen? Hab schon 2-3 Sachen ausprobiert, bin aber leider überfragt :?

Danke Euch!

Gruß, Johannes

Kasi13
Beiträge: 9
Registriert: 29.10.2022, 00:19
System: CCU
Hat sich bedankt: 14 Mal
Danksagung erhalten: 1 Mal

Re: Zigbee-Steckdose und CuxD birektional verbinden

Beitrag von Kasi13 » 17.11.2022, 11:38

Hallo ich habe auch viel gebastelt, und habe es so gelöst.
Event
Dateianhänge
Screenshot 2022-11-17 113413.jpg
Screenshot 2022-11-17 113723.jpg

beetle-fan
Beiträge: 9
Registriert: 20.10.2022, 19:19
System: CCU
Hat sich bedankt: 1 Mal

Re: Zigbee-Steckdose und CuxD birektional verbinden

Beitrag von beetle-fan » 20.11.2022, 09:49

Cool, magst du mal den Code hier rein kopieren? Dann verstehe ich es besser.
Danke!

Kasi13
Beiträge: 9
Registriert: 29.10.2022, 00:19
System: CCU
Hat sich bedankt: 14 Mal
Danksagung erhalten: 1 Mal

Re: Zigbee-Steckdose und CuxD birektional verbinden

Beitrag von Kasi13 » 20.11.2022, 19:26

Code: Alles auswählen

[
    {
        "id": "c6d0cdb4.b3bc4",
        "type": "tab",
        "label": "Steckdosen",
        "disabled": false,
        "info": ""
    },
    {
        "id": "44df268a.9b0f9",
        "type": "ccu-value",
        "z": "c6d0cdb4.b3bc4",
        "name": "",
        "iface": "CUxD",
        "channel": "CUX2801001:1 Steckdose_0:1",
        "datapoint": "STATE",
        "mode": "",
        "start": true,
        "change": true,
        "cache": false,
        "queue": false,
        "on": 0,
        "onType": "undefined",
        "ramp": 0,
        "rampType": "undefined",
        "working": false,
        "ccuConfig": "38263145.35ea0e",
        "topic": "${CCU}/${Interface}/${channel}/${datapoint}",
        "x": 100,
        "y": 60,
        "wires": [
            [
                "a47bcdeb.e86cb"
            ]
        ]
    },
    {
        "id": "b1f478c9.973c",
        "type": "zigbee-command",
        "z": "c6d0cdb4.b3bc4",
        "shepherd": "c01aed59.8ea5b8",
        "name": "command",
        "target": "endpoint",
        "cmdType": "command",
        "group": "",
        "ieeeAddr": "0xa4c138cb2889e64d Steckdose_TS011F",
        "ep": "1",
        "cid": "genOnOff",
        "cmd": "on",
        "zclData": "{\"state\" : \"on\"}",
        "zclDataType": "json",
        "attributesRead": "[]",
        "attributesReadType": "json",
        "attributesWrite": "{}",
        "attributesWriteType": "json",
        "manufSpec": 0,
        "disableDefaultRsp": 0,
        "x": 580,
        "y": 40,
        "wires": [
            []
        ]
    },
    {
        "id": "32c314a1.4814dc",
        "type": "zigbee-command",
        "z": "c6d0cdb4.b3bc4",
        "shepherd": "c01aed59.8ea5b8",
        "name": "command",
        "target": "endpoint",
        "cmdType": "command",
        "group": "",
        "ieeeAddr": "0xa4c138cb2889e64d Steckdose_TS011F",
        "ep": "1",
        "cid": "genOnOff",
        "cmd": "off",
        "zclData": "{\"state\" : \"off\"}",
        "zclDataType": "json",
        "attributesRead": "[]",
        "attributesReadType": "json",
        "attributesWrite": "{}",
        "attributesWriteType": "json",
        "manufSpec": 0,
        "disableDefaultRsp": 0,
        "x": 580,
        "y": 100,
        "wires": [
            []
        ]
    },
    {
        "id": "a47bcdeb.e86cb",
        "type": "switch",
        "z": "c6d0cdb4.b3bc4",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "true",
                "vt": "jsonata"
            },
            {
                "t": "eq",
                "v": "false",
                "vt": "jsonata"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 310,
        "y": 60,
        "wires": [
            [
                "b1f478c9.973c"
            ],
            [
                "32c314a1.4814dc"
            ]
        ]
    },
    {
        "id": "a30fa29a.4c6bd",
        "type": "zigbee-event",
        "z": "c6d0cdb4.b3bc4",
        "shepherd": "c01aed59.8ea5b8",
        "name": "Steckdose",
        "device": "0xa4c138cb2889e64d",
        "events": [
            "attributeReport",
            "command"
        ],
        "topic": "zigbee/${ieeeAddr}/${type}/${endpoint}/${cluster}/${attribute}",
        "payload": "json",
        "x": 80,
        "y": 160,
        "wires": [
            [
                "77d59532.46c474"
            ]
        ]
    },
    {
        "id": "4373df30.0e3c98",
        "type": "change",
        "z": "c6d0cdb4.b3bc4",
        "name": "SET_STATE CUxD",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "payload.onOff",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 370,
        "y": 160,
        "wires": [
            [
                "c905fe3.1218b"
            ]
        ]
    },
    {
        "id": "c905fe3.1218b",
        "type": "ccu-value",
        "z": "c6d0cdb4.b3bc4",
        "name": "",
        "iface": "CUxD",
        "channel": "CUX2801001:1 Steckdose_0:1",
        "datapoint": "SET_STATE",
        "mode": "",
        "start": true,
        "change": true,
        "cache": false,
        "queue": true,
        "on": 0,
        "onType": "undefined",
        "ramp": 0,
        "rampType": "undefined",
        "working": false,
        "ccuConfig": "38263145.35ea0e",
        "topic": "${CCU}/${Interface}/${channel}/${datapoint}",
        "x": 570,
        "y": 160,
        "wires": [
            []
        ]
    },
    {
        "id": "77d59532.46c474",
        "type": "rbe",
        "z": "c6d0cdb4.b3bc4",
        "name": "",
        "func": "rbe",
        "gap": "",
        "start": "",
        "inout": "out",
        "septopics": true,
        "property": "payload",
        "x": 210,
        "y": 160,
        "wires": [
            [
                "4373df30.0e3c98"
            ]
        ]
    },
    {
        "id": "38263145.35ea0e",
        "type": "ccu-connection",
        "name": "localhost",
        "host": "localhost",
        "regaEnabled": true,
        "bcrfEnabled": true,
        "iprfEnabled": true,
        "virtEnabled": true,
        "bcwiEnabled": false,
        "cuxdEnabled": true,
        "regaPoll": true,
        "regaInterval": "30",
        "rpcPingTimeout": "60",
        "rpcInitAddress": "127.0.0.1",
        "rpcServerHost": "127.0.0.1",
        "rpcBinPort": "2047",
        "rpcXmlPort": "2048",
        "tls": false,
        "inSecure": false,
        "authentication": false,
        "username": "",
        "password": "",
        "queueTimeout": "5000",
        "queuePause": "250",
        "contextStore": ""
    },
    {
        "id": "c01aed59.8ea5b8",
        "type": "zigbee-shepherd",
        "name": "zigbee herdsman",
        "path": "/dev/ttyACM0",
        "baudRate": "115200",
        "rtscts": false,
        "channelList": [
            25
        ],
        "led": "disabled",
        "adapter": "zstack"
    }
]
Zuletzt geändert von Kasi13 am 20.11.2022, 19:48, insgesamt 3-mal geändert.

Benutzeravatar
shartelt
Beiträge: 7421
Registriert: 14.01.2015, 14:59
System: Alternative CCU (auf Basis OCCU)
Hat sich bedankt: 524 Mal
Danksagung erhalten: 752 Mal

Re: Zigbee-Steckdose und CuxD birektional verbinden

Beitrag von shartelt » 20.11.2022, 19:28

code tags wären so etwas tolles…

Kasi13
Beiträge: 9
Registriert: 29.10.2022, 00:19
System: CCU
Hat sich bedankt: 14 Mal
Danksagung erhalten: 1 Mal

Re: Zigbee-Steckdose und CuxD birektional verbinden

Beitrag von Kasi13 » 20.11.2022, 19:30

ich hoffe ich habe das so richtig gemacht ;-) sieht ja ein bisschen viel aus

Antworten

Zurück zu „RedMatic“