A React Native application built with Expo for managing and configuring multiple Bluetooth speakers. The app allows users to create speaker configurations, pair devices, and control speaker settings like volume and latency.
- Device Selection & Pairing: Scan for and pair with Bluetooth speakers
- Speaker Configuration: Create and manage multiple speaker configurations
- Volume Control: Adjust individual speaker volumes
- Latency Control: Fine-tune audio latency for each speaker
- Connection Management: Connect/disconnect speaker configurations
- Dark/Light Theme Support: Automatic theme switching based on system preferences
- DeviceSelectionScreen: Handles device scanning and pairing
- SpeakerConfigScreen: Manages speaker configurations and settings
- TopBar: Common navigation component
- PairingFunctions: Utility functions for device pairing
- SpeakerFunctions: Utility functions for speaker control
- ConfigurationFunctions: Utility functions for configuration management
- Expo Router: File-based routing and navigation
- Tamagui: UI component library with theme support
- React Native: Core framework
- TypeScript: Type safety and better developer experience
- SQLite: Local database for storing configurations
├── app/ # Main application screens
│ ├── DeviceSelectionScreen.tsx
│ ├── SpeakerConfigScreen.tsx
│ └── ...
├── components/ # Reusable UI components
│ └── TopBar.tsx
├── utils/ # Utility functions
│ ├── PairingFunctions.ts
│ ├── SpeakerFunctions.ts
│ └── ConfigurationFunctions.ts
├── hooks/ # Custom React hooks
├── assets/ # Static assets
└── database.ts # Database operations
-
Install dependencies:
npm install
-
Start the development server:
npx expo start
-
Run on your preferred platform:
- iOS Simulator: Press
i
- Android Emulator: Press
a
- Physical Device: Scan QR code with Expo Go app
- iOS Simulator: Press
- Navigate to the device selection screen
- Select up to 3 speakers to pair
- Click "Pair selected devices"
- Enter a name for your configuration
- The app will create the configuration and navigate to the settings screen
- Select a configuration from the home screen
- Adjust volume and latency sliders for each speaker
- Use the Connect/Disconnect button to manage the connection
- Changes are automatically saved
- Open the configuration you want to delete
- Click the Delete button
- Confirm the deletion
The app communicates with a Raspberry Pi backend for:
- Device scanning
- Speaker pairing
- Connection management
- Audio control
API endpoints:
/start-scan
: Initiates device scanning/stop-scan
: Stops device scanning/device-queue
: Returns discovered devices/paired-devices
: Returns previously paired devices/pair
: Pairs selected devices
The app uses SQLite to store:
- Speaker configurations
- Speaker settings (volume, latency)
- Connection status
- Paired device information