Ratgdo - local mqtt control for your Chamberlain/Liftmaster security+ 2.0 garage door opener

I haven’t been able to update my ratgdo instance since early February. It’s stuck on 2024.2.2. Prior to that, I was able to OTA update it without issue.

The logs from an attempt to update via ESPHome Wireless install indicate the following:

HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
Dependency Graph
|-- ESPAsyncTCP-esphome @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.1.0
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|-- ArduinoJson @ 6.18.5
|-- Secplus @ 1.0.0+sha.f98c322
|-- EspSoftwareSerial @ 8.1.0+sha.57f1aa7
|-- noise-c @ 0.1.4
|-- Improv @ 1.2.3
RAM: [===== ] 46.2% (used 37844 bytes from 81920 bytes)
Flash: [====== ] 61.3% (used 627953 bytes from 1023984 bytes)
========================= [SUCCESS] Took 11.20 seconds =========================
INFO Successfully compiled program.
INFO Connecting to 192.168.0.163
INFO Uploading /data/build/ratgdo-double/.pioenvs/ratgdo-double/firmware.bin (632112 bytes)
INFO Compressed to 422690 bytes
ERROR Error binary size: Error: ESP does not have enough space to store OTA file. Please try flashing a minimal firmware (remove everything except ota)

Why is this an issue now?…Did the ratgdo package increase to a size that is no longer flashable via OTA?

What do I need to do to get it back to being maintainable via OTA?

Thanks, but that’s only a partial fix since I do have a lite board (only 1 MB flash) and this part of my question remains…

Why is this an issue now?…Did the ratgdo package increase to a size that is no longer flashable via OTA?

It’s possible if you first install smaller image. I have no recommendation for what to install to meet that need

Have you actually checked if it has 1MB flash or 4MB flash? I didn’t think any ratgdos were actually sold with 1MB (just incorrectly set that way). See ratGDO ESP firmware update to 2023.12.1 fails with error: not enough space to store OTA file · Issue #155 · ratgdo/esphome-ratgdo · GitHub for how to check.

Why is this an issue now?…Did the ratgdo package increase to a size that is no longer flashable via OTA?

Obviously yes. You can remove the web server component if you don’t actually need it, that would safe a bunch of space. To do that, put this in your .yaml:

#custom modification using https://esphome.io/guides/configuration-types.html#remove
web_server: !remove
1 Like

My apologies if this has been discussed. The device is awesome and works as advertised except for one thing: occasionally for no reason it seems the device will register a garage open event followed seconds later by a garage closing event.

Its hard to sort through all these threads where symptoms include opening and closing so I did not know whether someone could point me in the correct direction as to a solution.

I am running on MQTT v2.51 using Liftmaster/Chamberlain +1.0

I didn’t buy my board with my shield, instead opting to use an 8266 board I already had.

I tried to check the real flash size, but the main issue (not enough flash memory to store OTA file) didn’t allow it to get far enough to report the debug results.

So, I tried your second recommendation and started to collect the results:

Package* Available Used Free Needed (Uncompressed/Compressed) Delta (Uncompressed/Compressed)
1 1023984 627953 396031 632112/422689 -236081/-26658
2 1023984 565711 458273 569856/384124 -111583/+74149
3 1044464 627937 416527 632096/422682 -215569/-6155

*Packages
(1) Original (_lite) using …v25board_esp8266_d1_mini_lite.yaml@main package
(2) (1) with web server removed. This appears to only save ~60/39 KB (uncompressed/compressed), but is currently enough on ESPHome 2024.3 to make the difference if the board has or the config is set to 1 MB flash.
(3) Non (_lite removed) using …v25board_esp8266_d1_mini.yaml@main package and web server re-enabled.

Only (2) and (3) completed an OTA install.

(1) and (2) reported

HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash

while (3) reported

HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash

There must be something fundamental I don’t understand about the logs since (3) indicated insufficient space as well (422682 required > 416527 available), but completed the OTA install.

Flash: [======    ]  60.1% (used 627937 bytes from 1044464 bytes)
========================= [SUCCESS] Took 9.74 seconds =========================
INFO Successfully compiled program.
INFO Connecting to 192.168.0.###
INFO Uploading /data/build/ratgdo-double/.pioenvs/ratgdo-double/firmware.bin (632096 bytes)
INFO Compressed to 422682 bytes
Uploading: [============================================================] 100% Done...

Anyways…after (3) worked, I tried your first recommendation again and sure enough the flash real size was reported as 4MB.

[09:59:37][D][sensor:093]: 'Flash Real Size': Sending state 4194304.00000  with 1 decimals of accuracy

So, now another thing I don’t understand (knowing the flash real size is 4MB) is why (3) indicated a slightly different (but still ~1MB) total flash size instead of ~4MB (i.e. 4194304).

When I first configured ratgdo, I asked about the right one to use (lite or not) and ended up using _mini and got under the impression that the 8266 boards were the D1 Mini Lite’s, so that’s the configuration I used, but I guess that was wrong.

Thanks for your help! Hopefully this works uninterrupted for future firmware updates now.

