HomeSeer HSM200 Support

I created a modified version that should work with Smart Lighting. Do you want to give it a try and let me know if it works. I don’t have the device so I can’t fully test it.

2 Likes

I would love to try it! I am in the car right now but should have an answer within the next 45 minutes. I plan on scanning through the code just for my learning purposes, but may I ask what was changed?

Still putting it through the paces, but it seems to work!
I think it might get PINK wrong (shows up as red), but so far I have the green light turning on with activation of a switch as well as which motion. And it is able to turn back to white when motion stops. However, for no apparent reason, it flipped to yellow about a minute after it was on white.

I plan on using this as a Mode notifier. For example, white night light during x hours, then trigger red for a minute if my mode is set to Away (or any mode which arms the alarm), shine green if alarm is not on, etc

Anyone know of an app which will change an LED color based on weather? This might be fun too.

2 Likes

Several people have done weather indicator apps that change bulb color based on the weather forecast. Most started with the following as a base:

Glad that it is working for the most part. I will look at the pink issue and anything else mentioned here. I threw it together rather quick so I might need to make some adjustments. Let me know if there are any other issues. If you would like to see the changes I made you can view them here:

I think I’m going to purchase one as they seem kind of nifty. It will make troubleshooting easier as well.

3 Likes

Thanks @erocm1231
I’ve had to tinker a bit to try to work around a few quirks.
Specifically, it seems like the ‘motion off’ action is not able to initiate a color change. Instead, when it is supposed to trigger a color, I think it turns the LED off (or sends an incorrect command which forces it off). Or maybe it turns off one of RGBW, since blue turns off and, if I recall correctly, green turns to yellow. Also, when I set it to stay white it turns yellow. This occurs spontaneously in about 30 seconds.

Not as big of a deal, but there is no teal option in the SmartApp and purple turns out pink.

I think that’s what I’ve found so far. But I’m so glad it’s working at the level it is. Thanks!
I’m happy to keep testing until yours arrives! (and after)


Edit - I played with the values (although changing the name of the color in the code didn’t alter the name in the app…must be that groovy that I don’t understand) and these values work fine:

Of course, that’s just a basic color wheel.
Which makes me think that my blue drops out after about 30 seconds (I have a color set to turn on when motion stops. As mentioned above, if I set blue, it turns off, and if I set white, it will become yellow (loses blue LED).

Not positive why blue turns itself off after about 30s whether it’s triggered by motion start or stop or even a connected switch turning on…? Maybe I have a defective device.

Thanks, I updated to correct the colors in my code. I also made a few changes so that the device will be more compatible with other SmartApps that change color using hue values. Before, it was programmed to map only what was being passed from Smart Lighting. Now, if any app tries to change the LED color using setColor, it will at least get as close as possible with the LED color combinations the device can achieve.

As for the Blue LED behavior, it does seem like maybe it is defective. I ordered one for myself, so I will be able to test it for sure. I’ll also test the ability to set color when motion stops.

Edit - I played with the values (although changing the name of the color in the code didn’t alter the name in the app…must be that groovy that I don’t understand) and these values work fine:

The color names and their corresponding hue values are actually hard coded into the Smart Lighting app so we can’t change them. The best we can do is map what the Smart Lighting app sends to the colors available with our LEDs.

2 Likes

Thanks for updating/improving the compatibility. Yeah, I can’t figure out this blue LED issue at all! When does yours arrive? I don’t want to be outside of the return window if mine is defective.

So I got it and have been playing with it for a bit. Cool little device. I set up a Smart Light rule to turn the LED red when there is motion and another one to turn it blue when motion stops. It works flawlessly. No problems at all with the Blue LED turning off.

Not sure if you have done it, but I adjusted the motion timeout of the device from its default of 10 minutes to 1 minute. This is the amount of time that must pass after the last detected motion in order for the device to send a notice to SmartThings that motion has stopped.

1 Like

It is a neat device! I’m surprised there’s not more interest since it’s so practical for a variety of uses.

Thanks for the feedback about your device and the blue working. I’m going to request a replacement.
I have decreased the time to one minute.

What other uses do you foresee? Weather indicator? :blush:

1 Like

I was thinking of having the color change when someone rings my doorbell. Maybe change colors if I have a text message or email. Haven’t thought about it too much.

So, I have created (probably) my last revision of the device type. I brought the look and feel of it up to SmartThings v2 standards. Also, fixed a few things, made some of the code more efficient, and added a refresh option to get current temperature and illuminance. The color mappings changed slightly (only teal I think), so read the notes in the device type if you use it.

1 Like

Awesome, thanks!
This is the first I’ve seen that pallet to change the color. I like it and will have to mess with it when I get home.
My illuminance shows up as 711%…I don’t use illuminance for any SmartApps (yet), but does that seem right?

Using it as a home LED notification is a great idea. Or maybe a Kickoff notifier (15 minutes to kickoff is pink; 10 minutes is yellow; 5 minutes is red…or for TV shows - don’t miss the next episode of Blacklist!) I appreciate the time you’ve put into this.

Does the illuminance show 711% in the grey tile as well? I didn’t change how the device type comes up with the number, just changed how it was displayed.

Luminance shouldn’t be a percentage. Like temperature, there’s theoretically no “max.”

Hmmm, it seems this sensor measures “Relative Luminance level”, which is represented by a percentage. From the device documentation:

Just did some quick reading on it, as I hadn’t heard of it before. “The relative brightness of any point in a colorspace, normalized to 0 for darkest black and 1 for lightest white.”

The device should be reporting this as a value of 0 - 100%, but I’m not really sure how useful this is going to be. When ever the LED is on mine is reporting 90-100% even when the room is extremely dark. I’ll have to read more about the value to see if there is something I am missing.

Interesting, thanks! Not sure how they’re setting " brightest," but if they do, they do.

1 Like

Yes, I attached a screenshot that I took earlier.

Good point about the led contributing to a false reading anyway. So if I need to integrate illuminance into my smart home, I’d probably base it off of an aeon multisensor.

Edit: here’s the latest… (no association between the 685 and 68.5)

That is so strange, my device has never reported anything over 100. I looked in the event logs for the device and confirmed. Is this the same device that had the funky blue LED behavior? According to the specs of the device it should only ever report from 0 - 100.

Found a better explanation in the manual:

Light Report
EZMultiPli sends a report of the relative amount of light currently in the room to the Z-Wave system controller. The value is from 0 to 100% and is relative to the maximum and minimum amount of light EZMultiPli has measured since it was plugged in. The reports are automatically sent every LiteMin number of minutes.

I guess that answers your question of how they determine what the brightest value should be.

Wow! So if you started at night, maximum is based on the room light. Until the sun comes up and then it’s going to keep changing the max value. I guess it’s not that big a deal since it’s basically a nightlight anyway. But it means it if you try to figure off of their 50% value, that value might be real different three weeks from now.

Also, if you unplug it does it reset completely? That could make things pretty wonky too.