nicoduj / homebridge-gogogate2

Homebridge Gogogate 2 plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gate Status Hangs

cargueta001 opened this issue · comments

8AD523A9-6D52-4764-8FD6-E60DB4097EE5

Gate Status hangs occasionally and requires restart of Homebridge to update properly. Gogogate2 App shows correct status constantly.

1946CF5E-9009-429E-9AC1-5EC62071C358

Here is my config file. This is applicable to both Opening and Closing status. I have altered the time intervals to see if that would help but that has yielded the same results. I will mention also that my gate has a photobeam safety sensor that monitors obstructions. By default my gate circuit board has a auto close to 60 seconds.

Ok thank you ! Will try to reproduce, if you could post homebridge log in debug mode it would be perfect :)

Ans by the way : you are operating the gate through home app directly or through some automation and just checking its status ? I suppose if you close the app and reopen it the status is ok then ?

No, thank you! This plugin is the only reason why I purchased the Gogogate2 to begin with!

I strictly rely on the Home app for access but I resort to the Gogogate2 App when the hanging begins and I need to open/close the gate. I have a Home app location based automation to open the gate when I arrive home and that is a hit or miss for me unfortunately. I tend to force quit the Home App occasionally to see if the status has changed but it does not make a difference.

B66A2B0C-43C1-4472-B245-5DA6AA2A8143
3549DD46-DAFC-47C8-AA8D-7D131C719B9D

Here are my debug logs. Hope that helps!

@cargueta001 Sorry, I misread this on my phone. will check deeper this week end, If I correctly read your log you opened then closed your door (open at 6:43:33 and close at 6:43:46 ? ) It was detected as opened at 6:43:43 and closed at 6:45:06 . So the logic seems ok, and you confirm that it stays in opening or closing way, correct ?

I am also planning to move this plugin to dynamic platform so it doesn’t hang homebridge startup in case of Gogogate reach ability problem.

By the way I use Siri to open / close (with car play) the trick is to have a dummy switch that interacts with the door if you don’t want to Siri to ask you to pick the phone :)

@cargueta001 can I ask which version you were on previously and that was not having this issue ?

And to be sure, does it always happen or is itonly sometimes ? The log your provide is when you had this problem, or it worked ok this time ?

Yes, the timer is set to 60 seconds to automatically close the gate on the circuit board of the gate. So, when the gate is opened and let's say I hit the button again in the Home App to stop the process to close the gate is when the status becomes out sync. This also happens randomly for both opening and closing, as if it can't catch up to the commands given. I know that my other tenant is using a physical gate opener and she may be closing the gate before it fully opens as if to prevent the gate from opening all the way for a car. She uses it as a doorway unfortunately.

The last build that appeared to work was 0.1.2 and perhaps 0.1.3. The log I provided previously is when it was not working. I've attached another log from this morning as the issue happened again this morning. I have to reboot Homebridge in order for the hanging to stop.

4856EF3B-AFA8-4106-BB73-2E211FE0C913

Thank you. There is no command sent in your last log, does that mean that upon homebridge restart you add this issue without operating the gate through HomeKit ?

When I have this issue, I simply restart Homebridge so that it reflects the proper status. After several hours, around the time people start arriving home is when the issue begins. In the past, I've had a login issue appear in the logs and that required rebooting my raspberry pi in order to resolve the login attempts. As of right now, the status is closed which is accurate based on the Gogogate2 App.

9447BBE0-5A86-4F2C-B0B3-CA35415A5C32
B2D2D347-5F44-4F0A-8677-E45962B38E44

I also have the dummy switches setup in my config file to simplify the process in hopes that it would help but unfortunately the same problem occurs.
C37D27AE-7DC6-4A93-9E73-879C75E8FE9D

Ok, i am not sur i completely understand your setup, but will try to reproduce . Be aware that in case of power loss of Gogogate and wireless sensor, the status in the app is not good at reboot

Sent with GitHawk