I have an issue with one of my RATGDOs. I have two… one works great, and the other doesn’t. They’ve both worked very well for the last several months, until recently. Since last week, one of them has stopped responding. It will not connect to WiFi even after a power cycle. The garage door status shows “Closed,” which is odd because usually if the RATGDO is not connected it’ll show, “Unavailable.” It does not respond to commands.

The local garage door button works normally. The obstruction sensors work.

So, here’s what I’ve done:

  1. I connected to the ratgdo with a laptop, erased and reloaded for MQTT.
  2. I got as far as the WiFi connection screen, where it didn’t lock up, didn’t time out, just sat with the progress bar circling… for more than five minutes. LED on the board is solid:

Meanwhile, my router shows that the device is connected:

However, I can’t ping it from my network. Note the other ratgdo has an uptime of 2+ hours, and works just fine.

  1. I decided to load the ESPHome version just to try it. It worked, connected to WiFi, and I was able to control it through the browser interface from inside my house. All pings successful.
  2. I connected to the ratgdo, erased it, and tried MQTT again… same result. It hangs on the WiFi connect screen.
  3. repeated step 4 several times.

I can’t reconcile why I have no problem connecting to WiFi in the ESPHome installation sequence, but not in the MQTT installation. Does anyone have any ideas? Again… this worked well for several months until just recently.

The problem is basically that it is a Security+1.0 device. The code as-written isn’t entirely dialed in to be perfectly functional with Security+1.0 and results in a number of issues including phantom (and not always phantom) garage-door-open events. It’s seems to be an issue of bit collisions when commands and queries are not always timed right.

As for solutions, there’s not much available at the moment as far as I’m aware. If you have an iPhone, you can try the Homekit version of the RATGDO firmware to which Security+1.0 was recently added by mitchjs. According to him, he managed to work out the timing, added a trap to ignore collisions, and made it more reliable.

Alternatively, though not as immediate, someone in the RAT-RATGDO community came up with a “man-in-the-middle” solution that seems to solve the issues people have with Security+1.0 as well as incompatible wall panels. You can check it out here if you like, but we’re still waiting on the OP to get back with schematics/code/etc. so there’s no known timeline on when it’ll be ready for more people to test.

Thanks, I have the same one and could not figure out how to get this wired. I didn’t think it would port 0.

All of the YouTube videos, etc, show the US version.

Is it possible to control 2 garage doors with a single Ratgdo? I see only 3 wires used with several pins available.

No. You need one ratgdo per door opener.

So I have a ratgdo connected to my 1.0 garage door (purple learn button). I have the MQTT firmware installed and I am able to toggle the door. It appears though that I do not have door status telling me the door state, unless I am missing something. This is what MQTT Explorer sees:
image

There is the door command, but I am guessing that that is for controlling the door, or is that the indicator for the door state?

Any help is appreciated.

I use ESPHome.
Door = close == is a state that the door is closed. The states are Open, Opening, Closing, and Close.

here is my yaml for a card:

type: custom:button-card

type: custom:button-card
entity: cover.ratgdov25i_f393ba_door
name: Garage Door
show_icon: true
show_name: true
show_state: true
tap_action:
  action: toggle
state:
  - value: open
    icon: mdi:garage-open
    color: rgb(255,0,0)
  - value: close
    icon: mdi:garage

The problem is that the Secuity+ 1.0 is not yet supported by ESPHome. I would love all the functionaliy that ESPHome has, unfortunately I am at the mery of Paul Weiland’s firmware.

Actually, ESPHome has supported Security+1.0 for a while now—as much as any of them really “support” Security+1.0 since it seems to have some issues. There are some instructions in this issue if you need help with the transition.

Then I saw what used to be an old post that said ESPHome did not support 1.0. I will give it a try.

Back at my computer. This is what I saw.

That is directly from this link:
https://paulwieland.github.io/ratgdo/flash.html

Interesting. I guess he didn’t update that page, but he did update the Feature Matrix, at least for ESPHome. The ESPHome Flash page does include protocol selection, though, and for the ESPHome firmware, I’d trust the official repository more than anything on Paul Weiland’s pages. Hard to say how often he updates them.

The wall controller I have I believe is 398LM. It has the top button, the lcd with the time (which is useless), the motion sensor and the bottom lock and light buttons. How do I find out if that one is supported?
image

So, it looks like the 398LM is a 0x37 panel instead of a 0x38 panel like the 889LM. This might actually be why you were having problems with the status of the door. I’m not certain if they fixed the issue in the ESPHome firmware, but they are aware of the problem, and it sounds like they may have added a workaround where the RATGDO queries 0x38 for the status after reading a 0x37 according to the conversation in this issue where they originally discussed and tested Security+1.0. You can Ctrl+F “398LM” to read those parts, or you may simply have to try it to see if it works.

Alternatively, someone in the RAT-RATGDO community did come up with a “man-in-the-middle” solution that seems to fix all of the issues with 0x37 wall panels and Security+1.0 in general. You can check out the discussion it was moved to here, but since we haven’t heard from the OP in a while, this will not be an immediate solution by any means.