Generic Zwave Vibration, Acceleration, Glass Sensor

When I got an inexpensive vibration sensor from amazon and went to use it with the built in Laundry smart app I realized it wouldn’t work as it registers as a door sensor with open closed. Then I further realized after searching the device types there is NO generic zwave vibration/acceleration device type. I also couldn’t find one in my searches. I apologize if I missed it. Anyway I wrote one.
I tested it with the one I got from amazon and it now works with the Laundry Done smartapp. Previously it appears only the smartthings multi sensor would work for this. I know there is another laundry smartapp that users power metering, but that seems like a pain with a gas or even electric 240 volt dryer.
Anyway here is the sensor I tested:

this:

and it works fine with the laundry done smart app. It displays and reports both as a contact (open,closed) and acceleration (active/inactive)

8 Likes

Thank you very much for this effort. I do not have a need, but I can assure you that others here in the community will enjoy what you have built here. Thank you again

1 Like

Thank you so much for the code. I bought a Mono price shock sensor and it works perfectly.

2 Likes

I’m a bit of a noob when it comes to this, do I copy this code in to “My device handlers”? Sorry if its already pointed out somewhere else…

Thanks!

EDIT- I figured it out - it goes in “My device handlers”.

-Brian

Would this work as a glass detector if I put it on a window?

should work fine for that.

It would pickup the vibration from the “bang” when the crook hit the window to break it. Even knocking on the window, as you would a door will register on this sensor. IDK about this one, but the mono price one I purchased allows the sensitivity to be adjusted. I left mine at the factory setting, as it was fine for me.

Ok good to know. Thanks. I would just worry about hooking it into my alarm system and then having a blast of thunder or a car stereo set off the whole alarm system while I’m gone.

I guess it’s possible.

The sensitivity on this device can be adjusted to fit the need. I have 2 coming tomorrow and will do some testing on a sliding glass door over the new year weekend. I will try to find a way to report the sensitivity to the group.

2 Likes

I cam across a problem with this sensor. So the detection of vibration can be set very light. The vibration can also be set so a harder impact. The problem i have is that the use of ceramics to break the glass is not reported even at the most sensitive settings. with these on patio door (Sliding glass) the wind may set the vibration sensor off at the most sensitive settings, this vibration picks up light knocks on the glass. I hope this helps everyone out. These have plenty of other applications than glass breakage and I use them to detect when my washer and dryer are done on a modern set that are designed for second floor use with very little vibration. Another way I can see them being used is for a safe or gun rack. It would be nice to get these to use text to speech and warn away someone trying to break in.

Great. Want to help another noob? How do you bind a specific device handler to a real physical device - not a virtual device like in the documentation example, but the actual device that paired with your ST hub?

I think I’ve tried every device handler written and I’ve yet to get any of 4 Monoprice Shock Sensors to resister anything with Smartthings other than the setup communication of ‘100% Batter’ ‘tamper clear’ & ‘acceleration inactive’

I can’t even get tamper to show up by opening it. Nothing…

Ok, dumb question but where do you mount this device on a patio door? Clarification, I want to protect a patio door. Do I mount the device on the glass or on the wall near the patio door?

Oven got the same issue. Attempted a couple different device handlers but the Monoprice zwave+ shock sensor just shows battery100 tamper ok and inactive. Is there a functioning device handler for v2 hub? Or firmware update for the device or hub I’m not seeing? Getting ready to return the Monoprice stuff.

Frankly, I chose SmartThings for option of adding code and making these “unofficial” device work. Strike one. Anyone have ideas?

I can’t find the Laundry Smart App, where is it hiding?

you wont it was rermoved, and anyway used a power sensor not a show sensor… here is mine…

Thank you. Now to buy a Monoprice sensor. I hope I have better luck than the last person.

I imagine the device type needs a slight tweek as the configurtation may vary… you will need to look at the logs when an event is coming in and posot the error and i may be able to patch the device. type . As I said i dont have one of those the test with and the ones i have are no longer available…