I tried getting back home and had no issue. What I can do is to put maybe a bit more logs in a new version to narrow your issu, sorry . Will take some time to go through the code / your logs also and see if I have any clue.

I just think at something, since you have location based actions : is there any chance that the location based tirggers while a manual operationis in progress (because it wasn't triggered while you arrived, but some times latter ?) . Maybe you could try without those location based actions to see if it is the problem ?

I will go ahead and remove the actions but to my knowledge, they worked in prior versions of the code. The issue began again this morning when people were leaving and the gate had been opened and closed a few times.

Is there a pause state possibility? For example, if I say "Hey Siri, open gate switch", the gate will open, but if I say immediately after "Hey Siri, close gate" will that cause problems?

As I said in the readme, I made a lot of refactoring in the latest version (in order to prepare to dynamic platform), so there can be some issue but it is difficult to narrow it since it works. It can definitely be linked to something like 2 commands sent while operation in progress, i will try to test such things but since every setup has its "specificit" sometimes it can be difficult to reproduce without a step by step guide ....

If you don't have time to help me debug this, you can safely go back to previous version, i will perfectly understand !

I will gladly help debug as you suggested. I'd like to understand the root cause as well.

I have removed the location based automations in the Home app. Like you said, it seems like it's connected to multiple commands while in progress. Would you advise changing anything in my config file?

1

2

3

Here are the latest logs. I altered the automations prior to these logs so they are purely setup by manually selecting the Open Switch.

It continues to show "Closing" and repeats the last log.

in your last log the status got from gogogate is strange, you got a "." and not a FAIL (closed) or OK (open).

and I don't see any wireless sensor logs, are you using a wired sensor ?

and I see you've got 2 switches activated (arrived home / opengate), are they not both triggering something on the gate ?

@cargueta001 I just saw your config and think there is a mistake in it : you must not add the trailing s in timers.
Should be something like this :
"refreshTimer" : 30,
"maxWaitTimeForOperation" : 45,
"refreshTimerDuringOperation": 5

not sure it is an issue but still it can explain the non ending loop on timeout in your log.

Yes, I am using a Wired Sensor. The second switch is to deactivate the alarm security system.

The "Scene" is able to activate the "Arrived Home" but the "Open Gate" results in a hanging status.

I will adjust the config file and monitor the actions. Thank you for your persistence Nicolas 👍🏻

91F8DC0E-EBB7-4D28-B135-6B9E1DF82D6A
F7A6B4E9-74D0-409D-92FC-5FD8874C2611

This is now with the adjusted config file. And without any trigger, I'm still receiving an endless loop.

yes, but this one is normal (refresh every 30s)
and the status is ok this time. Can you trigger ?

I am publishing a new version, I made some changes around your issue, let me know after update if you still have the issue. There is a bit more log also so that I can have more information if the issue persists

@cargueta001 : the update is available

Thank you Nicolas. I have updated and will test the build shortly.

Here are my latest logs:
35A20DEE-C0E6-494B-B3EB-ED231C805C36

@cargueta001 Hi, how is testing going on ?

Hi Nicolas, THANK YOU THANK YOU THANK YOU!

I did some extensive usage on the plugin this weekend and also had my wife report no problem within the Home app. I meant to write back yesterday with an update, however, I wanted to see the usage this morning as well. Everything updates accordingly and I haven't had the need to restart Homebridge!

Were the changes to the code substantial? I'm really looking forward to the new beta plugin but will patiently wait as I just got this one working successfully. Thank you once again.

Hi Nicolas, THANK YOU THANK YOU THANK YOU! ...

@cargueta001 great ! Happy to have solved this one :) Enjoy, I will test the beta myself but not planning to release it until I have linked my second door (not so many users on this plugin so feedback will be more difficult to have I guess)
And no, changes were not so important just a problem I think in some case of disconnection by the Gogogate and error handling mainly. But as always, finding the bug takes far more time than fixing it :)

Sent with GitHawk