ratgdo / esphome-ratgdo

ratgdo for ESPHome
GNU General Public License v2.0
310 stars 79 forks source link

Door Controls mostly not working #151

Open muhlman opened 5 months ago

muhlman commented 5 months ago

I am having an issue where the door controls (up/down/stop/toggle) don't work 95% of the time. I hit the toggle and nothing happens, but eventually one will go through and work as expected, theres no real set pattern I can find other than it seems to take at least 5 presses for it to work usually more.

All of the other controls work as expected, light, motion status, obstruction etc. its just the door controls that are sporadic.

Some of the logs captured from non working commands are:

Time    level   Tag Message
19:38:49    [D] [button:010]    
'Toggle door' Pressed.
19:38:49    [D] [number:012]    
'Rolling code counter': Sending state 320.000000
19:38:52    [D] [esp8266.preferences:238]   
Saving preferences to flash...
19:39:28    [D] [button:010]    
'Toggle door' Pressed.
19:39:28    [D] [number:012]    
'Rolling code counter': Sending state 321.000000
19:39:33    [D] [esp8266.preferences:238]   
Saving preferences to flash...
19:40:08    [D] [button:010]    
'Toggle door' Pressed.
19:40:08    [D] [number:012]    
'Rolling code counter': Sending state 322.000000
19:40:13    [D] [esp8266.preferences:238]   
Saving preferences to flash...
19:40:13    [W] [component:214] 
Component preferences took a long time for an operation (0.06 s).
19:40:13    [W] [component:215] 
Components should block for at most 20-30ms.
19:40:18    [D] [button:010]    
'Toggle door' Pressed.
19:40:18    [D] [number:012]    
'Rolling code counter': Sending state 323.000000
19:40:22    [D] [esp8266.preferences:238]   
Saving preferences to flash...
19:40:22    [W] [component:214] 
Component preferences took a long time for an operation (0.06 s).
19:40:23    [W] [component:215] 
Components should block for at most 20-30ms.
19:40:27    [D] [button:010]    
'Toggle door' Pressed.
19:40:27    [D] [number:012]    
'Rolling code counter': Sending state 324.000000
19:40:27    [D] [esp8266.preferences:238]   
Saving preferences to flash...
19:40:27    [W] [component:214] 
Component preferences took a long time for an operation (0.06 s).
19:40:28    [W] [component:215] 
Components should block for at most 20-30ms.
19:40:37    [D] [button:010]    
'Toggle door' Pressed.
19:40:37    [D] [number:012]    
'Rolling code counter': Sending state 325.000000
19:40:38    [D] [esp8266.preferences:238]   
Saving preferences to flash...
19:40:38    [W] [component:214] 
Component preferences took a long time for an operation (0.06 s).
19:40:38    [W] [component:215] 
Components should block for at most 20-30ms.
19:42:27    [D] [ratgdo:210]    
Status: door=CLOSED light=OFF lock=UNLOCKED
19:44:15    [D] [button:010]    
'Toggle door' Pressed.
19:44:15    [D] [number:012]    
'Rolling code counter': Sending state 326.000000
19:44:17    [D] [esp8266.preferences:238]   
Saving preferences to flash...
19:44:18    [W] [component:214] 
Component preferences took a long time for an operation (0.06 s).
19:44:18    [W] [component:215] 
Components should block for at most 20-30ms.
19:47:27    [D] [ratgdo:210]    
Status: door=CLOSED light=OFF lock=UNLOCKED
mariusmuja commented 5 months ago

There's two possible issues:

Can you try to repeatedly press the "Query status" and/or "Query openings" buttons and see if there's a reply every time or only occasionally. If you see a reply from the GDO every time, that rules out the first case.

smshapiro85 commented 5 months ago

I am experiencing the same issue. At first I thought it was an issue with Home Assistant automations, but it is clear now that the ratgdo device is not responding to commands consistently. Sometimes I need to click the "Open" button multiple times in order for it to open. I don't have the log window open during this time so I cannot see what is going on. But every time the logs are open, everything works right away, so I am not sure if the device is sleeping, or something else.

I think I am going to try and take the device down and reflash it, not sure what else to try. Really bummed out because I was so excited about the device.

Wifi is rock solid at -38db.

I did search for the "Component preferences took a long time..." error and did find this lengthy thread, not sure if it is related or not. https://github.com/esphome/issues/issues/4717

smshapiro85 commented 5 months ago

There's two possible issues:

  • the GDO doesn't receive the door toggle command most of the time (possible transmit issue)
  • the GDO receives the door toggle command and ignores it

Can you try to repeatedly press the "Query status" and/or "Query openings" buttons and see if there's a reply every time or only occasionally. If you see a reply from the GDO every time, that rules out the first case.

