Skip to content

jacks4ever/OpenGarageDoorAndroidApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

OpenGarageDoorAndroidApp

Small project containing:

  • android-app/ — Android client app (Kotlin) for controlling/monitoring myQ devices.
  • server/ — Node.js server that uses @hjdhjd/myq to poll devices and forward events via WebSocket.

TL;DR

Run the server, log in with your myQ credentials to store an apiKey, then use the Android app (or WebSocket client) to subscribe and receive device updates.

Server

Location: server/

Prereqs:

  • Node.js (16+ recommended)

Quick start:

cd server
npm install
# start with debug logging
MYQ_DEBUG=1 npm start

Common env vars:

  • PORT — TCP port (default 3000)
  • DATA_DIR — directory to persist accounts (default server/data)
  • SERVER_SECRET / JWT_SECRET — secret used to encrypt account passwords (change in production)
  • POLL_INTERVAL_SEC — device polling interval in seconds (default 30)

Endpoints:

  • POST /login — body { email, password } to create an account and return apiKey
  • GET /account?apiKey=... — validate an apiKey and get device info
  • GET /devices?apiKey=... — list devices for an apiKey

WebSocket:

  • Connect to ws://<host>:<port>/ws and send { type: 'subscribe', apiKey: '...' } to receive device updates. Send { type: 'execute', apiKey:'...', serial:'...', command:'open' } to execute commands.

Android app

Location: android-app/

Open the project in Android Studio. Typical commands:

# from repo root — build using Gradle wrapper
./gradlew :app:assembleDebug

Run on an emulator or device from Android Studio. The app expects the server to be reachable and will call /login and use apiKey for WS subscriptions.

Development notes

  • Account passwords are stored encrypted using the SERVER_SECRET value; change it before using in production.
  • The server persists accounts under the data/ directory inside server/ by default.

Contributing

Feel free to open issues or PRs on the GitHub repository.


Generated: added a top-level README describing server and Android app.

About

Open Garage Door Android App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published