[RELEASE] GoGoGate Garage Controller Driver

Hi fellow HE owners! I recently purchased a GoGoGate2 Garage Controller for testing and wanted to trigger some scenes when my Garage Door opens, so I've developed a driver for this device. The driver can be found at:

https://github.com/bmergner/bcsmart/blob/master/GoGoGate2GarageControllerDriver.groovy

This is a BETA driver, but I've tested it pretty extensively and had no issues, so I thought I'd release it now. I will be making some changes/additions such as better error handling if the GoGoGate can't be reached,

To use this driver, first add it to the HE using the Drivers Code option. Then, create a virtual device and make it type GoGoGate2 Garage Controller. Once the device is saved, Enter your configuration information (IP, user, password, door number) and save. Then click Initialize. Your door should now be ready for use.

Please note that I only purchased a single door tilt sensor, so I've only test this using Door 1. I plan to grab another sensor so I can test doors 2 and 3.

If you have any issues with the installation or the integration functioning properly, please let me know in this thread and I'll do my best to address the issue.

Regards,

Bob

1 Like

Thank you! I have been working on a driver for a fibaro smart implant to take over for my gogogate, but now i can atleast use this one until the fibare driver is available!
I have two doors, and I will test door #2 tomorrow, just have to clear some stuff leaning to it :wink:

Only thing I don't like with my gogogate is that the sensors are a bit unreliable. Might show closed, but the door is open.

I haven't had any trouble with the one sensor I have (I ordered one for the second door and will install this weekend when it arrives). I spent some time today adding a little to the driver so that you can now get sensor data for temperature and battery level.

I've created a new branch on GitHub with the new features here:

Again, only tested on one door :slight_smile:

Regards,

Bob

Port #2 also working :slight_smile:

so I installed the driver and got it running right away. I was previously using IFTTT as the go between HE and GoGo but now not only can you control a door but you can see the status which is great.

I can add a tile in the dashboard and have full control of the door but when I try and create a rule and pick "Control HSM, Garage Doors, Locks or Valves" I don't have the GoGo Garage door device available in the device drop down menu. Any ideas on why its fully installed and functional yet not showing as a device you can control within Rule Machine?

Hi @bob.mergner awesome work on this and thanks.

Just wanted to let you know I've made very minor adjustments to your driver to support the new iSmartGate and iSmartGate Pro units from Remsol (makers of GoGoGate).

Added it to my repo here - will take it down or adjust if I crossed any boundaries doing this - just let me know.

All tested and working - have door 1 and door 2 functioning.

Thanks,
Shane.

So I figured out that the reason the device was not listed in the device list was due to a missing capability. I added the following line to the code and now the device shows up in the list.

@bob.mergner feel free to add this to your driver

@tdjanke,
I did consider using the Garage Door Opener Capability when I originally wrote this code, however I read in the SmartThings Capabilities Reference that it had been deprecated in favor of the Door Opener Capability so I decided against it. The reference can be found HERE.

I understand that this is NOT Hubitat Documentation, but at the time I wrote this, documentation for Groovy and Hubitat was sparse (generous understatement) so this was the best resource I could locate.

@shane1,

I reviewed your repo, and the way that you modified it is perfectly fine with me, as the file retains the complete creations and modification history.

As far as the Repo, I'm not sure what is best...certainly not two copies. Is there a Hubitat Community Repo we should all be using? I hate the idea of two different versions, or the necessity to keep the Repos in sync. What do you think?

@bob.mergner. I see. Without the garage door capability added through I could not get the GoGo device to show up in Rule Machine when you pick the type of action you want to perform. What action did you pick in order to use the device in RM? Also seems like many drivers have several capabilities listed so I added GarageDoor but didn’t remove Door. Interested if you were able to get it to work in the Apps section without the GarageDoor capability added.

I use the Door - Open action to turn on my Kitchen Table Light in this example:

Bob thanks for this, it really works well.

