A Flutter application for Android TV and mobile devices that connects to your Viseron NVR instance to view camera feeds and live streams.
Note: This is an unofficial community app for Viseron. For the main Viseron NVR project, visit roflcoopter/viseron.
- Android TV
- Mobile-friendly touch interface
- JWT-based authentication with automatic login
- Live camera snapshot feeds with configurable refresh rates
- Grid view for multiple cameras simultaneously
- Full-screen video player
- HLS video streaming support
- Automatic connection persistence (remember credentials)
- Flutter SDK 3.10.7 or higher
- Android Studio or VS Code with Flutter extensions
- A running Viseron instance
- Clone the repository:
git clone git@github.com:mani-repos-link/viseron-app.git
cd viseron- Install dependencies:
flutter pub get- Run the app:
# For Android/Android TV
flutter run -d android
# For iOS
flutter run -d ios
# Build release APK for Android TV
flutter build apk --releaseOn first launch, enter your Viseron connection details:
- Host/Ip: Your Viseron instance URL (e.g.,
https://viseron.example.com) - Port: (Optional) Custom port if not using standard ports
- Username: Your Viseron username
- Password: Your Viseron password
Credentials are saved locally and you'll be automatically logged in on subsequent app launches.
The app automatically detects Android TV and provides an optimized interface:
- D-pad Up/Down: Navigate between fields and buttons
- OK/Select: Edit field or activate button
- Back: Exit edit mode or return to previous screen
- Login Screen: Navigate between Host, Username, Password fields and Connect button. Press OK to edit any field in a dialog.
- Home Screen: Navigate between camera cards
- Grid View: Navigate between cameras, press OK to view full-screen
- Player: Press Back to return to grid view
On mobile devices, the app provides a traditional touch interface:
- Tap any field to edit with keyboard
- Tap Connect button to login
- Tap camera cards to navigate
- Standard mobile gestures throughout
- ViseronAPI (
lib/services/viseron_api.dart): Handles authentication and API requests - AppState (
lib/providers/app_state.dart): Global state management using Provider - LoginScreen (
lib/screens/login_screen.dart): Platform detection router - LoginScreenTV (
lib/screens/login_screen_tv.dart): TV-optimized login with dialog-based editing - LoginScreenMobile (
lib/screens/login_screen_mobile.dart): Mobile login with standard form - HomeScreen (
lib/screens/home_screen.dart): Camera grid with thumbnail previews - GridViewScreen (
lib/screens/grid_view_screen.dart): All cameras live view with staggered loading - PlayerScreen (
lib/screens/player_screen.dart): Full-screen video player
- User enters credentials on login screen
- App sends POST request to
/api/v1/auth/login - Viseron returns JWT split across:
- Response body:
header.payload - Cookie:
signature_cookie(signature part)
- Response body:
- App combines parts into full JWT token
- Subsequent requests include full JWT in
Authorization: Bearerheader - Additional cookies (
static_asset_key,_xsrf) are managed for snapshot access - Credentials saved to SharedPreferences for auto-login
- Staggered Loading: Camera initialization is delayed by 500ms per camera to prevent overwhelming the connection
- Adaptive Refresh Rates:
- Single camera view: 200ms (~5 FPS)
- Grid view: 3 seconds per camera
- Thumbnails: 5 seconds
- Error Handling: Failed cameras retry every 10 seconds without blocking others
flutter: SDKprovider: State managementhttp: HTTP clientshared_preferences: Local storage for credentialsvideo_player: Video playbackchewie: Video player controlsgoogle_fonts: Typographydpad: Android TV D-pad navigation support
flutter build apk --releaseThe APK will be generated at build/app/outputs/flutter-apk/app-release.apk
For production release, configure signing in android/app/build.gradle:
android {
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}- Verify Viseron instance is accessible from your network
- Check username and password are correct
- Ensure Viseron authentication is enabled
- Check app logs for detailed error messages
- Check that the authenticated user has camera access permissions in Viseron
- Verify cameras are configured and online in Viseron
- Check app logs for API errors
- This is normal during staggered loading (cameras load 500ms apart)
- If cameras remain blank, check network bandwidth and Viseron server resources
- Ensure HLS streaming is enabled in Viseron camera configuration
- Check that the camera is recording and accessible
- Verify network connectivity and bandwidth
- The app auto-detects platform based on screen size
- TV detection: Android device with landscape orientation and width > 1000 or height > 600
- Check logs for "Platform detection" message to see detected screen size
- Install Flutter SDK 3.10.7 or higher
- Install Android Studio with Flutter and Dart plugins
- Clone the repository
- Run
flutter pub getto install dependencies
You can deploy and debug on Android TV without a USB cable using ADB over network:
- On your Android TV, go to Settings > Device Preferences > About
- Click on Build 7 times to enable Developer Options
- Go back to Device Preferences > Developer options
- Enable USB debugging and Network debugging
- Note your TV's IP address (Settings > Network & Internet > Your WiFi network)
# Make sure your computer and TV are on the same network
# Replace TV_IP_ADDRESS with your TV's actual IP address
# Connect to TV via ADB
adb connect TV_IP_ADDRESS:5555
# Verify connection
adb devices
# You should see your TV listed, e.g.:
# TV_IP_ADDRESS:5555 device
# Now you can run the app wirelessly
flutter run -d TV_IP_ADDRESS:5555
# Or build and install APK
flutter build apk --release
adb -s TV_IP_ADDRESS:5555 install build/app/outputs/flutter-apk/app-release.apkIf connection fails:
# Disconnect first
adb disconnect TV_IP_ADDRESS:5555
# Restart ADB server
adb kill-server
adb start-server
# Try connecting again
adb connect TV_IP_ADDRESS:5555Once connected wirelessly, you can use Flutter's hot reload:
# Run in debug mode
flutter run -d TV_IP_ADDRESS:5555
# Press 'r' in terminal to hot reload
# Press 'R' in terminal to hot restartThis is a community project and we welcome contributions from everyone! Whether you're fixing bugs, adding features, improving documentation, or helping other users.
See CONTRIBUTING.md for detailed guidelines on:
- Setting up development environment
- Reporting bugs and requesting features
- Submitting pull requests
- Code style and standards
- Testing requirements
We especially welcome contributions for:
- Video player improvements
- Settings screen
- Camera grouping/organization
- Localization/translations
- iOS support
- Documentation and tutorials
This project follows a Code of Conduct. By participating, you agree to uphold this code.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/viseron-app.git - Install dependencies:
flutter pub get - Run the app:
flutter run - Make changes and test
- Submit a pull request
See CONTRIBUTING.md for detailed instructions.
This app is designed to work with Viseron, an open-source NVR with support for AI object detection.
- Viseron NVR: roflcoopter/viseron - The main Viseron project
- Viseron Docs: viseron.netlify.app - Official documentation
- Viseron Discord: Join the community for support and discussions
- Report Issues: Use GitHub Issues for bugs and feature requests
- Discussions: Use GitHub Discussions for questions and ideas
- App Issues: Open an issue on this repository
- Viseron Server Issues: Refer to the main Viseron project
- General Help: Join the Viseron community Discord
Planned features and improvements:
- Enhanced video player with HLS streaming
- Settings screen for customization
- Camera grouping and organization
- Multi-language support
- iOS version
- Motion detection notifications
- Recording playback
See Issues for more details and to vote on features.
MIT License - see LICENSE file for details
This project is not affiliated with or endorsed by the official Viseron project.
- Built with Flutter for cross-platform support
- Uses the dpad package for Android TV navigation
- Designed for the Viseron NVR system
- Community icon and assets by Viseron project
- Thanks to all contributors!