Floundering with basic Zigbee dual output control

I have a simple ZIgbee board that has two logical outputs. One at endpoint 1, the other at endpoint 2.

I've been struggling for days trying to get control of the outputs. I finally stumbled upon code that can control endpoint 2 only but I'm far away from understanding it or being able to read the status.
I've looked at over 6 different Zigbee device drivers and various documentation. It seems to me there are multiple approaches but I can't get a handle on a basic approach.

If anyone has a few lines of zigbee code showing the basics or direct me to a guide of some sort I would really appreciate it.


// v00
metadata {
	// Automatically generated. Make future change here.
	definition (name: "ZigbeeTest", namespace: "johnrob", author: "johnrob") {
		capability "Actuator"
		capability "Sensor"
		capability "Configuration"
		capability "Refresh"
		capability "Switch"    
		fingerprint profileId: "0104", inClusters: "0006", outClusters: "0006"

}  // --- metadata ---

// Parse incoming device messages to generate events
def parse(String description) {
	log.debug "Description= $description"
	def name = null
	def value = null
	def zbc = zigbee.clusterLookup(0x0006)
	log.debug "cluster=${zbc}"			// <---- returns   "ON_OFF_CLUSTER"

def off() {
   def cmds = zigbee.off(200)		//  <---- works on led @ Endpoint 2
      //zigbee.writeAttribute(0x0006, 0x0000,0x020, 0x01)
    //  zigbee.command(0x0006, 0x0001)

def on() {
   def cmds = zigbee.on(200)			//  <---- works on led @ Endpoint 2
      //zigbee.writeAttribute(0x0006, 0x0000,0x020, 0x01)
    //  zigbee.command(0x0006, 0x0001)

def refresh(){
     def zbc = zigbee.clusterLookup(0x0006)
	log.debug "cluster=${zbc}"
    "st cmd 0x${device.deviceNetworkId} 0x${device.endpointId} 6 ${0x0001} {}"

Did you try the inbuilt zigbee multi endpoint switch driver?

I just tried it now. It does work but, it turns off/on the LEDs but both at the same time. I was hoping to get individual control.

My long term goal is to be able to utilize a number of capabilities of the Zigbee device from this resource

I've already successfully read the BME280 Sensor and binary inputs. However these were easy as it only required parsing the timed messages. Now that I send commands to the Zigbee device I find it much more difficult.

You hit configure, and it created two child nodes?, and each child wasn't able to control the endpoints separatly?
If not then the device isn't replying the endpoint queries we send to it...
If you don't already have a zigbee sniffer, I would invest in one. Even writing standard drivers can be challenging without one, it would be very very difficult without one for this device...

Apparently I had not clicked on "configure" device now responds as you stated. Including the child devices.

I may find I need to get a Zigbee sniffer, however unless I understand the basic Zigbee commands it would seem to be like buying a vehicle dyno when your just learning to drive. (maybe not the best analogy)

1 Like

Sure, but the advantage of the sniffer is that it decodes the frames being sent back and forth, this really helps in understanding the clusters and commands.
There is no getting past reading the cluster spec, but it sure is helpfull, particularly with a device as diverse as this one.