Spinny
January 5, 2016, 10:32pm
7
I ended up adding code to the device type so when the toggle switch is thrown and the fibaro 211 dimmer sends a message to the hub, smartthings sends a message back telling it to dim up or down etc. Take a look at this…
I am not quite sure how to go about sharing a custom device type with another user. I havent signed up to a GitHub account yet, although I did find some useful code there. So below is the custom parse method. I don’t claim it is the best code in the world, but it works, and hell it has been 20 years since I did any programming…
def parse(String description) {
def result
def hubact //used for a hubaction when the toggle switch is toggled
log.debug “About to parse: ${description}”
def cmd = zwave.parse(description, [0x26: 1, 0x70: 2, 0x72: 2])
//log.debug "Parsed to cmd: ${cmd}"
//if the toggle switch is toggled on, define a hubaction to switch the dimmer on
//and change the parsed command to be a switchmultilevelreport action
if ("${cmd}" == "BasicSet(value: 255)") {
hubact = r…