[RELEASE] GoGoGate Garage Controller Driver

Ok, I think I got it fixed. Everything is working for me now and it has a lot more error checking added.

I've updated both the parent and the child drivers, so please update both.

And if you didn't notice, there is a transition time setting under each child door device that it creates. This is the time which governs how long it will wait at "opening" or "closing" before updating the result. This prevents it from going closed->opening->closed->open since the GoGoGate doesn't change it's state until the door stops moving. I set that to 45 seconds by default in the driver but I have mine turned down to 15 seconds without any problems.

Please let me know if you have any issues. I won't really be available for the next 24-48 hours but I will check in when I am able.

Thanks,
Matt

1 Like

It seems like your last update hit the spot. The tests I’ve done so far have been 100% accurate and no errors in the logs.
I needed 30 sec for “Door Transition Interval”. I tried 20 at first but got the toggling you mention.

I will keep testing and let you know how it goes. Thank you for all you work with this driver!

Glad it’s working! Please let me know if you run into any other trouble. And thank you for your help on it!

1 Like

Not a problem but I see a lot of sections with multiple "light has change" rows in the log.

image

Looking in the log its always 6 rows and then

Hi ktd,
I'm not seeing the same behavior on my end. If you check the event list for the controller do you see any events where the light is set to "unknown"? (What's strange is I would expect it to log those, too, between the unknown to off messages.)

Basically, the only two ways it gets set to unknown are when the plugin is initialized and when a query to http://-deviceIP-/isg/light.php?op=refresh returns something unexpected. Since none of the URLs are documented by the manufacturer its possible you are getting a response that I've never seen before.

Let me know what you see in the events to see if you see it being set to unknown. If you like I can add some logging to capture the result of the url, as well.

@mgroeninger I replaced my roter today and are setting up a new network.
After updateing the IP to the new GoGoGate2 IP and pressing "Recreate Child Devices", nothing happend.
I unsistalled the parent device, rebooted my Hubitat and reinstalled the virtual parent driver but I still cant get my two doors to be added. I only have the parent driver. Any clues?

UPDATE Just got one of my two doors to be recreated all of a sudden???

You’ve definitely hit on something I haven’t seen. If you set the logging to trace and ty it again, do the logs show anything?

Got this...