The only detail is that the status of the device is constantly changing between open/closed, non stop every second.

This is more noticeable when is included on a Dashboard.

Any ideas?

Thanks!!!!

Not sure why that would be the case. All the driver does is poll the door controller for it's current status and reports it back. This status comes from the door sensor, and should match whatever status is shown in the Web UI that comes with the device, because I get my data from the same source as the UI.

Can you open the gogoGate UI in your browser and see what shows there? Also, could you enable logging and post the log entries here?

Thanks,

Bob

Howdy @bob.mergner,

Just added the code and setup the virtual device. Couldn't get any feedback from is and started checking the logs. Every time I hit initialize I see "java.lang.StringIndexOutOfBoundsException: String index out of range: -1 on line 124 (initialize)'. Any thoughts on what I should check? Thanks in advance!

@JazonD,

I'm not sure because the version of the code I'm running here sets a variable to a hard coded string at line 124, which generally wouldn't generate that type of error. Did you use my code or the recently posted iSmartGate code posted by user shane1?

In any event, you can double check that you've entered all the preferences and that the values are correct, and click the save preference button. If that doesn't work, paste a copy of the version of the driver that you're using and I'll see if I can figure out what's going on.

EDIT: I just looked at the code I've linked in the repository and realized that I made a change here that I didn't post that caused my line numbers to be out of sync with the code I posted on GitHub. Looking at the GitHub code this would appear to be a missing or incorrect preference parameter so again, double-check that please.

In general, the type of error you received COULD be caused by a couple different things. One is a missing preference, while the other common reason is an unexpected response from the device. I haven't put a ton of error trapping in the code so far, because it's always worked for me as long as the preference values are completed AND correct, and the device is online and communicating properly.

Let me know how you make out.

Regards,

Bob

@bob.mergner,

Awesome, thanks for the follow up. This morning I cleared both of virtual devices out, and deleted the driver. I started over with the updated driver that includes sensor data -

https://raw.githubusercontent.com/bmergner/bcsmart/Sensor-Update/GoGoGate2GarageControllerDriver.groovy

And then recreated my first device for bay 1 -

Opened a logging tab and clicked Save Preferences -

And I did double check the service is up (IP and U/N confirmed) -

I agree with you, it appears to not be capturing my inputs. That said, when I navigate away from the device and return to it all of variables are there. Am I formatting something wrong causing a variable to break?

Thanks for the assist!

@JazonD,

Can you add a couple lines to your driver code temporarily?

After line 113, please add the lines:
log.info "Response: ${resp.data.toString()}"
log.info "Response: ${resp.headers.toString()}"

After line 139, please add the line:
log.info "Response: ${resp.data.toString()}"

The first changes should show us if you are getting a good login to the device. The second one is to see what the response is to the query where you are getting the error.

Let me know what you get.

Regards,

Bob

@bob.mergner,

Code in place -

Refreshed my logging screen, then hit save preferences on the virtual device -

Aside from moving the error line down 2 rows, it didn't capture anything new, can I assume that means something is breaking down earlier chronologically?

@JazonD,

Sorry, my code is not in synch with yours so I got the line numbers wrong. Here is where you should put the debug lines (circled in yellow):

I'm sorry it took so long for me to respond...I'm building a greenhouse and vertical aquaponics system with my son and it's quite labor intensive and time consuming.

Regards,

Bob

@bob.mergner,

No need to apologize, sounds like cool project honestly :slight_smile:

Ok, error logging is working and it shows interesting feedback -

A single whack for a user name and a single character for a password. I wonder if the length of my password (25) is causing issues?

EDIT: Just intentionally typed a different (and incorrect) U/N and P/W to see of it changed the characters in the U/N field in the logs, no difference.

EDIT #2: Just setup a new U/N and P/W for testing that only had a 12 character P/W. Worked like a champ. Apparently the 25 character P/W caused it heartburn.

Thank you for supporting this code, the community, and working with me on this. :+1: