Author Topic: How to reset "Tripped" status for my motion controllers?  (Read 159 times)

Offline JJ10

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +1/-0
How to reset "Tripped" status for my motion controllers?
« 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

Offline rafale77

  • Hero Member
  • *****
  • Posts: 1200
  • Karma: +56/-22
Re: How to reset "Tripped" status for my motion controllers?
« Reply #1 on: August 02, 2018, 11:57:01 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


try this
Code: [Select]
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)
« Last Edit: August 02, 2018, 12:02:47 pm by rafale77 »
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (134 zwave nodes, 8 Zigbee nodes, 200 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Online rigpapa

  • Hero Member
  • *****
  • Posts: 533
  • Karma: +73/-1
Re: How to reset "Tripped" status for my motion controllers?
« Reply #2 on: August 02, 2018, 01:05:21 pm »
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.
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline JJ10

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +1/-0
Re: How to reset "Tripped" status for my motion controllers?
« Reply #3 on: August 02, 2018, 02:07:31 pm »
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

Online rigpapa

  • Hero Member
  • *****
  • Posts: 533
  • Karma: +73/-1
Re: How to reset "Tripped" status for my motion controllers?
« Reply #4 on: August 02, 2018, 02:14:16 pm »
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.
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3 sandbox.

Offline JJ10

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +1/-0
Re: How to reset "Tripped" status for my motion controllers?
« Reply #5 on: August 02, 2018, 02:22:13 pm »
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.

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

Offline JJ10

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +1/-0
Re: How to reset "Tripped" status for my motion controllers?
« Reply #6 on: August 02, 2018, 02:39:29 pm »
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.

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!!!