General > Lock, Motion & Security Control

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

(1/3) > >>

JJ10:
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

rafale77:

--- Quote from: JJ10 on August 02, 2018, 07:49:47 am ---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


--- End quote ---

try this
--- Code: ---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)
--- End code ---

rigpapa:
You can also create the AutoUntrip variable (service urn:micasaverde-com:serviceId:SecuritySensor1) 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.

JJ10:
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

rigpapa:
You can go into the control panel for the motion sensor, to the Advanced tab, and then New Service. Enter the service Id urn:micasaverde-com:serviceId:SecuritySensor1 exactly (copy-paste recommended), variable name exactly AutoUntrip, 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.

Navigation

[0] Message Index

[#] Next page

Go to full version