Incorporated into wiki proper

Michael Ingraham 2019-11-12 16:20:47 -05:00
parent ca0ede3fe8
commit 86e7c88f39
1 changed files with 0 additions and 83 deletions

@ -1,84 +1 @@
Sandbox for wiki commands
<a id="tb-zigbee">Command|Parameters
-|-
ZigbeePermitJoin<a id="ZigbeePermitJoin"></a>|Sets new device pairing mode<BR>`0` = disable pairing<BR>`1` = enable pairing for 60 seconds<BR>`99` = enable pairing until device reboot<BR><ul>:warning: Leaving your Zigbee network pairing open to join will allow any Zigbee device to connect and retrieve your network encryption key. This can lead to a compromise of your Zigbee network. :warning:</ul>
ZigbeeProbe<a id="ZigbeeProbe"></a>|Probe a Zigbee device to get additional information including its IEEEaddress, vendor and model names, endpoints, and supported clusters per endpoint.<BR>`<shortaddr>` (e.g., `0x1234`)<BR>A device probe is performed automatically when a new Zigbee device connects.<BR>A probe may be needed after a Tasmota reboot.<BR>Battery powered Zigbee devices can generally not be probed because they are in sleep mode most of the time.
ZigbeeRead<a id="ZigbeeRead"></a>|Read Zigbee device attributes<BR>`{ "Device":"<shortaddr>", "Endpoint":"<endpoint>", "Cluster":"<cluster>", "Read":[<attrlist>] }`<BR>&emsp;`<shortaddr>` the short address of the Zigbee device on the network.<BR>&emsp;`<endpoint>` the target endpoint on the device _**(see below how to know the correct endpoint)**_<BR>&emsp;`<cluster>` the cluster number of the attributes<BR>&emsp;`<attrlist>` requested attributes array<BR><BR>Ex: `ZigbeeRead { "device":"0x69CF", "endpoint":"0x03", "cluster":"0x0006", "read":["0x0000"] }`
ZigbeeReset<a id="ZigbeeReset"></a>|`1` = perform a factory reset and reconfiguration of the CC2530 chip.<BR>:warning: You will need to re-pair all Zigbee devices:warning:
ZigbeeSend<a id="ZigbeeSend"></a>|`{ "Device":"<shortaddr>", "Endpoint":"<endpoint>", "Send":{"<sendcmd>":<sendparam>} }`<BR>&emsp;`<shortaddr>` the short address of the Zigbee device on the network.<BR>&emsp;`<endpoint>` the target endpoint on the device (see below how to know the correct endpoint)<BR>&emsp;`"<sendcmd>":<sendparam>` the actual command and parameters to send (see below)<BR>Note: Use [`ZigbeeZCLSend`](#ZigbeeZCLSend) to send a raw form message<BR><BR>Ex: `ZigbeeSend { "Device":"0x1234", "Endpoint":"0x03", "Send":{"Power":"on"} }`
ZigbeeStatus\<x><a id="ZigbeeStatus"></a>|Display Zigbee devices seen on the network since boot<BR>`<device>` (optional) = device number (enumerated beginning with 1)<BR>` ` = all devices<BR>This command provides three levels of increasing detail according to `<x>`<BR>`ZigbeeStatus1` Display Short Address, and Friendly Name<BR>`ZigbeeStatus2` Include Manufacturer ID and Model ID<BR>`ZigbeeStatus3` Include a list of endpoints and the clusterIds supported by each endpoint<BR>Ex: `ZigbeeStatus3 1` requests all details for device number 1<BR><BR>The information requested may exceed the maximum result size allowed by Tasmota. In this case, the output will be truncated. To get all of the desired information, request results for a specific device individually.
**Low level commands**
ZigbeeZCLSend<a id="ZigbeeZCLSend"></a>|**Do not use unless you know exactly what you are doing.**<BR>Send a raw ZCL message to a Zigbee device. This is a low-level command, and requires to manually build the ZCL parameters. Most common usage will be provided as high-level functions.
#### ZigbeeSend
**How to know the target device endpoint for a command**
If the device was successfully probed (at pairing time or using `ZigbeeProbe`), you can use the `ZigbeeStatus2` command to see all the endpoints and ZCL clusters supported.
Ex, for OSRAM Zigbee plug:
```{"Device":"0x69CF","IEEEAddr":"0000000000000000","ModelId":"Plug 01","Manufacturer":"OSRAM","Endpoints":{"0x03":{"ProfileId":"0xC05E","ProfileIdName":"ZigBee Light Link","ClustersIn":["0x1000","0x0000","0x0003","0x0004","0x0005","0x0006","0x0B04","0xFC0F"],"ClustersOut":["0x0019"]}}}```
The message above shows that the device supports only one endpoint `0x03` which accepts messages (`ClustersIn`) for clusters `"0x1000","0x0000","0x0003","0x0004","0x0005","0x0006","0x0B04","0xFC0F"`.
If probing was successful, Tasmota will automatically find the right endpoint. However, if the device was not probed, you need to specificy the endpoint. It is always better to explicitly add the endpoint number if you know it.
Ex:
Device|Endpoint
-|-
OSRAM Plug|`0x03`
Philips Hue Bulb|`0x0B`
**Supported Zigbee Commands**
Send=<cmd>|Parameters|Cluster
-|-|-
Power|`1\|true\|"true"\|"on"`: On<BR>`0\|false\|"false"\|"off"`: Off<BR>`2\|"Toggle"`: Toggle|0x0006
Dimmer|`0..254`: Dimmer value<BR>255 is normally considered as invalid, and may be converted to 254|0x0008
Dimmer+|`null`: no parameter. Increases dimmer by 10%|0x0008
Dimmer-|`null`: no parameter. Decreases dimmer by 10%|0x0008
DimmerStop|`null`: no parameter. Stops any running increase of decrease of dimmer.|0x0008
ResetAlarm|`<alarmcode>,<clusterid>`: (to be documented later)|0x0009
ResetAllAlarms|`null`: no parameter, (to be documented later)|0x0009
Hue|`0..254`: change Hue value|0x0300
Sat|`0..254`: change Sat value|0x0300
HueSat|`0..254,0..254`: change both Hue and Sat values|0x0300
Color|`0..65534,0..65534`: change the color using [x,y] coordinates|0x0300
CT|`0..65534`: change the white color-temperature in Mireds|0x0300
Shutter|`0..254`: send any Shutter command (prefer the commands below)|0x0102
ShutterOpen|`null`: no parameter, open shutter|0x0102
ShutterClose|`null`: no parameter, close shutter|0x0102
ShutterStop|`null`: no parameter, stop shutter movement|0x0102
ShutterLift|`0..100`: move shutter to a specific position in percent<BR>`0`%=open, `100`%=closed|0x0102
ShutterTilt|`0..100`: move the shutter to the specific tilt position in percent|0x0102
Examples:
**OSRAM Plug**
```
ZigbeeSend { "device":"0x69CF", "endpoint":"0x03", "send":{"Power":"On"} }
ZigbeeSend { "device":"0x69CF", "endpoint":"0x03", "send":{"Power":1} }
ZigbeeSend { "device":"0x69CF", "endpoint":"0x03", "send":{"Power":false} }
ZigbeeSend { "device":"0x69CF", "endpoint":"0x03", "send":{"Power":"Toggle"} }
```
Read the On/Off status: (all three commands below are synonyms)
```
ZigbeeRead { "device":"0x69CF", "endpoint":"0x03", "cluster":"0x0006", "read":"0x0000" }
ZigbeeRead { "device":"0x69CF", "endpoint":"0x03", "cluster":"0x0006", "read":["0x0000"] }
ZigbeeRead { "device":"0x69CF", "endpoint":3, "cluster":6, "read":0 }
```
**Philips Hue bulb**
```
ZigbeeSend { "device":"0x3D82", "endpoint":"0x0B", "send":{"Power":"Off"} }
ZigbeeSend { "device":"0x3D82", "endpoint":"0x0B", "send":{"Dimmer":128} }
ZigbeeSend { "device":"0x3D82", "endpoint":"0x0B", "send":{"Dimmer":254} }
ZigbeeSend { "device":"0x3D82", "endpoint":"0x0B", "send":{"Dimmer":0} }
```