How to reset "Tripped" status for my motion controllers?

Hi All,
Because i don?t have any experience with LUA and LUUP i hope someone can help me?
I have 5 motion sensors and they work fine, but in some cases, mainly when the battery is (almost) empty, they stay on the ?tripped? status.
Because this influence my Alarm and light automation, I would like to have the ability to reset all the tripped statuses back to ?0? (so I can run this scene before change to ?Away or Night).
I did found some code in the forum, but I can?t find this topic anymore… Based on what I found, I create a scene with the following LUA code, but this isn?t working:

luup.variable_set (urn:micasaverde-com:serviceId:SecuritySensor1, “Tripped”, 0, 139
luup.variable_set (urn:micasaverde-com:serviceId:SecuritySensor1, “Tripped”, 0, 146
luup.variable_set (urn:micasaverde-com:serviceId:SecuritySensor1, “Tripped”, 0, 153
luup.variable_set (urn:micasaverde-com:serviceId:SecuritySensor1, “Tripped”, 0, 136
luup.variable_set (urn:micasaverde-com:serviceId:SecuritySensor1, “Tripped”, 0, 133

I hope one of you can tell me how I can reset the tripped status of my 5 devices.

Thanks

[quote=“JJ10, post:1, topic:199578”]Hi All,
Because i don?t have any experience with LUA and LUUP i hope someone can help me?
I have 5 motion sensors and they work fine, but in some cases, mainly when the battery is (almost) empty, they stay on the ?tripped? status.
Because this influence my Alarm and light automation, I would like to have the ability to reset all the tripped statuses back to ?0? (so I can run this scene before change to ?Away or Night).
I did found some code in the forum, but I can?t find this topic anymore… Based on what I found, I create a scene with the following LUA code, but this isn?t working:

luup.variable_set (urn:micasaverde-com:serviceId:SecuritySensor1, “Tripped”, “0”, 139
luup.variable_set (urn:micasaverde-com:serviceId:SecuritySensor1, “Tripped”, “0”, 146
luup.variable_set (urn:micasaverde-com:serviceId:SecuritySensor1, “Tripped”, “0”, 153
luup.variable_set (urn:micasaverde-com:serviceId:SecuritySensor1, “Tripped”, “0”, 136
luup.variable_set (urn:micasaverde-com:serviceId:SecuritySensor1, “Tripped”, “0”, 133

I hope one of you can tell me how I can reset the tripped status of my 5 devices.

Thanks[/quote]

try thisluup.variable_set ("urn:micasaverde-com:serviceId:SecuritySensor1", "Tripped", 0, 139) luup.variable_set ("urn:micasaverde-com:serviceId:SecuritySensor1", "Tripped", 0, 146) luup.variable_set ("urn:micasaverde-com:serviceId:SecuritySensor1", "Tripped", 0, 153) luup.variable_set ("urn:micasaverde-com:serviceId:SecuritySensor1", "Tripped", 0, 136) luup.variable_set ("urn:micasaverde-com:serviceId:SecuritySensor1", "Tripped", 0, 133)

You can also create the [tt]AutoUntrip[/tt] variable (service [tt]urn:micasaverde-com:serviceId:SecuritySensor1[/tt]) and give it a value of a time in seconds. Luup will automatically reset the tripped state (regardless of what the sensor may say) after that many seconds. This approach avoids timed scenes with Lua, startup Lua, etc.

Hi Rafale77,
Thank you very much, now it work!!!

@rigpapa, thanks for your reply it’s sounds like a good thing to do. But as I mentioned before LUA and LUUP isn’t my thing so I don’t know how to execute (or interpreted) your suggestion ???
Or is the AutoUntrip variable something I should create someplace else? Can you give me more information?

Kind regards

You can go into the control panel for the motion sensor, to the Advanced tab, and then New Service. Enter the service Id [tt]urn:micasaverde-com:serviceId:SecuritySensor1[/tt] exactly (copy-paste recommended), variable name exactly [tt]AutoUntrip[/tt], and a non-zero number of seconds for the value. Then hit the “Add” button. Move on to the next motion sensor and do the same. On the last motion sensor, after hitting Add, also hit Reload Engine. That should do it.

1 Like

Thank you very much I will try this.
I didn’t know you could add new services. The advanced tab including the variables I knew but I could find AutoUntrip) now I understand.
Thanks again

I successfully added the new services and it looks like it’s working (motion status is now changed back after the X seconds).

Rafale77 thanks for your code for my scene and Rigpapa thanks for your additional solution for my problem!!!

Rigpapa, do I understand well?
Creating autountrip will always untrip within x seconds, without movement of course?
I’m still struggling with the fact that when I lock with rfid tag (benext), the sensors are armed. I can launch a lua script based on the homestatus (away eg). For the moment, I launch a beep, wait 25 seconds and unset tripped on all my sensors.
But the sensors are already armed and so the tripped state does launch my separate alarm event…
I don’t use the events from the homestatus window.
best regards

Olivier

[quote=“OlivierToebosch, post:8, topic:199578”]Rigpapa, do I understand well?
Creating autountrip will always untrip within x seconds, without movement of course?[/quote]

AutoUntrip will untrip a sensor X seconds after it trips.

[quote=“rigpapa, post:9, topic:199578”][quote=“OlivierToebosch, post:8, topic:199578”]Rigpapa, do I understand well?
Creating autountrip will always untrip within x seconds, without movement of course?[/quote]

AutoUntrip will untrip a sensor X seconds after it trips.[/quote]

I thought this might solve a problem I have, but it doesn’t. Or does it, but I’m missing something else? My sensor “untrips” with this variable set, but it still won’t sense any new motion until after some other arbitrary amount of time. I set the untrip to 10 seconds. BTW, can you remove a variable through the control panel?

Thanks.

[quote=“tbearman, post:10, topic:199578”][quote=“rigpapa, post:9, topic:199578”][quote=“OlivierToebosch, post:8, topic:199578”]Rigpapa, do I understand well?
Creating autountrip will always untrip within x seconds, without movement of course?[/quote]

AutoUntrip will untrip a sensor X seconds after it trips.[/quote]

I thought this might solve a problem I have, but it doesn’t. Or does it, but I’m missing something else? My sensor “untrips” with this variable set, but it still won’t sense any new motion until after some other arbitrary amount of time. I set the untrip to 10 seconds. BTW, can you remove a variable through the control panel?

Thanks.[/quote]

Turns out I WAS missing something, which I dug out of other sources, and which I explain below for benefit of other newbies with the same question.

The Device->Advanced tab sets VERA ONLY variables
The Device->Device Options tab sets DEVICE ZWAVE variables

So while I changed the untrip for the Vera GUI, I still needed to set the underlying DEVICE variable under Configuration Settings

In my case, for the Aeon multisensor ZW100, I needed to add variable:3; data size: 2 byte dec; desired value:10
These settings I got from Googling “aeon zw100 configuration settings”

Hope this helps somebody else.

[quote=“tbearman, post:11, topic:199578”]Turns out I WAS missing something, which I dug out of other sources, and which I explain below for benefit of other newbies with the same question.

The Device->Advanced tab sets VERA ONLY variables
The Device->Device Options tab sets DEVICE ZWAVE variables

So while I changed the untrip for the Vera GUI, I still needed to set the underlying DEVICE variable under Configuration Settings

In my case, for the Aeon multisensor ZW100, I needed to add variable:3; data size: 2 byte dec; desired value:10
These settings I got from Googling “aeon zw100 configuration settings”

Hope this helps somebody else.[/quote]

Ah, OK, yes that’s different. This is often referred to as the “Reset Period”. It’s meant to reduce the number of reports by the sensor when the room is occupied–those frequent and potentially spurious reports can cause reduced battery life. It’s not unusual for sensors to default to relatively long periods; I believe that among alarm motion sensors, 2-4 minutes is fairly standard. So, getting the right reset duration depends on your application and desired performance, but be aware that in a heavily trafficked area, setting it to 10 seconds may require frequent battery changes.

[quote=“rigpapa, post:12, topic:199578”][quote=“tbearman, post:11, topic:199578”]Turns out I WAS missing something, which I dug out of other sources, and which I explain below for benefit of other newbies with the same question.

The Device->Advanced tab sets VERA ONLY variables
The Device->Device Options tab sets DEVICE ZWAVE variables

So while I changed the untrip for the Vera GUI, I still needed to set the underlying DEVICE variable under Configuration Settings

In my case, for the Aeon multisensor ZW100, I needed to add variable:3; data size: 2 byte dec; desired value:10
These settings I got from Googling “aeon zw100 configuration settings”

Hope this helps somebody else.[/quote]

Ah, OK, yes that’s different. This is often referred to as the “Reset Period”. It’s meant to reduce the number of reports by the sensor when the room is occupied–those frequent and potentially spurious reports can cause reduced battery life. It’s not unusual for sensors to default to relatively long periods; I believe that among alarm motion sensors, 2-4 minutes is fairly standard. So, getting the right reset duration depends on your application and desired performance, but be aware that in a heavily trafficked area, setting it to 10 seconds may require frequent battery changes.[/quote]

Thanks for this. In my situation, I have all of my motion detectors plugged in to USB, no batteries involved, and I’m counting on short reset frequency to enable me to determine direction of movement.

[quote author=JJ10 link=topic=102089.msg410791#msg410791 date=1533235169]

I have created a Virtual Motion Sensor (device #1152) using the instructions in this thread;-
http://forum.micasaverde.com/index.php?topic=86502.0

But when I go to the Advanced Tab and add a New Service to automatically turn this motion sensor off after 30 seconds by;-
New Service: urn:micasaverde-com:serviceId:SecuritySensor1
Variable: AutoUntrip
Value:30

and then trigger it by pasting this into Apps - Develop Apps - Test Luup Code (Lua);-
luup.variable_set(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 1,1152)

The Virtual Motion Sensor triggers, but does not reset after 30 seconds, although I can stop it triggering manually by pasting this in Test Luup Code;-
luup.variable_set(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 0,1152)

How can I check if the new service has been correctly added?
Or is “AutoUntrip” not possible on this Virtual MS?

This “Virtual” Motion sensor is used as a"Master" Motion Sensor, which is triggered by many “Real” sensors (using Luup in PLEG Actions) and I don’t want to have to create many “Off” Actions, but would much rather have the Master Motion Sensor turn itself off.

Anyone can help?