dev:5132020-02-24 01:38:08.587 debugGoGoGate2 -- Sensor 1 indicates the temperature is 15.9 °C and the battery level is 40.
dev:5132020-02-24 01:38:08.584 traceGoGoGate2 -- Temperature reported as 15.9 °C
dev:5132020-02-24 01:38:08.576 traceGoGoGate2 -- Converting temp to system scale C
dev:5132020-02-24 01:38:08.572 debugGoGoGate2 -- Raw sensor info is: ["15857","40"]
dev:5132020-02-24 01:38:08.569 debugGoGoGate2 -- Response from GoGoGate 2 was: ["15857","40"]
dev:5132020-02-24 01:38:08.501 traceGoGoGate2 -- Door 1 has returned 0, which indicates the door is closed.
dev:5132020-02-24 01:38:08.494 debugGoGoGate2 -- Raw status info is: '["0","0","0"]'
dev:5132020-02-24 01:38:08.490 debugGoGoGate2 -- Response from GoGoGate 2 was: ["0","0","0"]
dev:5132020-02-24 01:38:08.411 debugGoGoGate2 -- Light status is off
dev:5132020-02-24 01:38:08.407 traceGoGoGate2 -- Raw light status info is: 0
dev:5132020-02-24 01:38:08.403 debugGoGoGate2 -- Response from GoGoGate 2 was: 0
dev:5132020-02-24 01:38:08.345 debugGoGoGate2 -- Refresh tick
dev:5132020-02-24 01:38:08.333 traceGoGoGate2 -- Loop 2 for pollDevice
dev:5132020-02-24 01:38:02.315 debugGoGoGate2 -- Sensor 1 indicates the temperature is 15.9 °C and the battery level is 40.
dev:5132020-02-24 01:38:02.311 traceGoGoGate2 -- Temperature reported as 15.9 °C
dev:5132020-02-24 01:38:02.308 traceGoGoGate2 -- Converting temp to system scale C
dev:5132020-02-24 01:38:02.304 debugGoGoGate2 -- Raw sensor info is: ["15857","40"]
dev:5132020-02-24 01:38:02.300 debugGoGoGate2 -- Response from GoGoGate 2 was: ["15857","40"]
dev:5132020-02-24 01:38:02.221 traceGoGoGate2 -- Door 1 has returned 0, which indicates the door is closed.
dev:5132020-02-24 01:38:02.211 debugGoGoGate2 -- Raw status info is: '["0","0","0"]'
dev:5132020-02-24 01:38:02.207 debugGoGoGate2 -- Response from GoGoGate 2 was: ["0","0","0"]
dev:5132020-02-24 01:38:02.133 debugGoGoGate2 -- Light status is off
dev:5132020-02-24 01:38:02.128 traceGoGoGate2 -- Raw light status info is: 0
dev:5132020-02-24 01:38:02.124 debugGoGoGate2 -- Response from GoGoGate 2 was: 0
dev:5132020-02-24 01:38:02.066 debugGoGoGate2 -- Refresh tick
dev:5132020-02-24 01:38:02.061 traceGoGoGate2 -- Loop 1 for pollDevice
dev:5132020-02-24 01:37:58.363 infoGoGoGate2 -- Battery has changed states from null to 40.
dev:5132020-02-24 01:37:58.052 infoGoGoGate2 -- Battery has changed states from null to 40.
dev:5132020-02-24 01:37:57.717 infoGoGoGate2 -- Temperature has changed from 'null' to '15.9'.
dev:5132020-02-24 01:37:57.462 infoGoGoGate2 -- Temperature has changed from 'null' to '15.9'.
dev:5132020-02-24 01:37:56.948 infoGoGoGate2 -- Door has changed states from null to closed.
dev:5132020-02-24 01:37:56.623 debugGoGoGate2 -- Sensor 1 indicates the temperature is 15.9 °C and the battery level is 40.
dev:5132020-02-24 01:37:56.618 traceGoGoGate2 -- Temperature reported as 15.9 °C
dev:5132020-02-24 01:37:56.614 traceGoGoGate2 -- Converting temp to system scale C
dev:5132020-02-24 01:37:56.607 debugGoGoGate2 -- Raw sensor info is: ["15857","40"]
dev:5132020-02-24 01:37:56.601 debugGoGoGate2 -- Response from GoGoGate 2 was: ["15857","40"]
dev:5132020-02-24 01:37:55.542 infoGoGoGate2 -- Door has changed states from null to closed.
dev:5132020-02-24 01:37:55.514 debugGoGoGate2 -- lastUpdated state value is null.
dev:5132020-02-24 01:37:55.462 traceGoGoGate2 -- Door 1 has returned 0, which indicates the door is closed.
dev:5132020-02-24 01:37:55.456 debugGoGoGate2 -- Raw status info is: '["0","0","0"]'
dev:5132020-02-24 01:37:55.452 debugGoGoGate2 -- Response from GoGoGate 2 was: ["0","0","0"]
dev:5132020-02-24 01:37:55.385 debugGoGoGate2 -- Light status is off
dev:5132020-02-24 01:37:55.382 traceGoGoGate2 -- Raw light status info is: 0
dev:5132020-02-24 01:37:55.378 debugGoGoGate2 -- Response from GoGoGate 2 was: 0
dev:5132020-02-24 01:37:55.321 debugGoGoGate2 -- Refresh tick
dev:5132020-02-24 01:37:55.315 traceGoGoGate2 -- Loop 1 for pollDevice
dev:5132020-02-24 01:37:50.235 infoGoGoGate2 -- Setting wait time to 10 seconds (10000 ms) and will poll 6 times per minute.
dev:5132020-02-24 01:37:50.231 debugGoGoGate2 -- Scheduling polling
dev:5132020-02-24 01:37:50.227 debugGoGoGate2 -- Cookie refresh scheduled.
dev:5132020-02-24 01:37:50.212 infoGoGoGate2 -- Created 1 child devices for garage doors.
dev:5132020-02-24 01:37:50.208 traceGoGoGate2 -- Sensor 3 appears invalid.
dev:5132020-02-24 01:37:50.204 warnGoGoGate2 -- Invalid sensor temperature of -1000.0 °C .
dev:5132020-02-24 01:37:50.201 traceGoGoGate2 -- Temperature reported as -1000.0 °C
dev:5132020-02-24 01:37:50.197 traceGoGoGate2 -- Converting temp to system scale C
dev:5132020-02-24 01:37:50.193 debugGoGoGate2 -- Raw sensor info is: ["-1000000",""]
dev:5132020-02-24 01:37:50.190 debugGoGoGate2 -- Response from GoGoGate 2 was: ["-1000000",""]
dev:5132020-02-24 01:37:50.136 traceGoGoGate2 -- Sensor 2 appears invalid.
dev:5132020-02-24 01:37:50.132 warnGoGoGate2 -- Invalid sensor temperature of -1000.0 °C .
dev:5132020-02-24 01:37:50.127 traceGoGoGate2 -- Temperature reported as -1000.0 °C
dev:5132020-02-24 01:37:50.123 traceGoGoGate2 -- Converting temp to system scale C
dev:5132020-02-24 01:37:50.119 debugGoGoGate2 -- Raw sensor info is: ["-1000000",""]
dev:5132020-02-24 01:37:50.116 debugGoGoGate2 -- Response from GoGoGate 2 was: ["-1000000",""]
dev:5132020-02-24 01:37:50.052 traceGoGoGate2 -- Created child device with network id: 557d64cf-89e2-4a4f-9c81-c0c2c1aa0ab0-child-1}
dev:5132020-02-24 01:37:49.937 traceGoGoGate2 -- Attempting to create child for door number 1.
dev:5132020-02-24 01:37:49.933 debugGoGoGate2 -- Sensor 1 responded with 15.9 °C; appears to be valid.
dev:5132020-02-24 01:37:49.929 traceGoGoGate2 -- Temperature reported as 15.9 °C
dev:5132020-02-24 01:37:49.925 traceGoGoGate2 -- Converting temp to system scale C
dev:5132020-02-24 01:37:49.921 debugGoGoGate2 -- Raw sensor info is: ["15857","40"]
dev:5132020-02-24 01:37:49.917 debugGoGoGate2 -- Response from GoGoGate 2 was: ["15857","40"]
dev:5132020-02-24 01:37:49.863 traceGoGoGate2 -- Creating child devices
dev:5132020-02-24 01:37:49.735 debugGoGoGate2 -- Parent deleteChildren
dev:5132020-02-24 01:37:49.731 debugGoGoGate2 -- Parent recreateChildDevices
dev:5132020-02-24 01:37:49.728 debugGoGoGate2 -- Recreating devices
dev:5132020-02-24 01:37:49.724 debugGoGoGate2 -- Polling unscheduled
dev:5132020-02-24 01:37:49.693 infoGoGoGate2 -- Everything appears to be configured and the HTTP request was successful.
dev:5132020-02-24 01:37:49.687 debugGoGoGate2 -- Basic request to set cookie returned: PHPSESSID=pn1a27uh9uvuelv7hb06v8pvg0
dev:5132020-02-24 01:37:49.387 traceGoGoGate2 -- Refreshing the cookie
dev:5132020-02-24 01:37:49.381 infoGoGoGate2 -- Updating settings...
dev:5132020-02-24 01:37:49.377 debugGoGoGate2 -- Settings updated Feb 24, 1:37 AM

