Thank you for all of the great posts on this thread. I bought several of the Bosch Motion Detectors, and then found out about the “inactive in seconds” issue.
I did install the Device Handler by Tomas Axerot (http://tinyurl.com/yak4x2j8), and it got everything working … EXCEPT … I was still getting the same “inactive” events right after the “active” event.
I’m been wanting to experiment and write/modify a Device Handler for quite some time … and tonight was the night. I have now created the “Bosch Motion Detector with Delay” Device Handler … and after some minimal testing am ready for other feedback!
This fork of Tomas work adds a new preference “Minimum Duration” which you can set in minutes. It will filter all of the “inactive” events, and then generate one that is the “minimum duration” minutes after the last “active” event.
There is some refactoring that I want to do tomorrow after more testing, but thought that I might as well get feedback from anyone else before I do much more. Anyone up for testing?
@Nathan909 and @Glen_King I’ve made my first attempt to modify a Device Handler to provide this functionality. See my post #185 …
I’m allowing you to set a “minimum duration”, in minutes, for the motion sensor, and then filter the subsequent inactive events. Any additional active events within this period will extend the duration further.
Test it if you want … I’m looking for feedback … I’m going to continue to enhance this Device Handler for my purposes. Just bought 5 more of these sensors for $14.99/ea!
I have 4 of these, and am really struggling to factory reset one of them. It used to work, but I am unable to get it to pair.
Whenever I try to reset it, all I get is a rapidly blinking light for a few seconds, then test mode for 3 minutes.
Anyone have any suggestions on getting this thing to pair? I’ve seen in the thread, and read the instructions, something about pushing in the left battery, then the right, release the tamper button after 3.5 seconds, and then hold down the tamper button (or reinstall). This doesn’t work for me.
For anyone that has it down, do you have any tips? Like, for example, which battery is the right side (from the front or back?) Or any way to manually pair it into Smartthings?
I made a WebCore piston using your DTH (set to 3 minutes) that will check for motion activity every 180 seconds on any of the Bosch sensors once my wife and I are both away from the house on the presumption that we have people present in the home that wouldn’t want all the lights, HVAC turned off, etc.
The piston triggers a virtual presence switch ([Release] Virtual Presence Plus (presence controlled by a virtual switch)) to indicate that someone is home (housekeeper, babysitter, etc) so as to prevent the security system from being armed which otherwise occurs 10 minutes after our departure. (The “I’m Back” routine toggles the virtual presence switch back off).
One thing I noticed is that since the inactive timeout for the sensor is 3 minutes, the only way to get the continuous extended “motion detected” state was to set the delay to at least 4 minutes. If I set it to 3 minutes, it goes to “motion has stopped” state then instantly back to “Detected Motion” state.
Is it possible to use seconds instead of whole minutes? Then we can more finely tune the delay in case a person wanted to get as close to the device’s inactive timeout as possible.
I adjusted your code on my end to use seconds (just removed a couple "* 60"s) and changed my preference to use 195 allowing a window of 15 seconds for detecting motion to extend the “detected motion” state.
I just realized something, I’m using iOS and the preference doesn’t allow me to input decimals. I’m not sure if Android is the same way. Maybe entering something like 3.25 minutes is possible in Android?
I stumbled across this topic while looking for something entirely different but have some experience with these units. I purchased 5 of (ISW-ZPR1-WP13) motion sensors back in March of 2017 and followed the instructions provided by digitaldiscount on installing the recommended custom DTH. But after reading this thread I just switched them all over to the one that runs locally (learn something new every day). 2 of the 5 paired immediately, 1 took me hours, 1 took me a couple nights, and I finally gave up on the 5th after blowing through a week of evenings. I went through the same process with all 5 sensors sitting inches away from the hub with brand new batteries that I tested with a meter before using. I eventually got 2 of the hard to pair sensors to connect by repeatedly tapping on the metal switch on the back for about 5 minutes while staring at event logs praying to see the elusive catchall message. If after 5 minutes it failed to pair, I reset the unit by removing the batteries, installing them in the proper order, rinse and repeat. A little over a year later and I also have the same problem with 2 of the 4 that others have described. Specifically 2 of the 4 eventually stop reporting motion but the temperature continues to report. If you remove the batteries (without going through the reset process) motion starts working again. Based on this experience, I am 99% convinced that they have a quality control issue with these particular devices. Those of you having problems are not crazy…you just got bad ones. Those of you who had no issues at all just got lucky.
Since that time, I’ve spent endless hours learning all about electronics and numerous programming languages, in a quest to create my own system including my own end sensors, switches, and other end devices/hubs… I’m an engineer by trade (Chemical not electrical or software) and this has turned into a hobby and never ending quest for more knowledge.
PIR sensors come in two general form factors, adjustable and non adjustable in terms of sensitivity, how long they output a high signal after detecting motion, and ultimately the reset time delay before they will trigger on motion again. However, it is possible to adjust the trigger timing of the non-adjustable variety if you are willing to bust out a soldering iron, like watching how-to YouTube videos, and are willing to hunt down and read datasheets for electronic components.
Obviously not for everyone but for the few of you who might, here is a introductory article on PIR sensors including a discussion on how you can swap out resistors and capacitors to change the trigger time of a non-adjustable sensor https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor?view=all. Personally, I found it easier to just buy a big bag of the adjustable ones to mess around with. I found the best solution is to set them to their fastest retrigger time and write software running on the microcontroller to adjust as needed (e.g. a 2 minute delay for a bathroom light, a 15 minute delay for the garage/workshop both of which get reset to the initial time delay by the software each time motion is detected. As many in this thread point out using webCoRE…software is easier to tweak than hardware but ideally the hardware should have a fast retrigger time for better system response and flexibility.
I have been trying out your code, however maybe i am not understanding the Minimum Active Duration. I have set one of the sensors to be “1”, the sensor still seems to record the motion only once every 3 minutes.
What I am looking to accomplish with these motion sensors is to get close to near motion detection. I am not sure if this is possible still with the code you have written or maybe it is and I am doing something wrong.
Thanks for giving the code a try! What you are seeing is a limitation of the Bosch sensor. For some unknown reason, they created the product so that it will ONLY send an event every 3 minutes at most. So with this particular sensor, you can’t get “sub-3-minute” events …
I’m trying to implement the ISW-ZPR1-WP13 device (mostly to learn more about the zigbee and HA) using some custom code, none of which is related to Smartthings. However, I seem to be running into some issues, similar to ones posted here.
tl;dr: I’d appreciate a full pairing packet trace for when this device is initially enrolled in a SmartThings hub, so I can figure out what I’m doing wrong. Ideally this is from someone who has this device working flawlessly… not one that times out and stops reporting changes at some future point.
It is enrolled properly, and the “walk test” sends proper events to my IAS endpoint I’ve implemented. I also get attribute updates for things I’ve subscribed to. However, after some time it falls out of this “walk test” mode, and sometime later, stops working.
For a while afterwards, I get the normal “alarm1” followed a bit by “alarm 1 clear” zone updates, tamper works, etc. At some point much later (perhaps as long as an hour, or as short as 10 minutes) I get an “alarm1” correctly, but never receive any more messages from this device.
If I tamper it, it goes back into a “walk test” mode for a while, but nothing is being received by my IAS client.
This seems familiar from reading other’s posts: some say it’s working perfectly, some say it isn’t. My current theory is OTA needs to be on (even if there is no firmware for this device) just to make it happy. However, I’m not sure.
This is a fairly strange beast: it actually reports it’s a full function device, which is … odd. Other devices I have to test all properly report FFD or end device.
Hi all - Mine is saying “motion has stopped” one second after detecting motion. Is that normal behavior? I assume if I see “detected motion” followed by “motion has stopped” every 3 minutes give or take while activity is taking place in a room that it’s working as expected? And that I then should be setting lights off timeouts to greater than 3 minutes for any room I use this to turn lights off in yes?