Zigbee.[something] Commands Reference?

Commands like zigbee.readAttribute and zigbee.command are encouraged. What the documentation means is don’t use the legacy "raw ..." command. I’d add other legacy commands like "st rattr ..." and "st wattr" to that list of commands to avoid using.

This should be documented but in the meantime here is the source:

	def onOffRefresh(){
		readAttribute(ONOFF_CLUSTER, 0x0000)
	}

	def levelRefresh(){
		readAttribute(LEVEL_CONTROL_CLUSTER, 0x0000)
	}

	def hueSaturationRefresh(){
		readAttribute(COLOR_CONTROL_CLUSTER, 0x0000) + readAttribute(COLOR_CONTROL_CLUSTER, 0x0001)
	}

	def colorTemperatureRefresh() {
		readAttribute(COLOR_CONTROL_CLUSTER, 0x0007)
	}

	def electricMeasurementPowerRefresh() {
		readAttribute(ELECTRICAL_MEASUREMENT_CLUSTER, 0x050B)
	}

	def simpleMeteringPowerRefresh() {
		readAttribute(SIMPLE_METERING_CLUSTER, 0x0400)
	}

	def onOffConfig(minReportTime=0, maxReportTime=600) {
		configureReporting(ONOFF_CLUSTER, 0x0000, DataType.BOOLEAN, minReportTime, maxReportTime, null)
	}

	def levelConfig(minReportTime=1, maxReportTime=3600, reportableChange=0x01) {
		configureReporting(LEVEL_CONTROL_CLUSTER, 0x0000, DataType.UINT8, minReportTime, maxReportTime, reportableChange)
	}

	def simpleMeteringPowerConfig(minReportTime=1, maxReportTime=600, reportableChange=0x05) {
		configureReporting(SIMPLE_METERING_CLUSTER, 0x0400, DataType.INT24, minReportTime, maxReportTime, reportableChange)
	}

	def electricMeasurementPowerConfig(minReportTime=1, maxReportTime=600, reportableChange=0x0005) {
		configureReporting(ELECTRICAL_MEASUREMENT_CLUSTER, 0x050B, DataType.INT16, minReportTime, maxReportTime, reportableChange)
	}

	def colorTemperatureConfig(minReportTime=1, maxReportTime=3600, reportableChange=0x10) {
		configureReporting(COLOR_CONTROL_CLUSTER, 0x0007, DataType.UINT16, minReportTime, maxReportTime, reportableChange)
	}

	def batteryConfig(minReportTime=30, maxReportTime=21600, reportableChange=0x01) {
		configureReporting(POWER_CONFIGURATION_CLUSTER, 0x0020, DataType.UINT8, minReportTime, maxReportTime, reportableChange)
	}

	def temperatureConfig(minReportTime=30, maxReportTime=3600, reportableChange=0x0064) {
		configureReporting(TEMPERATURE_MEASUREMENT_CLUSTER, 0x0000, DataType.INT16, minReportTime, maxReportTime, reportableChange)
	}

	def iasZoneConfig(minReportTime=0, maxReportTime=SECONDS_IN_HOUR) {
		enrollResponse() +
			configureReporting(IAS_ZONE_CLUSTER, ATTRIBUTE_IAS_ZONE_STATUS, DataType.BITMAP16, minReportTime, maxReportTime, null) +
			configureReporting(IAS_ZONE_CLUSTER, ATTRIBUTE_IAS_ZONE_CIE_ADDRESS, DataType.IEEE_ADDRESS, minReportTime, maxReportTime, null)
	}
5 Likes