[RELEASE] HomeSeer HSM200 Multi-Sensor

Clicked Configure then Save again, and then Save and Configure. Nothing different. I also had reloaded the Driver from the Github URL earlier, but that didn't do anything either.

Did this immediately start reporting temperature for you, or did it have to settle down for a while or something?

I clicked refresh, and it did then send updated temps and other values, just isn't doing it on its own.

1 Like

I don’t have it hooked up right now.. But I’ll hook it back up in the morning and do some troubleshooting..

I have no new devices tomorrow.. So it’s a bug fix day.. I have a few bug reports to go through

Thanks for creating this driver!.

I really dislike managing batteries, and this is one of the few mains powered temperature devices I was able to find. They are too expensive, but I still bought a number of them to help out with the temperature sensing in the house for the thermostat control.

I hooked up another one to see if it was just that specific device, but I'm also getting the same type of illuminance only events for the second one (see below).

I'm happy to help anyway I can...

me too.. I wish everything could be mains powered

So I left both of them running all night, and the illuminance is reporting every minute, and the temperature is reporting, but reporting every 60 minutes, despite the setting of every 1 minute.

So good news is that it works, and we just need to figure out why it isn't taking the setting. Maybe a syntax error?

I did notice that there is a space in the "parameterSize: 1]" on temperature, and not on the illuminance... Don't know how spaces are interpreted in groovy...

space or no space it doesn’t matter in a Map

If this HSM200 device is identical to the EZMultiPli, which a number of websites indicate it is, then it may also have the ability to accept a temperature calibration offset adjustment as parameter 5.

Is there any ability to get this to work on Hubitat?

For something like this, if you have the device you can temporarily switch drivers to the basic zwave tool and try it.

I figured out that it was the parameter specifications causing the problem. Only Parameter 1 & 3, were being set, even though the intention was to set parameter 3 & 4.

So I changed the driver as follows:

@Field static Map configParams = [
        1: [input: [name: "OnTime", type: "number", title: "Minutes of No Motion Before Inactive (and Off for Associated Node 2 Lights) Sent", description: "Minutes [1-127, 0=Send On Command Upon Motion=Active Event (No Off Command Sent)]", defaultValue: 1, range:"0..127"], parameterSize: 1],
        2: [input: [name: "OnLevel", type: "number", title: "Dimmer OnLevel", description: "Dimmer OnLevel for Associated Node 2 Lights Upon Motion=Active Event [1-99, (-1)=On, 0=Off]", defaultValue: -1, range:"-1..99"], parameterSize: 1],
        3: [input: [name: "LiteMin", type: "number", title: "Lux Report Interval", description: "Minutes [1-127, 0=Disable]", defaultValue: 60, range:"0..127"], parameterSize: 1],
        4: [input: [name: "TempMin", type: "number", title: "Temperature Report Interval", description: "Minutes [1-127, 0=Disable]", defaultValue: 60, range:"0..127"], parameterSize: 1],
        5: [input: [name: "TempAdj", type: "number", title: "Temperature Calibration Adjustment", description: "Adjust Reported Temperature in 10ths of a Degree F [(-127)-128]", defaultValue: 0, range:"-128..127"], parameterSize: 1]
]

These work fine to now configure the motion sensor timeout, and the time interval for both lux and temperature reporting.

I also got the temperature to display in tenths of a degree by changing line 153 to remove the .toInteger() on the temperature reporting event.

evt.value = cmd.scaledSensorValue

The remaining issue that I have is that the default setting for parameter 2 is (-1) to send an "On" command with motion. This inputs into the device edit screen fine, but when the page reloads based on the configuration of the device, it translates that (-1) to 255 on the screen. A page load with a 255 setting showing in this field is a problem because the input values are limited in scope to [-1...99]. I haven't yet tested changing the temperature calibration adjustment value to a negative number, but it likely has a similar problem.

I believe the issue is that the device outputs a Hex value of FF for the (-1) setting when polled, which overflows when calling toInteger(), resulting in a display of 255 in the field. 255 is the unsigned interpretation of the hex value FF, but a signed conversion would be (-1).

I'm not sure how exactly to fix this as of now, so I just commented out parameters 2 & 5 in my setup for now.

