An Android app for controlling a RATGDO garage door opener over your local Wi-Fi network. A modest comfort improvement over directly accessing the ESPHome Web UI directly from the phone's browser.
Built around the ESPHome Web API, it uses a persistent Server-Sent Events (SSE) connection for real-time door state updates without polling.
- A RATGDO device flashed with ESPHome firmware with the Web API enabled
- The RATGDO must be on the same local Wi-Fi network as your phone (the app will check for this and walk you on target with error messages)
- Real-time door state — live Open / Closed / Opening / Closing status via SSE stream
- Smart button states — Open and Close buttons enable/disable contextually based on door movement
- Network validation — verifies Wi-Fi connectivity and confirms the RATGDO is reachable before enabling controls
- Auto-reconnect — automatically re-establishes the SSE connection on disconnect or network interruption
- Persistent settings — device IP or hostname saved via SharedPreferences, survives app restarts
- Light/dark mode — adapts to system theme
- (Prerequisite) Install and configure your RATGDO device on a local Wi-Fi network
- Install the app on your Android device (Android API 26+ supported, see Releases for the latest)
- Ensure your phone is connected to the same Wi-Fi network as your RATGDO
- Tap the gear icon in the top right
- Enter your RATGDO's IP address or hostname
- Tap Save — the app will connect automatically and display the current door state
- Open and close your garage door at your leisure
The app connects to the ESPHome Web API's /events endpoint and keeps a persistent SSE stream open for the lifetime of the app's foreground session.
SseManager— runs on a background thread, parses the SSE stream and fires callbacks toMainActivityon connection, door state changes, and disconnectionMainActivity— implementsSseManager.SseListenerand updates the UI on the main thread viarunOnUiThread()SettingsActivity— single screen for configuring the device IP, persisted viaSharedPreferencesRatgdoConstants— shared constants class for SharedPreferences keys
The SSE stream is stopped in onPause() and restarted in onResume() to avoid background battery drain.
And that's it!
- Prompt to open WiFi settings when not connected
Clone the repo and open in Android Studio. No API keys or external dependencies required — the app communicates directly with your RATGDO over the local network.
git clone git@github.com:In-disBEALief/ratgdo-android.git
Minimum SDK: API 26 (Android 8.0)
Target SDK: API 34
Language: Java
Build system: Gradle (Groovy DSL)
- RATGDO LLC / RATGDO Github — the hardware this app is built for
- ESPHome — the firmware powering the Web API
