Mimolite for garage door and magnetic door contact

Is anyone else still waiting for a solution for the Mimolite garage door relay using the magnetic door contact switch? Since there was no response I got tired of waiting and created my own device type that works the way I thought it should. If you are interested in the code let me know or if someone can let me how to post code I will post it here.

@mb323, I wish I would have seen this thread earlier because I wrote one a long time ago that I’ve been using that I could have shared. It uses the magnetic contact similar to post #3 above, and it also notifies if/when the mimolite looses power.

The tile in my device type actuates the mimolite to open/close the door, but it doesn’t reflect the state of the door, so I created a virtual device based off the open/close state. Does your device type show the open/close state as well as actuate the door in one tile? If so, would you mind sharing?

@johnconstantelo, Thanks John, not having a starting point probably helped me. I had to read all of the device type docs. Now I am moving on to ISY-994 and Insteon devices.

Yes, my tile in device type actuates the mimolite and displays the open/close state of the door. So far no issues. It can also be added to the Doors and Locks collection as a Garage Door and works there with notification. So far it even reflects the correct status on refresh however I left out the power state.

I started yesterday and finished today so no guarantees but so far it is working the way I want it to work. This also assumes you have the jumper set to momentary as I don’t handle the on/off state of the relay, I treat it as a momentary switch.

I don’t mind sharing, how do you post code here?

If you guys want we can take the best of the bunch and post it to ST for update. I’m sorry about not seeing that the mimolite code was not showing up in the templates. I’ve been so crazy busy over the holidays.

So what do you want to do next?

@mb323, thanks Mark. Sounds like ours is almost the same except the tile. That’s what I’ve been trying to learn how to do. I’ve set up a Github repository where I keep my ST stuff. Here’s my device type:


You can do something similar, or copy/paste the raw code (can be ugly though). My code is quite crude as I am certainly no developer (a long time ago, yes…).

@wackware, no worries about your code. I know you’re quite busy. I bet between all of us that have some bits and pieces of code we could come up with 1 device type to include momentary, contact, and power states. I’d be willing to take a shot of combining things as long as there’s someone willing to clean up behind me.

@johnconstantelo, GitHub, your certainly ahead of me, I’ll try posting here and see how that goes. I figured out the tile stuff, the hard part was figuring out how to get the device to show up as a garage door switch, I assumed “Door Control” was necessary but turns out it was switch. I also ignore the relay state and only display the sensor state since that was all I was interested in. It would be easy to add it as a secondary tile.

Same here, was a developer a long time ago, now it’s just a hobby again. Mine is crude, I just wanted to get it working, I’m too lazy to change batteries.

@wackware, no worries, it was just the motivation I needed to learn how to make a device. I need to integrate this with my existing home automation anyway.

LOL, I think I figured out how to post code, it’s the pre-formatted text option. It also took me a full day to figure out the “publish” wasn’t instant, it takes several minutes before the changes show up. I was making changes only to have them show up much later after I assumed it didn’t work.

 *  MimoLite Garage Door Opener and Sensor
 *  Author: mb323@me.com
 *  Date: 2015-01-03