I checked the accuracy of the indicated temperatures sent from the devices, and luckily I don't need to adjust the temperature sensor calibration from them yet. The device works fine with the indicated input variables above (less parameters 2 & 5). So I'll go with this until I can figure out how to get FF to convert to (-1) on the edit device page.

Hey all, I just picked up one of these, and everything's working except the color controls. I can only seem to set cyan, orange and pink, no greens, deeper blues or full reds. Any ideas? tried entering manual values and still no joy. Any input appreciated!

2 Likes

I’ll check it out

Ok.. So this is weird device behavior it is getting and reporting the correct color, but it is not displaying the correct color.. It seems to have a very limited color reproduction range

After figuring out the sensors above, I had to do quite a bit of experimenting to figure out the color settings. It seems it is RGB, but each of those 3 LEDs can only be On or Off. So you end up with only being able to produce 7 colors, which are the 3 primary colors, a blend of each 2 LEDs, and a whiteish color with all 3 LEDs on.

To make this work, I modified the setColor() and setGenericName() functions as follows:

void setColor(value) {

    def TranslatedRed
    def TranslatedGreen
    def TranslatedBlue

    if (value.hue == null || value.saturation == null) return
    if (value.level == null) value.level=100
    if (logEnable) log.debug "setColor($value)"
    List<hubitat.zwave.Command> cmds = []
    List rgb = hubitat.helper.ColorUtils.hsvToRGB([value.hue, value.saturation, value.level])
    if (logEnable) log.debug "Requested RGB from hsv entry [r:" + rgb[0] + ", g: " + rgb[1] +", b: " + rgb[2] +"]"

    //Convert the requested RGB settings to deal with this device only being capable of setting each R, G & B to on or off
    //If Hue and Saturation are set to zero, make all on (whiteish)
    if (value.hue == 0 && value.saturation == 0 && value.level == 100){
        TranslatedRed = 255
        TranslatedGreen = 255
        TranslatedBlue = 255        
    } else {        
        TranslatedRed = rgb[0] >=128 ? 255 : 0
        TranslatedGreen = rgb[1] >=128 ? 255 : 0
        TranslatedBlue = rgb[2] >=128 ? 255 : 0
    }
    if (logEnable) log.debug "Translated RGB for Device Capability [r:" + TranslatedRed + ", g: " + TranslatedGreen +", b: " + TranslatedBlue +"]"
    cmds.add(zwave.switchColorV1.switchColorSet(red: TranslatedRed, green: TranslatedGreen, blue: TranslatedBlue))
    if (device.currentValue("switch") != "on"){
        if (logEnable) log.debug "Light is off. Turning on"
        cmds.add(zwave.switchMultilevelV2.switchMultilevelSet(value: 99, dimmingDuration: 0))
        cmds.add(zwave.switchMultilevelV2.switchMultilevelGet())
    }
    sendToDevice(cmds)
    runIn(3,"refreshColor")
}

private void setGenericName(hsvinput){
    Integer hue
    String colorName
    hue = hsvinput[0].toInteger()
    hue = (hue * 3.6)
    if (logEnable) log.debug "Hue entered for Color Name conversion [" + hue +"]"
    if (logEnable) log.debug "Hue entered for Color Name conversion [Hue:" + hsvinput[0] +"Sat:" + hsvinput[1] +"Level:" + hsvinput[2] +"]"
    if (hsvinput[0] == 0 && hsvinput[1] == 0 && hsvinput[2] == 100){
        colorName = "White"      
    } else {      
    switch (hue){
        case 0..45: colorName = "Red"
            break
        case 46..75: colorName = "Yellow"
            break
        case 76..135: colorName = "Green"
            break
        case 136..195: colorName = "Cyan"
            break
        case 196..255: colorName = "Blue"
            break
        case 256..315: colorName = "Magenta"
            break
        case 316..360: colorName = "Red"
            break
    }
    }
    String descriptionText = "${device.getDisplayName()} color is ${colorName}"
    eventProcess(name: "colorName", value: colorName ,descriptionText: descriptionText)
    if (logEnable) log.debug "colorName is: [" + colorName +"]"
}

I also Added a parameter #6 in the Parameters section that does nothing, but remind me how to make this device display those 7 colors in the Device Configuration page:

