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:
https://github.com/constjs/SmartThings-Devices/blob/master/mimolite_garage_door.device.groovy
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)
{
sensorValueEvent(cmd.sensorValue)
}
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)
{
sensorValueEvent(cmd.value)
}
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() {
push()
}
def close() {
push()
}
def on() {
push()
}
def off() {
push()
}
def refresh() {
zwave.switchBinaryV1.switchBinaryGet().format()
}
@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
Requirements:
- mimolite needs to be set up as a momentary switch before inclusion (remove the jumper)
- magnetic door contact sensor installed similar to this one : http://www.amazon.com/gp/product/B000Q64NS8/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1
- Configure tile tapped to make sure the device sends power alarms to the device type

Lastly, hereās the code: (updated 2015-02-16)
https://github.com/constjs/SmartThings-Devices/blob/master/mimolite_garage_door_v2.device.groovy
@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!
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.
Thanks!
John,
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?
John,
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ā¦
Dave
@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.
Dave