metadata {
	definition (name: "MimoLite Garage Door Opener and Sensor", namespace: "mb323", author: "mb323") {
		capability "Door Control"
		capability "Contact Sensor"
		capability "Momentary"
        capability "Switch"
		capability "Refresh"
        //0 0 0x1000 0 0 0 9 0x72 0x86 0x71 0x30 0x31 0x35 0x70 0x85 0x25
        fingerprint deviceId:"0x1000", inClusters:"0x72, 0x86, 0x71, 0x30, 0x31, 0x35, 0x70, 0x85, 0x25"

	// simulator metadata
	simulator {
		status "on":  "command: 2003, payload: FF"
		status "off": "command: 2003, payload: 00"

        // reply messages
		reply "2001FF,delay 100,2502": "command: 2503, payload: FF"
		reply "200100,delay 100,2502": "command: 2503, payload: 00"

		// status messages
		status "open":  "command: 2001, payload: FF"
		status "closed": "command: 2001, payload: 00"

	// tile definitions
	tiles {
	    standardTile("contact", "device.contact", width: 2, height: 2, canChangeIcon: true) {
			state("unknown", label:'${name}', action:"refresh.refresh", icon:"st.doors.garage.garage-open", backgroundColor:"#ffa81e")
			state("closed", label:'${name}', action:"door control.open", icon:"st.doors.garage.garage-closed", backgroundColor:"#79b821", nextState:"opening")
			state("open", label:'${name}', action:"door control.close", icon:"st.doors.garage.garage-open", backgroundColor:"#ffa81e", nextState:"closing")
			state("opening", label:'${name}', icon:"st.doors.garage.garage-opening", backgroundColor:"#ffe71e")
			state("closing", label:'${name}', icon:"st.doors.garage.garage-closing", backgroundColor:"#ffe71e")
		standardTile("refresh", "device.contact", inactiveLabel: false, decoration: "flat") {
			state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"

		main ("contact")
		details(["contact", "refresh"])

def parse(String description) {
	def result = null
	def cmd = zwave.parse(description, [0x20: 1, 0x84: 1, 0x30: 1, 0x70: 1])
	if (cmd) {
		result = createEvent(zwaveEvent(cmd))
	log.debug "Parse returned ${result?.descriptionText}"
	return result

def sensorValueEvent(Short value) {
	if (value) {
		createEvent(name: "contact", value: "open", descriptionText: "$device.displayName is open")
	} else {
		createEvent(name: "contact", value: "closed", descriptionText: "$device.displayName is closed")

def zwaveEvent(physicalgraph.zwave.commands.sensorbinaryv1.SensorBinaryReport cmd)

def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd) {
	[name: "switch", value: cmd.value ? "open" : "closed", type: "physical"]

def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd) {
	[name: "switch", value: cmd.value ? "open" : "closed", type: "digital"]

def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd)

def zwaveEvent(physicalgraph.zwave.Command cmd) {
	// Handles all Z-Wave commands we aren't interested in

def push() {
	zwave.basicV1.basicSet(value: 0xFF).format()

def open() {

def close() {

def on() {

def off() {

def refresh() {

@johnconstantelo, John, let me know if it works for you, this is my first device.

@mb323, sure Mark no problem. I’m mobile right now, but as soon as I can I’ll try your code.

@mb323 and @wackware,

Ok, I got the mimolite device type working exactly the way I like:

  • Open/close state and actuate are now on the same tile
  • Power failure indicator tile included
  • Configure tile subscribes to power alarm for proper indicator status
  • Basic logging, and cleaned up code a bit


Lastly, here’s the code: (updated 2015-02-16)



@johnconstantelo John: Got it working great - thanks for sharing your code. The only problem I have is the status is backwards - IE: displays open when the door is closed and displays closed when the door is open. I was going to alter your code to just swap open and closed, but maybe I’m missing something simple. I used a magnetic contact sensor similar (if not identical) to the one you linked.

Hi @Schenley, you could make a code change, or just swap the NO/NC wires around on the magnetic sensor, or on the mimolite terminals. My magnetic sensor has three wires, and I have it set up as normally closed. I’m not around my house right now, so I can’t check what color wires I’m specifically using.

Thanks for the reply. I installed a second one for my other garage door, and it’s working fine - so not sure what the deal is. It is possible one of the sensors is NC and the other is NO. I did try swapping the wires at the MimoLite already to no avail, but I’ll check on the sensor side.

@johnconstantelo John: Got it working. Short story is my sensor was already wired to my previous automation system and I cheated a bit and routed the cabling to the MimoLite. There were three wires on the sensor, in hindsight, one was NO and one was NC. I’m all good now - deleted the SmartThings MultiSensors I was using, and increased the WAF because instead of 4 tiles, we now have 2.

Thanks again!

1 Like

If you have an roll up garage door I would recommend this new device http://www.lowvoltagesupply.com/category-s/1841.htm

Thanks to everyone who worked on this device type. I got it working, and it’s really great.

Is there any way to set up a push notification / text message when this thing loses power? I’m asking because it happens to be on the same circuit as my freezer, and this breaker has tripped in the past causing a lot of food to go bad. It would really be a life saver.



First off, thanks for your help this afternoon getting the MIMOlite back onto my hub.

I’m attempting to use your code for the garage door opener / sensor as referenced in "memolite_garage_door_v2.device.groovy. I’m using a Potter Model ODC-59A magnetic switch and have wired it as the ForgrezZ diagram and as referenced previously.

The momentary contact switch works perfectly. However, I’m having the same problem I’ve seen in several posts now… the OPEN tile doesn’t consistently indicate open when I open the magnetic sensor. Similar with the close indication. Also, nothing happens when I tap on Config.

Any help would be appreciated.

Hi David,

When you tap on Config, all it does is configure settings on the device so you won’t see anything. What that does is allow power failure notifications to be sent to ST.

Are you getting any open/close updates at all?


Thanks for the response. You apparently are THE MIMOlite guy.

After playing with the app for a day now, It seems it’s 95% there. I have a mockup on my workbench with the open/close sensor hooked to the MIMOlite. The sensor is a NC magnetic sensor, just as shown in the diagram by FortrezZ.

If I begin with the magnetic sensor in the closed position (magnet at sensor), and the APP is indicating Door Closed, when I “open” the sensor, the APP indicates OPEN with a few seconds, which is exactly what I want.

However, if the sensor is then put into the CLOSED position, the APP initially indicates CLOSED, then a second or two later, goes to OPEN. However, at some point after that, (seems like about 2 to 5 minutes), the APP will show CLOSED — as it should. So whatever is going on, only happens for a few minutes upon initially closing the door. I can live with that. The most important thing to me is to know when the door OPENS on a consistent basis. The APP seems to be doing that; just has a little bit of a glitch when the door closes, but eventually, it will show the CLOSED state — and seems to to stay that way until the door switch really is opened.

One other question… what if I wanted to have a push notification when the door opens? Easier to do this with a smartapp or put something within your code?

Thanks again…


@Flightrider Hey Dave,

No worries, but trust me, there are a lot smarter people in this community!

What you could be seeing are just delays between the phone app, the device, the hub, and ST’s cloud, maybe. I just double checked mine a few minutes ago and OPEN and CLOSE were relatively instant. Just keep an eye out in the device’s event log and app as well.

If you want a notification or SMS message when ever the door opens or closes, set it up in the Dashboard under “Doors & Locks”. You can tell ST to send you a notification or SMS message, or both, for when it opens or closes. There are also a few other options to restrict that to certain times, days, and modes.

Do you have a Doors & Locks section in the Dashboard? If not, go into the app and scroll all the way down to the “+” and swipe over to Alerts. Select Access & Entryways and then select the first option. Make what ever choice you’d like and the new Dashboard element will show up.

Hope that helps!

  • John

Thanks John…

All of this is good news. I enjoy tinkering around with these things, although the last program I wrote was in FORTRAN (a long time ago). I have a vacation home that I’ve set up a hub at. I monitor video cameras and currently have about 11 things “smartanized”. I plan on also using the MIMOlite device handler you guys developed for the main water valve control valve; leak detection, etc. And, the Arduino with shield to control the a small sprinkler system.

Have a great weekend.