Is it possible to programmatically send Zigbee commands in an automated way using the dashboard cards, scripts, automation, node red, or similar add-ons?
I’m using Z2M which can already do this manually through its dev console, but it’s manual and I’m not sure how to access it from anywhere other than inside Z2M.
My goal is to use HA in an automated way to reproduce Zigbee cluster commands that I can sniff on my network.
Example Message - Key Parameters
Note that I don’t know if Profile
is needed and I don’t know the correct variable names for the rest.
{
"DestinationEndpoint": "1",
"Cluster": "0x0006",
"Profile": "0x0104", //unsure if needed
"Command": "0x02",
"Attribute": "0x4003",
"StartupOnOff": "0xff"
}
Example Message - Sniffed from Wireshark with nRF52840
ZigBee Application Support Layer Data, Dst Endpt: 1, Src Endpt: 64
Frame Control Field: Data (0x00)
.... ..00 = Frame Type: Data (0x0)
.... 00.. = Delivery Mode: Unicast (0x0)
..0. .... = Security: False
.0.. .... = Acknowledgement Request: False
0... .... = Extended Header: False
Destination Endpoint: 1
Cluster: Level Control (0x0008)
Profile: Home Automation (0x0104)
Source Endpoint: 64
Counter: 160
ZigBee Cluster Library Frame, Command: Write Attributes, Seq: 29
Frame Control Field: Profile-wide (0x00)
.... ..00 = Frame Type: Profile-wide (0x0)
.... .0.. = Manufacturer Specific: False
.... 0... = Direction: Client to Server
...0 .... = Disable Default Response: False
Sequence Number: 29
Command: Write Attributes (0x02)
Attribute Field
Attribute: Startup Level (0x4000)
Data Type: 8-Bit Unsigned Integer (0x20)
Startup Level: Set the CurrentLevel attribute to its previous value (0xff)
I’ve tried to send this command using the Node Red Pallete
:node-red-contrib-zigbee2mqtt 2.6.4 but I can’t figure out how to add the cluster and command information.