Opinion on HSM200 with Z-Wave JS

In my opinion i would not say it is not a hub issue.. it works in the old legacy zwave f/w so it can work for the hub.. the fact that the firmware changed and it broke something working to me says it is a hub issue and can be address somehow.

The only specific problem that can be identified with the information provided so far is a driver problem for the reason I pointed to twice above. This is all I meant, and that statement is accurate. It is a fact and not an opinion.

Do you have logs for the above to figure out the rest? That is what would be needed to further look into anything the hub side if there are other problems. Please post back in the original topic if you (or anyone) does; I'm moving this to the Lounge on the basis of it being an opinion and to keep the existing discussion focused.

ok here is the version of setcolor in my driver.. not the one above.. same issue.. i have not switched to zwave js as i have 5 of these devices that will not work for that reason.

def setColor(value) {
if ((debugEnable) || (descLog)) log.info "setColor() : ${value}"
def myred
def mygreen
def myblue
def hexValue
def cmds =

if ( value.level == 1 && value.saturation > 20) {
	def rgb = huesatToRGB(value.hue as Integer, 100)
    myred = rgb[0] >=128 ? 255 : 0
    mygreen = rgb[1] >=128 ? 255 : 0
    myblue = rgb[2] >=128 ? 255 : 0
} 
else if ( value.level > 1 ) {
	def rgb = huesatToRGB(value.hue as Integer, value.saturation as Integer)
    myred = rgb[0] >=128 ? 255 : 0
    mygreen = rgb[1] >=128 ? 255 : 0
    myblue = rgb[2] >=128 ? 255 : 0
} 
else if (value.hex) {
	def rgb = value.hex.findAll(/[0-9a-fA-F]{2}/).collect { Integer.parseInt(it, 16) }
    myred = rgb[0] >=128 ? 255 : 0
    mygreen = rgb[1] >=128 ? 255 : 0
    myblue = rgb[2] >=128 ? 255 : 0
}
else {
    myred=value.red >=128 ? 255 : 0
    mygreen=value.green >=128 ? 255 : 0
    myblue=value.blue>=128 ? 255 : 0
}
cmds << "200100"

// cmds << " delay 250"
if (myred!=0) {
cmds << "33060002FF"
//cmds << "delay 150"
cmds << "330702"
}
if (mygreen!=0) {
cmds << "33060003FF"
//cmds << "delay 150"
cmds << "330703"
}
if (myblue!=0) {
cmds << "3306000400"
//cmds << "delay 150"
cmds << "330704"
}
// cmds << " delay 100"
cmds << zwave.basicV1.basicGet()

sendEvent(name:"hue", value: value.hue)

sendEvent(name:"saturation", value: value.saturation)
sendEvent(name:"level", value: value.level)
state.hue = value.hue
state.saturation = value.saturation
state.level = value.level           

hexValue = rgbToHex([r:myred, g:mygreen, b:myblue])
if(hexValue) sendEvent(name: "color", value: hexValue, displayed: true) 
state.color = hexValue

log.warn "sending cmd $cmds"
commands(cmds)

}

here is the log showing what is sent

already tried using the classes.. as mentioned they do not work..

You are using raw hex. This is the same problem as in the other driver. If the classes don't work on legacy (not sure why you wouldn't use them if they do?), something is wrong, likely with how they are being used; if they don't work on JS, seeing those logs would be more helpful.

right but why will raw hex work in legacy but not js.. as i said if it was working and a change was made on the hub then i believe there is an issue with the hub.. blaming the driver is just lame..

Raw hex was never "supported," only the command classes, and those will work on any stack (or should; JS does some odd things with some that have been addressed or currently are -- it's possible this is one, but there's nothing here to support that yet). It just happened to work if you knew what you were doing, and it was tightly coupled with the underlying serial API that happens to not reach the driver layer in Z-Wave JS. This was an implementation detail not part of the documented Z-Wave or driver features for developers.

1 Like

with some futzing around this command works.. is that still considered raw?

sendHubCommand(new hubitat.device.HubMultiAction(cmds))

using the class like this doesnt work.. light just goes out no errors

sendHubCommand(new hubitat.device.HubAction(zwave.switchColorV3.switchColorSet(red: myred, green: mygreen, blue: myblue, warmWhite: 0, coldWhite: 0).format(), hubitat.device.Protocol.ZWAVE))

Can't say anything about that first example without seeing what cmds is. Raw hex would be a string of hex you construct yourself instead of using .format() on the Z-Wave class. It's not going to matter how you send it out (return value of the method for the command, sendHubCommand(), etc.) if that is what you mean.

The second example is not.

thanks for the prompt i got it working without raw hex.. i believe this will work in zwave js..

i havent tried converting a hub yet as i dont have time and going on a cruise in 5 days..

here is the guts of it

cmds2 << zwave.basicV1.basicSet(value: 0x00)
cmds2 << zwave.basicV1.basicGet()
  
sendEvent(name:"hue", value: value.hue)

sendEvent(name:"saturation", value: value.saturation)
sendEvent(name:"level", value: value.level)
state.hue = value.hue
state.saturation = value.saturation
state.level = value.level           

hexValue = rgbToHex([r:myred, g:mygreen, b:myblue])
if(hexValue) sendEvent(name: "color", value: hexValue, displayed: true) 
state.color = hexValue

cmds2 << zwave.switchColorV3.switchColorSet(red: myred, green: mygreen, blue: myblue).format()
commands(cmds2)

if you want to try install from hubitat package manager search for ezmulti

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.