What is the special requirements for a device can working with smartthings


(Li Yuqian) #1

I develop a board based on the TI Z-STACK 1.2.1, i tried their Switch example, but i never get it working with smartthings, in details.

  1. i can got log information from Smartthings HUB log message, that shown me my device joined, and got the HA profile description data
  2. then i based on that data to create a my device type for me, and assigned to just found device in smartthings. and it is correct for the fingerprint define as i can 100% sure

then i press the TI dev board key to send a zclGeneral_SendOnOff_CmdToggle cmd to Smartthings, but smarthings never got it :frowning:

also, i tried use the “st cmd 0x${device.deviceNetworkId} 8 6 1 {}” send out cmd from Smarthings to my device, i can got it from my device. and i also tried my device to working with other zigbee gateway, it is working perfect as expected.

so, i am wondering is there some special requirement for a device who want working with Smarthings, such as the ManufacturerName is required, etc.

thanks for your help as i am tripped with this :frowning:


(Andrew Urman) #2

Post the raw data. Also, what endpoint is the switch cluster on?


(Li Yuqian) #3

Hi Urman,

here is the raw data
rawDescription desc: 01 0104 0000 00 03 0000 0006 0003 02 0006 0003

and here is the my device type define

metadata {
definition (name: “ZBS”, namespace: “ZBS”, author: “yuqian”) {
capability “Switch”

	fingerprint outClusters: "0006,0003", inClusters: "0000,0003,0006", endpointId: "01", deviceId: "0000", profileId: "0104", deviceVersion: "00"
}
//01 0104 0000 00 03 0000 0006 0003 02 0006 0003
simulator {
	// TODO: define status and reply messages here
}

tiles {
    standardTile("switch", "device.switch", width: 2, height: 2, canChangeIcon: true, canChangeBackground: true) {
        state("on", label:'ON', icon:"st.switches.switch.on", backgroundColor:"#79b821")
        state("off", label:'OFF', icon:"st.switches.switch.off", backgroundColor:"#ffffff")
    }
    
    main("switch")
    details("switch")
}

}

def parse(String description) {
log.debug "Parsing ‘${description}’"
def msg = zigbee.parse(description)
log.trace “catchall: $msg”

def data = parseDescriptionAsMap(description)
log.debug "${data}"

def result
if (data.value == "00") {
    result = createEvent(name:"switch", value:"off")
    log.debug "off"
} else {
    result = createEvent(name:"switch", value:"on")
    log.debug "on"
}

return result

}

def parseDescriptionAsMap(description) {
(description - “read attr - “).split(”,”).inject([:]) { map, param ->
def nameAndValue = param.split(":")
map += [(nameAndValue[0].trim()):nameAndValue[1].trim()]
}
}

def refresh() {
“st rattr 0x${device.deviceNetworkId} 1 0x006 0x0”
}

def configure() {
log.debug “configure”

// Doing the ZDO binding here, so attribute changes should
// automatically be received through reporting.

//"zdo bind 0x${device.deviceNetworkId} 1 1 0x406 {${device.zigbeeId}} {}"
//"zdo bind 0x${device.deviceNetworkId} 1 1 0x006 {${device.zigbeeId}} {}"

}

Thank you :slight_smile:


(Andrew Urman) #4

what is your hubs zigbee firmware?