Device Types / Monoprice Motion Sensors

I’m new to Smartthings and Github. I bought three monoprice motion sensors and added them to my new hub 2.0. Due to some prior reading on the forums I knew I needed to add a custom device type for the monoprice sensor. I did some digging in this forum and found someone pointing a link to Github for one that brings in the motion, temp and battery. With some more digging I figured out how to copy and paste the code into a new device type. Simple enough, but it doesn’t seem to work. The motion works on all three just fine. However, the temps all come in at 171F or 178F. And then only two of them show battery status.

I’ve been trying to do searches on github to find other device types that might work but I can’t find one. Is there an easier way to find people’s custom device types? I just want one that works.

1 Like

@Eidaven, I’ve got several of these working, including just 2 more this morning. Temp and battery will eventually show up, but it’s a PITA. What I’ve done to get this to finally report was to remove the cover for a several seconds, as well as doing that and removing/replcing the battery and putting the cover back on. Eventually all of mine worked as expected.

I’ve used a device type from this community and modified it a little bit for my needs. Here’s what I’m using:

https://github.com/constjs/SmartThings-Devices/blob/master/monoprice_motion_sensor.device.groovy

2 Likes

Thanks. I’m not sure which fixed my problem, the resetting by leaving the cover off for a little bit or using the device type you posted. Either way everything is working.

Although, two batteries are reading 100% and the third one is 66% which is odd since they should all be brand new batteries.

1 Like

@Eidaven, excellent news. I felt the same way you did about these motion sensors and getting them to finally get working. I’m sure they eventually would, but I’m impatient.

I’m assuming the temperature is showing up right? For some reason, the other device type thought the temp reading was in Celsius and was converting to Fahrenheit. That’s why your original temp reading were so high.

I also have a battery reading at 66%, which I assume is like many battery powered sensors in that you won’t get a “real” reading, but more like a range. In other words, 88-100 is ok, 66-87 is acceptable, etc, etc. I’ve also received brand new devices with batteries in almost dead states. Check on your device every day for a while and see what the battery looks like. You may just want to replace the battery.

Also, here’s a nice SmartApp written by a community member that allows you to monitor all your battery powered devices. I use this all the time, and works great. It’s a must have for anyone with a lot of battery powered devices:

https://github.com/constjs/SmartThings-Apps/blob/master/batterystatus.app.groovy

If you need any help with the app, just let me know.

2 Likes

Just curious… Why would you buy this Monoprice Motion sensor that is not natively supported by SmartThings when there are no feature or cost advantages over the SmartThings motion sensor?

@Lojack, there’s a BIG difference in cost. The newest ST ones I just bought were $39.99 and the monoprice ones were $22. If you get the GoControl set from Home Depot, it’s even cheaper. When Best Buy was unloading their PEQ devices they were $19 compared to ST’s at over $40. Both PEQ’s and ST’s were exactly the same, just packaged differently. Even though PEQ’s weren’t officially on their supported list of devices, they worked perfectly and were actually discovered as a ST device.

Granted that the new ST motion sensors are smaller and look better, that’s not what I was looking for. I needed motion sensors in areas that I didn’t care about how they looked. I was looking for function, and the monoprice ones do the job perfectly.

Native support is a very subjective thing. The monoprice ones were easily capable of using ST’s native device type for a zwave motion sensor, and they were using the native device type for a while except temperature wasn’t available. Since I’m capable of writing my own device types, or modifying ST’s to my liking, I don’t have to limit myself to devices just on ST’s supported device list. Additionally, I do a lot of my own support and only rely on ST for major things.

That’s the beauty of SmartThings and the open platform. Since their native device types and custom ones use exactly the same methods for interacting with devices, it doesn’t really matter if my code or ST’s is used - except for local processing with hub v2, but that’s not high on my list right now.

2 Likes

Do you have a link you could share to these cheaper motion sensors?

@Lojack, you bet!

http://www.monoprice.com/Category?c_id=122&cp_id=12212&cs_id=1221201

The motion sensors are back ordered again (happens a lot due to the low price). The open/close sensors are listed this time. Those are well priced too, and use ST’s native zwave contact sensor device type. No custom code needed for those little guys.

This battery minder is awesome. But it is a prime candidate for someone adding the contact book option to it.

@greg,

Done! Good catch on that. I just updated the code in the Github link I posted above.

1 Like

While you are granting wishes, I’ve had the app installed for a few hours and it’s spamming me about one of my batteries that is “low”.

I’m going to adjust the low setting to help, but maybe there should be an option to limit notification to once a day?

This sounds like a dumb question but where do I find the smart app in the mobile app? I added the Github code to a new SmartApp using graph.api.smartthings.com and assigned it to my home Hub, but I can’t figure out where to find it in the app… I’m kind of new to this.

1 Like

Never mind. I figured it out. I had to publish the app first then it showed up under the market place. I’m not really feeling the app too much. It seems like its not very intuitive to the uninitiated. Especially if you need to add any custom device types or smartapps. The average person is not going to spend the time to figure that part out. They’ll send the Hub back before they get that far.

@greg,

;-), done! I haven’t thoroughly tested it, but it should work. The Github code has been updated again.

@Eidaven,

No worries! You’ll see SmartApps in 2 places. Apps you already have installed and running will be in the Rooms view, but to install new ones go to the same place where you’s connect a Thing, except tap on the SmartApps tab. Scroll all the way down to My Apps and tap on that. It’s pretty easy from that point to install and configure your own apps.

1 Like

I’m sorry if I’m highjacking, but I don’t know how to split off the topic. The update didn’t work. I’m getting updates on battery life every time the device (in this case a ST multi) wakes up (door opens). I did input that I don’t want to be notified more than once every 1440 minutes (1day). In related news the AAAA batteries I ordered from Amazon should be here tomorrow.

Are these the exact same as the GoControl devices?

@Jkimrey, exactly the same.

@greg, yeah, I think I was too eager to get code released for you and didn’t do a good job QA’ing. I left important code out of the SmartApp…

I’m travelling at the moment, so give me just a couple days and I can polish this up. Stay tuned…

1 Like

Thanks - I read that the jumper can be set to change sensitivity; do you know if that is the case?

If so, would you happen to know where I can find the jumper settings?

Thanks again.

HI @Jkimrey,

Yup! If you look closely at the circuit board, you’ll see at the bottom 3 places for the jumper. The last one is called Test, and if it behaves like my Ecolink motion sensor (these are actually made by Ecolink), that jumper setting changes the wait state to 10 seconds instead of the default 3 minutes. Here’s more info:

I have not tried any of these settings because I change the time between sensing motion to 1 minute via the Preference of the device type (edit device function) in the app.

5 Likes