@Field static Map configParams = [
        1: [input: [name: "OnTime", type: "number", title: "Minutes of No Motion Before Inactive (and Off for Associated Node 2 Lights) Sent", description: "Minutes [1-127, 0=Send On Command Upon Motion=Active Event (No Off Command Sent)]", defaultValue: 1, range:"0..127"], parameterSize: 1],
// Can't get to work as -1 reports Hex FF, and toInteger() cnverts that to 255 instead of -1        2: [input: [name: "OnLevel", type: "number", title: "Dimmer OnLevel", description: "Dimmer OnLevel for Associated Node 2 Lights Upon Motion=Active Event [1-99, (-1)=On, 0=Off]", defaultValue: -1, range:"-1..99"], parameterSize: 1],
        3: [input: [name: "LiteMin", type: "number", title: "Lux Report Interval", description: "Minutes [1-127, 0=Disable]", defaultValue: 60, range:"0..127"], parameterSize: 1],
        4: [input: [name: "TempMin", type: "number", title: "Temperature Report Interval", description: "Minutes [1-127, 0=Disable]", defaultValue: 60, range:"0..127"], parameterSize: 1],
// Untested, not sure working as has negative values same as parameter 2        5: [input: [name: "TempAdj", type: "number", title: "Temperature Calibration Adjustment", description: "Adjust Reported Temperature in 10ths of a Degree F [(-127)-128]", defaultValue: 0, range:"-128..127"], parameterSize: 1]
// The Input below does nothing but show notes on what values to set Hue to in order to create certain colors.
    6: [input: [name: "JustForNotes", type: "number", title: "Notes on Hue Setting (not actual parameter):", description: "92-0-8 = Red, 9-25=Yellow, 26-41=Green, 42-58=Cyan, 59-74=Blue, 75-91=Magenta", defaultValue: 0, range:"0..0"], parameterSize: 1],

]

This device now works decently. It reports temperature, illuminance, and motion at the intervals I set, and deals with the color in a reasonable way, but probably not as people expect when they buy this device in the first place. It's fine with me, as I primarily bought it for remote mains powered temperature sensor, and the rest working is a plus.

The color can be set by primarily by setting the Hue. It will set a color if the Hue is in the ranges indicated in the parameter 6 above, which snaps the color to the next single or blend of colors once the Hue is set more than 1/2 way to the next desired color. Since there is only on/off on each LED, then this works as long as the Saturation and Level are at 100. Settings below this and the driver doesn't deal with them well, mostly just turning the light off. If you want to try to get a whitish color, with al the LEDs on, then simultaneously set the Hue and Saturation to zero, and the Level to 100.

What a bummer.. but this is what I was suspecting..

Yeah, even if you can live with the 7 colors, I think the most disappointing thing about this implementation, unless I'm wrong, is that you can't dim the light even for those 7 colors. So if you set it to blue, it is at 100%, or off. That makes the indicator light a little less useful if you want to use it in the bedroom, for example.

On the bright side, the temperature, illuminance, and motion are solid if you can live with a 1 minute refresh rate, and having it mains powered is a big plus in my book.

This device also appears to have the ability to associate other z-wave switches/dimmers directly with it in Association Group 2, and then send those switches/dimmers direct commands when motion is sensed without routing through the hub. This is a nice feature as I have this in my GE 14924 & 26933 dimmers. This can effectively join many dimmers/switches to behave the same as a single dimmer/switch. So if your house has many switches controlling the lights in a room/floor, this feature will link their behavior all together almost instantly.

I haven't tried to get the Association Group 2 activity to work on this device driver, but it might be doable with some driver settings similar to those in the drivers for those two GE dimmers.

Hi there. Just installed this driver and I can set colors OK.. but it's not throwing motion events. Any suggestions?

can you turn on debug logging and trigger a motion event?

Can the drive be updated to reflect what the device is capable of? I find it to be a guessing game as to what RGB will end up as a color, and what color it might be. So far I can only get green, pink, and orange. A pull down color selection might be better if that is all the device can do.

Just a thought, thanks for the driver. So far project bathroom light automation with +WAF is a go!

1 Like

If the driver doesn't get updated, it will work the way I described a few posts up if you make those changes in the code yourself.