I have two openers going and tried this.

On the first one- Clicking the "Query Status/Openings" button once every second seemed to work at first, but then if I click it rapidly, the website freezes and I can no longer access the device. It seems like it overloads the device and the device is unavailable. This is the first time I have seen it do this and it is now unavailable in HA. This is not the symptom I have experienced, it is more about the device being unavailable for a few seconds, and missing commands.

On the second one- I was less aggressive with the clicking and it is still available. It seems like it is responding consistently, however I did get this yellow message, which may or may not be related to the issue I am experiencing:

image
smshapiro85 commented 5 months ago

Ok, I performed an additional test to get more insight into how long this delay is taking, so I updated my home assistant automation to try to close the garage every 2 seconds until the device shows "door closing."

Here is the YAML:

action:
  - repeat:
      sequence:
        - service: cover.close_cover
          target:
            device_id: 0a1966f320bc7e2815123864015b95aa
          data: {}
        - delay:
            milliseconds: 2000
      until:
        - condition: device
          device_id: 0a1966f320bc7e2815123864015b95aa
          domain: cover
          entity_id: 946633ebff52fd445d62016011854df2
          type: is_closing

The trace showed a run time of 60 seconds after being triggered initially, and the door finally closes after showing a "(cover.ratgdov25i_1bc0a3_door) turned closing" at the end of the trace:

image

You can also see at the top of the trace how many unsuccessful service calls are being made to the Ratgdo device:

image

In other testing, the device closes right away:

image

Lastly, here is the panel showing details on wifi connectivity:

image
jerrm commented 5 months ago

What opener/wall panel models?

smshapiro85 commented 5 months ago

I am not sure the exact model but it is a yellow button and is a newer model with MyQ, in the United States. Here are pics, but if you need me to go and get the model number, I’m more than happy to get a ladder:

IMG_2634 IMG_2635

jerrm commented 5 months ago

if you need me to go and get the model number, I’m more than happy to get a ladder

No, don't go to that much trouble yet.

I'm just thinking if it works for most of us, it would be nice to know if there is any commonality among those with the issue.

smshapiro85 commented 5 months ago

FWIW I added my Ratgdo's into a 3d printed plastic case, and decided to clean up the wires a bit so I re-seated each of the wires and made sure they were the same size and stuff. It seems like everything is working well now, but I will report back if I still experience the intermittent response issues reported earlier.

muhlman commented 5 months ago

Sorry for the delayed response on my part, I am not getting consistent respondes to my commands, when I query status, of the 10 attempts I only got 1 response.

Whats odd is if I pull up and monitor the web ui, it shows motion detection and sensor blockage immediately, toggling the light works every time etc. control wise, only the door open/close/toggle doesn't work consistently.

Wifi signal strength is a pretty solid -50 to -52 pretty consistently so between that and the other functions working as intended I don't think its a wi-fi issue, I will try reseating the wires in the board to see if that makes a difference as that seemed to work for the other poster here.

smshapiro85 commented 5 months ago

I did two things and both seemed to solve the problem, but unfortunately I don’t know which one resolved it: 1) reseating the wires and

2) I noticed some of my laptop connected to one of my ubiquiti access points had high/inconsistent latency. I updated the firmware and it could be a result of the simple restart of the AP or the actual software update, I don’t know, but the latency went back down to a normal consistent value.

In any case, it is possible that the AP software update or reset helped.

On Sun, Dec 24, 2023 at 5:07 AM Michael Uhlman @.***> wrote:

Sorry for the delayed response on my part, I am not getting consistent respondes to my commands, when I query status, of the 10 attempts I only got 1 response.

Whats odd is if I pull up and monitor the web ui, it shows motion detection and sensor blockage immediately, toggling the light works every time etc. control wise, only the door open/close/toggle doesn't work consistently.

Wifi signal strength is a pretty solid -50 to -52 pretty consistently so between that and the other functions working as intended I don't think its a wi-fi issue, I will try reseating the wires in the board to see if that makes a difference as that seemed to work for the other poster here.

— Reply to this email directly, view it on GitHub https://github.com/ratgdo/esphome-ratgdo/issues/151#issuecomment-1868513461, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ6I6H7XZ57G6UUAVPPETRDYLASKRAVCNFSM6AAAAABA2L3GZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGUYTGNBWGE . You are receiving this because you commented.Message ID: @.***>

muhlman commented 5 months ago

Disconnecting and reconnecting the wall control from the ratgdo seems to have done the trick. Not sure what was going wrong since the door control itself worked fine so I don't think it was a loose connection.

Daguse commented 4 months ago

So I'm having the same issue and tried removing and reconnecting the wires and still having issues where it doesn't seem to work on the first request.

Any thing else that may work?