Small project containing:
android-app/— Android client app (Kotlin) for controlling/monitoring myQ devices.server/— Node.js server that uses@hjdhjd/myqto poll devices and forward events via WebSocket.
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.
Location: server/
Prereqs:
- Node.js (16+ recommended)
Quick start:
cd server
npm install
# start with debug logging
MYQ_DEBUG=1 npm startCommon env vars:
PORT— TCP port (default3000)DATA_DIR— directory to persist accounts (defaultserver/data)SERVER_SECRET/JWT_SECRET— secret used to encrypt account passwords (change in production)POLL_INTERVAL_SEC— device polling interval in seconds (default30)
Endpoints:
POST /login— body{ email, password }to create an account and returnapiKeyGET /account?apiKey=...— validate anapiKeyand get device infoGET /devices?apiKey=...— list devices for anapiKey
WebSocket:
- Connect to
ws://<host>:<port>/wsand send{ type: 'subscribe', apiKey: '...' }to receive device updates. Send{ type: 'execute', apiKey:'...', serial:'...', command:'open' }to execute commands.
Location: android-app/
Open the project in Android Studio. Typical commands:
# from repo root — build using Gradle wrapper
./gradlew :app:assembleDebugRun 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.
- Account passwords are stored encrypted using the
SERVER_SECRETvalue; change it before using in production. - The server persists accounts under the
data/directory insideserver/by default.
Feel free to open issues or PRs on the GitHub repository.
Generated: added a top-level README describing server and Android app.