When I hit Recreate Child today, both gates where recreated? Really strange.

I’m glad they recreated finally. It looks like I need to add some trace logging to the recreation code, since it didn’t actually log anything though. Please let me know if you have any other issues!

1 Like

Hi @bob.mergner

As you know I made some very minor changes to your gogogate driver here: hubitat/iSmartGateGarageControllerDriver.groovy at master · scrytch/hubitat · GitHub

With no changes to the code for a while, recently Hubitat is failing with this error:

2020-09-10 04:13:31.810 pm errorjava.lang.StringIndexOutOfBoundsException: String index out of range: -1 on line 131 (doorPollStatus)

Any ideas on how to fix? I'm assuming it happens with your original driver as well?

Couple edits for you that seemed to work.... Looks like they dropped the Colon delimiter and also looks like they changed open to 2.

  httpGet(params) { resp ->
	 	doorStatus = resp.data.toString().substring(1)
	   	doorStatus = doorStatus.substring(1, doorStatus.length() - 2)
	   	int whichdoor = Integer.parseInt(door,16) - 1
	   	status = doorStatus.split(",")[whichdoor].replaceAll("\"", "")
	   	//status = status.split(":")[1]
	   	doorStatus = status
	   
		if ( status.contains("0") && !currentState.contains("0") ) {
		   	sendEvent(name: "door", value: "closed")
			currentState = "0"
	   	}
	   	else if ( status.contains("2") && !currentState.contains("2") ) 
	   	{
		   	sendEvent(name: "door", value: "open")
			currentState = "2"
	   	}
   	}

@mgroeninger could you please start a separate thread for your GoGoGate Controller? It is far superior from the one that started this thread and would really assist anyone in getting their setup working. I really appreciate you building this, but I struggled with the other code until I figured out yours worked better.

Thank you again.

Glad it worked for you and sorry for the confusion! I've refrained from creating a separate thread just so that I don't create more clutter on the boards. It might be time to create a new one, though.

Hope things are going well for you!
Matt

I have recently bought a ismartGate garage door controller and tried to use this driver for hubitat integration. But I get the below error while initialising. Do anyone know how to fix this or is there an updated driver available for this?

2021-12-16 08:00:40.356 pm errorjava.lang.StringIndexOutOfBoundsException: String index out of range: -1 on line 125 (method initialize)

(192.168.50.3/logs#pastdev185)2021-12-16 08:00:39.441 pm infoinitialize() called

Line 125 is ,
doorStatus = doorStatus.substring(0, doorStatus.length() - 1)

@bob.mergner

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.