MimoLite Garage Door Controller

I have a set up a Mimolite to open and close a garage door. A switch on the door tells Mimolite the current door status (open or closed). I have ‘MimoLite Garage Door Controller’ set as the device type. In the ‘Things’ menu I can read the current door status as well as open and close the door. Next I set up a Routine to turn on the garage light and open the garage door. In the routine I have selected ‘Open or Close Garage Doors’. It then asks which Garage Doors to open or close. Unfortunately, the MimoLite device doesn’t show, so no way to select it. Any idea why or how to fix it?

@RonB,

For some reason the IDE doesn’t bring up the device type code when I try to look at it, or even to create my own device type, so I’m going off of memory in my reply. I recall on another thread on this same subject that ST’s device type is missing a particular capability that allows it to show up in Routines. Your only options are to create your own device type (copying ST’s code for the base) to add that capability, or to use a Community developed device type.

You can find discussions about Routines and garage door control, as well as the custom device type I wrote, in these threads:

https://community.smartthings.com/search?q=mimolite%20routines

Thanks you for the rapid reply. I tried taking the source code and pasting it in a blank Device Type form, but that generated several errors. Obviously there is more to the process than a simple C&P. I seem to remember that there is a thorough tutorial some place in the ST documents on how to do this, but can’t find it. Any idea where this info is located?

All is well now, well sort of. Apparently the code I picked up on my first try was incomplete. I found a new ‘raw’ file of V2 and it compiled without errors. I then changed my device type to the new one and tested it from the ‘things’ device listing. Worked OK. Unfortunately, it still doesn’t show in ‘Routines’, so I’m back to square one.

The most current version is v3, and it’s the one that works with routines. You can find it in post 45 in this thread:

Here’s the raw link to the code:

https://raw.githubusercontent.com/constjs/SmartThings-Devices/master/mimolite_garage_door_v3.device.groovy

Thank you for the update. Unfortunately, when I try to compile V3, I get the following errors. Admittedly I am in way over my head so any further help you can provide would be greatly appreciated.


Org.springframework.dao.DuplicateKeyException: a different object with the same identifier value was already associated with the session: [physicalgraph.device.CapabilityDeviceType#physicalgraph.device.CapabilityDeviceType : (unsaved)]; nested exception is org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [physicalgraph.device.CapabilityDeviceType#physicalgraph.device.CapabilityDeviceType : (unsaved)]

When I compile V3 I get an error. I tried to post the whole thing, but it was tagged as spam for some reason. Here’s the first line of the error: ‘Org.springframework.dao.DuplicateKeyException: a different object with the same identifier value was already associated with the session’.

I understand what it says, but don’t have any idea how to fix it.

Hi @transco, there’s a line of code that causes this issue for some folks, so I just removed it. Could you please refresh your code with my updates? The link above is still good. Let me know if that works for you.

Oh so close! The code now compiles without error. The device is now available in Activities. Click on the ‘Open’ activity and the door opens. Do it again and nothing happens; i.e. the program knows the door is already open so doesn’t pulse the MimoLite again. All perfect to this point (thank you!!!).

Next I tried a ‘door close’ activity, but nothing happened… the door remained open. I then went to the ‘things’ menu and it said 'Garage door is ‘OPEN’ (tap to close). I tapped it, and the door closed. Status changed to ‘CLOSED’. So this part works as well. I’ve got to go back to the beginning of this thread as well as study the code to see why the ‘Close’ activity fails while every thing else is working. You and I must have slightly different hardware setups.

I see you have a ‘Switch’ and a ‘Contact’. What’s the difference? How are they being sensed? FYI, I have a single switch connected to the MimoLite input. The switch is Open when the door is open, Closed when the door is closed. Here is what your driver reports:

  1. When the door open: Switch: ON, Contact: OPEN, Door: CLOSED
  2. When the door is closed: Switch OFF, Contact: CLOSED, Door: CLOSED

So this shows why the ‘Door Close’ activity doesn’t work. The question is why, ‘Things’ show the correct state of the door, but the ‘Current Status’ shows it always closed.

@transco,

Those 2 capabilities allow your device to be “found” when a SmartApp is looking for a device based its capability. For example, if you installed a SmartApp that was looking for switches, this one would show up and certain things would happen in the SmartApp based on that device.

For the MIMOLite (as a garage door opener), the contact state is either open or closed, and the physical switch should always be off (assuming you set the jumper to the correct position - momentary, and not latched). It will briefly turn “on” when the driver sends the on command, but the jumper setting almost immediately sets the device back to off. That’s why my device type always send the zwave on command, and not the off command. I manually set the switch state via the device type, but the actual switch doesn’t.

I’ve reliably been using this device and device type for a very long time, but not in Routines. I’ll experiment more tonight with Routines to see how it behaves.

@transco, for some reason no matter what I do, I can’t get a Routine to work with this anymore. The Routine will log events, but the device doesn’t get kicked off and I don’t even get basic logging. This is very odd because this was working at one time.

It’s also very weird that when I go back into the Routine to edit/delete it, I get the error in the log “DOES NOT RESPOND TO CHILD UNINSTALL HANDLER”. It’s also very odd is that if I try to create a new device type “from template” and select the mimolite garage door controller, nothing happens and the code isn’t there. I can see the code here:

https://raw.githubusercontent.com/SmartThingsCommunity/SmartThingsPublic/master/devicetypes/smartthings/mimolite-garage-door-controller.src/mimolite-garage-door-controller.groovy

ST’s device type has changed, so I’m going to have to take a look at it and mine to incorporate their changes; but more than likely use ST’s as the basis to build upon. Hang on for a couple days. I’m super tied up at work right now, but I can get to this throughout the week and let you know when I have something back up and running again.

Sorry, I’m a bit confused. By ‘physical switch’ your are referring to the MimoLite relay? I have the strap removed and the relay remains energized for only a few seconds, but, if the door is open, ‘Switch’ status remains ‘On’ and will not turn ‘Off’ until the door is closed . It is not following the state of the relay.

Something changed with ST’s device type that I modeled this after a while back, and now mine needs updated. I’m working on that right now.

I’ve already taken ST’s code and added the capabilities that allow it to show up in Routines for just a simple and basic test. Their default device type “MimoLite Garage Door Controller” doesn’t show up in Routines. Unfortunately, my simple test didn’t work with just their basic code… Frustrating to say the least.

I’m not going to spend too much more time on figuring out why this doesn’t work in Routines because I figure ST will eventually get around to getting fixed anyway; plus with the Rule Machine SmartApp, I can do what I want in that app a lot better.

Ok, here’s ST’s version that’s been updated to use the new formatting with app 2.0. It’s 98% all ST’s code, but it just looks better in the new app:

https://raw.githubusercontent.com/constjs/SmartThings-Devices/master/My_MimoLite_Garage_Door_Controller.device.groovy

While this does not resolve issues on why it doesn’t work in Routines, at least it looks better, and it used ST’s refreshed code. As I mentioned above, try our Rules Machine if you haven’t yet:

John -

The ‘Rules Machine’ is fantastic. In fact I have abandoned my previous approach and am now using it. FYI, what I am actually controlling is a gate some 100’ or so from the house. Unfortunately there were only two wires coming from the gate controller (located at the gate). It wasn’t practical to pull more wires, so I had no way of getting status information from the gate controller back to the MimoLite. Moving the MimoLite to the gate controller didn’t work… not enough signal. I ended up using a Ecolink Door Switch hardwired to a dry contact pair on the controller relay to transmit the open / close info from the gate back to the house. Not wanting to dig onto the software, I used another MimoLite as a receiver, then connected that to the Mimolite that was used by the Garage Door program. This also allowed me to flip the status which came from the controller as ON = Gate Open. Yes, crude, but it did the job. Anyway, by switching to the Rules Machine I could eliminate the 2nd Mimolite.vv

2 Likes