[OBSOLETE] Monoprice Z-Wave Plus Door/Window Sensor

I won’t be converting the Monoprice Z-Wave Plus Door/Window Sensor DTH into an Edge Driver so it will stop working once the Groovy platform is retired, but it probably doesn’t need a custom driver.

This is a new device handler for the Monoprice Z-Wave Plus Door/Window Sensor, Model: P/N 15270 and it has the following features:

Supports the External Sensor

It has the setting Enable External Sensor which enables the terminals so you can attach an external sensor. When that’s enabled, the device won’t report closed unless the internal and external sensors are closed.

The device reports the same notification for the internal and external events so there’s no way to determine which one trigged the event so you can’t use them independently.

Customizable Wakeup Interval

The device wakes up every 6 hours by default, but there’s a setting for *Minimum Check-in Interval (Hours) which accepts the range 1 to 167. If you set it to 1 it will wakeup every hour and if you set it to 167 it will wake up once per week.

There’s also a setting for Battery Reporting Interval (Hours) which accepts the same range of values.

Having a separate checkin and battery setting allows you to monitor the device, with a SmartApp like Simple Device Viewer, without draining the battery by having to stay a wake for a couple of seconds every time it wakes up.

Supports Tamper Alert

When the cover of the device is opened, it raises the “tamper” event with the value “detected”.

The setting Automatically Clear Tamper allows you to choose whether it raises the tamper clear event when the device cover is closed or if you have to press the “Refresh” button to clear it.

Updating the Settings

When you change the “Minimum Check-in Interval” and/or “Enable External Sensor”, the changes won’t get applied until the next time the device wakes up.

If you’d prefer not to wait that long, you can force it to wake up by opening the device cover and waiting at least 10 seconds before closing it.

If tamper is set to detected and you tap the “Refresh” button, it will raise the tamper clear event. If the tamper is already set to “clear” and you tap the refresh button, the battery and other settings will get refreshed the next time it wakes up.


Great! I just picked one of these up and was planning on using an external connection for it. When I read on the boards that it didn’t work, I put the sensor off to the side. So, this corrects that? It is not an issue with the sensors themselves?

Thanks for creating such a complete device handler and enabling the external contacts. One of the use cases for older models is to turn it into a water detector using the external contacts. This meant using a customized Device Handler for that purpose. Is there a way to adapt your new DTH for a similar purpose?

There wasn’t anything wrong with that feature. The device has a configuration parameter that allows you to enable/disable the external contact sensor and it comes from the manufacturer disabled.

The one line in the manual that mentions it is on the last page instead of the page that explains how to use the external sensor so it’s really easy to miss.

The other thing that has probably caused confusion about the external contact is that when enabled, it won’t raise the closed event unless the normal sensor is closed and the external sensor is closed. Opening either sensor will cause it to change back to open.

So for the external contacts to work, you’ll just have to keep the magnetic part of the switch permanently attached or kept in a closed position at all times. And if either one opens, there is no real way to tell which one actually opened unless you know for a fact that the internal switch is closed.

I’m actually using one of my GoControl/Linear contact sensors as a Water Sensor so that I can use my Simple Event Logger SmartApp to log every time my Sump Pump turns on and off.

If you attach wires to the external sensor terminals and put them in water, they will close the sensor, but I don’t recommend doing that because it takes a while for them to reset back to dry and I have high amounts of iron algea in my water which coated the wires and prevented them from working for more than a few days.

I ended up throwing together a little contraption that keeps everything dry and moves the magnet away from the sensor as the water level rises.

I have another one of those sensors acting as a motion sensor because the external sensor is connected to my Guardian outdoor motion sensor system which detects when someone pulls into my driveway.

The Monoprice Door/Window sensors can be used in the same way, but you’ll probably have to tape the magnet to the sensor because it has to be closed in order for the external contact to show closed.

The list below should cover all the changes that need to be made in order to use the DTH as a Water or Motion Sensor. You should be able to search for the text before > and replace it with the text after >.

Change to Water Sensor

“contact” > “water”
.contact > .contact
Contact Sensor > Water Sensor
“open” > “wet”
“closed” > “dry”
st.contact.contact.closed > st.alarm.water.dry
st.contact.contact.open > st.alarm.water.wet
#79b821 > #ffffff
#ffa81e > #53a7c0

Motion Sensor

“contact” > “motion”
.contact > .motion
Contact Sensor > Motion Sensor
“open” > “active”
“closed” > “inactive”
st.contact.contact.closed > st.motion.motion.active
st.contact.contact.open > st.motion.motion.inactive
#79b821 > #ffffff
#ffa81e > #53a7c0


Exactly. Unfortunately, unlike the Go Control/Linear product, these report the same notification for the internal and external sensor so there’s no way to tell which one was opened.

I picked up one of these awhile back when they were on sale and 15% off with free shipping.

Great work on this DTH.

1 Like

Hi I am a complete newb and trying to install this device handler. When I copy the code I get the following error. What am I doing wrong? TY

No signature of method: script1491694495911147990364.metadata() is applicable for argument types: (script1491694495911147990364$_run_closure1) values: [script1491694495911147990364$_run_closure1@609213c5] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)

It looks like you’re pasting it into the My SmartApps section, but this is a device handler so you need to paste it into the My Device Handlers section.

If that’s not the problem then you’re probably either copying something that’s not code or missing some of the code. To ensure that you get a clean copy and paste, click the “RAW” link on the GitHub page so that the code opens in a new window.

Yes, this fixed it. Thanks a lot.

Once I got over the initial hiccup, this program works great. It was frustrating not being able to get the wire terminals to work. Now they do. Thanks.

1 Like

I figured I would give a little info on this. I tried to use your code to implement the monoprice door sensor as a smoke detector, but I never had any luck. I was able to get it to “act” like it was supposed to,but I could never get the events to be recognized by the smarthome monitor. I was also not able to get the external sensor to get triggered. I have a few of the older monorprice door sensors (not the plus) so I ended up using it instead for my trigger. Thank you for the code, as I am using it for many of my other sensors,I was just not able to figure it out in this one instance.

This DTH doesn’t support the Smoke Detector capability so SHM will only recognize it as a door/window sensor…

To use the external sensor with the zwave plus model you have to enable that option in the settings and you also have to keep the magnet for the internal sensor touching the device because when the external sensor is enabled the device won’t report closed unless both sensors are closed.

Thanks for the response, I was just hoping to get it going as a smoke, since the previous version worked that way. I was also able to get the external sensor working too. Not sure what was going on, but it seemed to take effect after I pulled the batteries and put them back in.

On a completely unrelated subject, have you tried to do anything with the Monoprice motion zwave plus sensor? I think it is close to the other motion that you wrote, go control/linear, but there is also a sensitivity setting on it. I sent Monoprice an email asking if they had any technical document regarding the accepted commands, will have to see what they come back with.

You most likely used some other custom DTH for the others because this one has never supported the Smoke Detector capability.

I only write DTHs for devices that I have

Purchased some Monoprice Z-Wave Plus Recessed Door/Window Sensors #15268 https://www.monoprice.com/product?c_id=122&cp_id=12212&cs_id=1091804&p_id=15268&seq=1&format=2 but having trouble finding a device handler that will work. This thread looked promising but no such luck. Anyone purchase these and get them working?

try this dth

This DTH is customized for the regular door/window sensor which has the ability to attach an external sensor so it won’t work with the recessed door/window sensor.

Ok thanks, do you happen to know of any device handlers which would work?