ratgdo / esphome-ratgdo

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

Infinite loop of door opening (power cycling?) #272

Open Xaelias opened 3 weeks ago

Xaelias commented 3 weeks ago

I purchased a ratgdo a few weeks ago and finally got around trying to install it. Except I'm facing an issue that I believe is described also in this reddit post.

The problem seem to be that when being power cycled (which happens in my case on installation, but also would happen during a power outage for instance), the following things happen.

Any insight?

PS: Security 1+ (purple), with wall mounted panel and obstruction sensors. Power supply is a 5V@1A usb adapter.

agoode commented 3 weeks ago

I suspect this is the same issue as #235. See also #254.

Xaelias commented 3 weeks ago

Thanks indeed I missed those. Guess I'll need to compile the firmware locally 😬

Xaelias commented 3 weeks ago

So I've tried to disable the emulation mode, I've tried to increase the timeout from 35 to 180s (the panel takes almost 1 minute to come up for me). And the issue is still happening.

If the wall button is not already up and running when the ratgdo comes up, it will start acting erratically and open/close the door randomly. Power cycle it, the problem seem to disappear.

I'm still hoping to find out what's actually happening but as is, I don't know I can leave it deployed :-/

emlynmac commented 4 days ago

I've worked around this issue by building locally and commenting out the start of the emulation mode in the code. Specifically, in secplus1.cpp around line 55, comment out or remove the this->wall_panel_emulation();

To build locally you also need to adjust the includes in the yaml files.

For me that was to change the packages section in v25iboard_secplusv1.yaml to point to local packages, rather than the remote urls.

 remote_package:
    url: https://github.com/ratgdo/esphome-ratgdo
    files: [base_secplusv1.yaml]
    refresh: 1s

needs to be:

  esphome-ratgdo: !include base_secplusv1.yaml

and in base_secplusv1.yaml change:

external_components:
  - source:
      type: git
      url: https://github.com/ratgdo/esphome-ratgdo
    refresh: 1s

to

external_components:
  - source:
      type: local
      path: esphome-ratgdo/components

making sure the path corresponds to your local git clone.