HSM100 motion control

What is the best way to associate the HSM100 motion to a back yard light?
Scene or direct association and how? I really want to define the HSM100 light to be under 30 and motion before the lights are activated.
It seems like I spend hours configuring a new type of device, this is starting to become annoying.

Nevermind, I’m not going to bother until Vera comes up with an “and” in the scenes. I remember reading a thread a couple weeks ago in regards to adding this command

dont hold your breath - despite us all asking for AND and even a potential solution being suggested by one of the wise folks of MCV- there’s still not even an acknowledgment that it’s a valuable feature that might get added one day.

[quote=“michaelk, post:52, topic:165528”]For you guys interested in adding some simple logic to the UO- there’s a thread here asking for it:


MCV thinks it’s a fringe group that wants this - so if you could pipe up in that thread to let them know you also think it’s valuable it might help them understand bettery that the many people think it’s a valuable feature.

also there’s a poll in the following thread trying to prove there are more than five people who care about this as MCV originally thought. So you might want to voter there too- although it seems clear at this point it’s not just 5 people. But you know what they say “every vote counts” ;D


finally it seems Javier is the only person at MCV who’s got some ideas how to get this accomplished. And pretty simply at that. But havne’t heard any mention of when the rest of MCV might get on board with his intelligent ideas. He came up with a SIMPLE QUICK solution in one of the UI4 threads. So maybe you want to pipe in over there too that you are also interested and we can get some kind on an official response that they will spend the time to implement Javier’s idea.

So far, it seems that the simplest way is to simply add more conditions to the event definition screen.

Currently, you can only define a single variable to be compared to a single argument. Adding more of these (variable/operation/argument), would do the trick. The event would fire only when all conditions are met. This is the AND.

Then, simply defining several events with the same result takes care of the ‘outer’ OR grouping.

The UI impact is minimal, and so is the extra burden on the user. I don’t know if you have already begin sketching that part (the scene/event/trigger/timer definitions); for now, simply allow for multiple conditions on a single event trigger.

What we still have to define is about the ‘back of the frontent’. Currently, it builds a JSON structure described here [url=http://wiki.micasaverde.com/index.php/Luup_Events]http://wiki.micasaverde.com/index.php/Luup_Events[/url]. We could either extend this structure, and change the Luup engine to handle it, or we could drop this structure and make it always generate Lua scripts, even for simple events.

To be honest, now it seems that this was what the users were asking from the beginning; but for hardcore programmers it wasn’t obvious. At least for me, as soon as you pass the simple list of options, you’re in programming territory. And if you don’t want to program, you need a code generator. No middle grounds! But it seems that just this addition, limited as it is, will make a big difference for some users.

In any case, the visible portion of the UI is almost unchanged (in concepts), the real work will be in how it communicates with the backend.[/quote]

thread is here:

as they say “every vote counts”


If you only want to use your HSM100 for this one purpose, then the easiest way (right now) is to set the parameters for the device. It’s a great little unit that you can set timeout, light level, motion sensitivity, etc. If you need help with that let us know.

The problem comes when you want to use the sensor to do different things in different scenes, i.e., turn on lights when motion is sensed after dark, (or for a certain period after the sun goes down) but you also want to use the same unit to turn on a garden fountain when motion is sensed during the day. For that you need to do the lua code snippet thing michaelk is talking about.

Try this. Create a scene to trigger the back yard light when motion is detected. Determine if you want to trigger on an armed or unarmed sensor. Either way will work but I find that an armed sensor allows me to disable the scene by disarming the motion sensor for that scene.
In the scene Lua code add:

local lul_light_level=luup.variable_get(“urn:micasaverde-com:serviceId:LightSensor1”,“CurrentLevel”,??)

if ( tonumber (lul_light_level) >31 ) then
return false

Make sure you replace the ?? with the device number of the light sensor in the 3 in 1. This will trigger the scene only when the light level is below 30%. (This value seems very high) The Lua code creates an “AND” logical condition with the motion setting of the scene.

You can also play around with the idle timeout to reset the device after a trigger. I would suggest a 5 minute reset. If you find the motion sensitivity too low also adjust the level in the advanced settings. Either one of these settings will drain you batteries faster.

This method has been working for me with great results. All my external and many internal lights are controlled by two 3 in 1’s. Good luck.

Does this look correct?

Device: 56 motion
Event type: An armed sensor is tripped

Name for this event: Back yard motion
Tripped? Yes

Commands: Back Yard Floods :ON after 30 min OFF

LuuP Scene:

local lul_light_level=luup.variable_get(“urn:micasaverde-com:serviceId:LightSensor1”,“CurrentLevel”,57)

if ( tonumber (lul_light_level) >31 ) then
return false

BTW: My light sensor is ID 2, should the Luup say “serviceID:Lightsensor2”

Are you using Vera 2?

I can’t seem to include my HSM100, not sure if its a Vera problem or a faulty HSM100.

I have tried excluding it, but I don’t think its detected at this stage as Veras zwave light just flashes steadily.

Anyone have any ideas?

Vera 1 but I us think essentials to include to network and then add with low power inclusion of existing device


I’m going by memory but everything you have looks good. Device #57 is probably correct since your motion is #56, you don’t want to use the ID number. I loaded wl500gP_Luup_ui2-1.0.988-1.trx last weekend and I am now experiencing problems with one of my 3 in 1. I didn’t have time to trouble shoot. I hope it works for you.