An Android application built with Kotlin to monitor and control various portals (doors and locks) via MQTT over WebSockets.
- Real-time Monitoring: Subscribes to JSON status updates for multiple portals.
- Command Control: Sends toggle and state commands to garage and house doors.
- Connection Management:
- Automatic reconnection logic.
- Visual connection status bar (Green for connected, Red for disconnected).
- Payload Parsing: Extracts door states and original timestamps from MQTT messages.
- Language: Kotlin / Java
- Build System: Gradle
- Library: Eclipse Paho MQTT Client
- Protocol: MQTT over WebSockets (
ws://192.168.22.5:1884) - IDE: Android Studio Otter 3 Feature Drop
The app monitors topics with the pattern: muh/portal/{KEY}/json
G: GarageGD: Garage DoorGDL: Garage Door LockHD: House DoorHDL: House Door Lock
Commands are published to: muh/portal/RLY/cmnd
The following commands are supported:
G_T: Garage ToggleGD_O/GD_U/GD_L: Garage Door Open/Unlock/LockHD_O/HD_U/HD_L: House Door Open/Unlock/Lock
Portal updates are received as JSON and mapped to the PortalUpdate data class:
- ID: The portal key (e.g., "G", "HD").
- State:
OPEN,CLOSED, orUNKNOWN. - Timestamp: Extracted from the MQTT payload using various date formats or fallback to system time.
- Open the project in Android Studio.
- Ensure the MQTT broker is accessible at the configured URI.
- Build and run the application on a Linux-based environment or Android device.


