Skip to content

maximunited/imou_life

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Imou Life - Home Assistant Integration

Home Assistant hacs_badge Imou Life Release Pre-release Quality Scale Buy Me a Coffee

A Home Assistant integration for Imou Life cameras and devices, providing comprehensive monitoring and control capabilities.

πŸš€ Features

  • Camera Integration: Live video streaming and snapshot capture
  • Motion Detection: Real-time motion alerts and notifications
  • Device Control: PTZ control, recording management, and more
  • Automation Ready: Full Home Assistant automation support
  • HACS Compatible: Easy installation through HACS

πŸ“‹ Requirements

System Requirements

  • Home Assistant: 2024.2.0 or later (including latest 2025.x versions)
  • Python: 3.11, 3.12, 3.13 (fully compatible)
  • Operating System: Any platform supported by Home Assistant

Account Requirements

  • Imou Account: Valid Imou Life account with registered devices
  • Developer Account: App ID and App Secret from Imou Open Platform

Version Compatibility

  • Home Assistant 2024.2.0+: βœ… Fully supported (Python 3.11-3.13)
  • Home Assistant 2024.12.0+: βœ… Python 3.13 support added
  • Python 3.11-3.13: βœ… All versions supported
  • Cross-platform: βœ… Windows, macOS, Linux, Docker, etc.

πŸ”‘ Getting Your Imou API Credentials

Before installing the integration, you need to obtain your Imou API credentials:

  1. Register on Imou Life if you haven't already
  2. Create a Developer Account at https://open.imoulife.com
  3. Access the Imou Console at https://open.imoulife.com/consoleNew/myApp/appInfo
  4. Go to "My App" β†’ "App Information" and click Edit
  5. Fill in the required information and copy your App ID and App Secret

Note: These credentials are required for the integration to communicate with your Imou devices.

πŸ“₯ Installation

Option 1: HACS Installation (Recommended)

  1. Install HACS if you haven't already (HACS Installation Guide)
  2. Add this repository to HACS:
    • Go to HACS β†’ Integrations β†’ Explore & Download Repositories
    • Search for "Imou Life"
    • Click "Download this repository with HACS"
  3. Restart Home Assistant
  4. Add the integration via Settings β†’ Devices & Services β†’ Add Integration

Option 2: Manual Installation

  1. Download the latest release from GitHub Releases
  2. Extract the files to your custom_components/imou_life/ directory
  3. Restart Home Assistant
  4. Add the integration via Settings β†’ Devices & Services β†’ Add Integration

βš™οΈ Configuration

Initial Setup

  1. Search for "Imou Life" in the Add Integration screen
  2. Enter your credentials:
    • App ID: Your Imou developer App ID
    • App Secret: Your Imou developer App Secret
  3. Choose discovery method:
    • Auto-discover devices: Automatically finds all devices in your Imou account
    • Manual device entry: Enter a specific Device ID

Device Configuration

Once added, each device will create several entities:

  • Switches: Enable/disable push notifications and device features
  • Sensors: Storage usage, callback URL, device status
  • Binary Sensors: Online status, motion detection
  • Select: Night vision mode selection
  • Buttons: Restart device, refresh data, refresh motion alarm
  • Camera: Live streaming and snapshots

Advanced Configuration

After adding a device, you can configure advanced options:

  • Polling Interval: How often to refresh device data (default: 15 minutes)
  • API Base URL: Imou API endpoint (default: https://openapi.easy4ip.com/openapi)
  • API Timeout: API call timeout in seconds (default: 10 seconds)
  • Callback URL: For push notifications (requires internet exposure)

πŸ”” Push Notifications Setup

For real-time motion detection updates:

  1. Expose Home Assistant to the internet (required)
  2. Set up a reverse proxy (NGINX recommended)
  3. Configure callback URL in the integration settings
  4. Enable push notifications on one device (applies to all devices)
  5. Create the automation for handling webhook events

Important: Push notifications require Home Assistant to be exposed to the internet and behind a reverse proxy due to API limitations.

πŸŽ₯ PTZ Controls

If your device supports PTZ (Pan-Tilt-Zoom), the integration provides:

  • imou_life.ptz_location: Move to specific coordinates
  • imou_life.ptz_move: Move in specific directions with duration

These services can be called from automations or manually via Developer Tools.

🚨 Motion Detection

The integration creates a "Motion Alarm" binary sensor that can be used in automations. You have three update options:

  1. Default: Updates every 15 minutes (no internet required)
  2. Manual refresh: Use the "Refresh Alarm" button or automation
  3. Push notifications: Real-time updates (requires internet exposure)

πŸ”§ Troubleshooting

Common Issues

  • API Errors: Verify your App ID and App Secret are correct
  • Device Not Found: Ensure the device is registered in your Imou account
  • Push Notifications: Check that Home Assistant is exposed to the internet and behind a reverse proxy

Debug Logging

Enable debug logging for troubleshooting:

logger:
  default: info
  logs:
    custom_components.imou_life: debug
    imouapi: debug

Device Diagnostics

Download diagnostics from the device page in Home Assistant for detailed information.

πŸ“š Documentation

🀝 Support

πŸ”„ Compatibility & Testing

Python & Home Assistant Version Support

Python Version Home Assistant Support Integration Status
3.11 2023.3+ βœ… Fully Supported (2024.2.0+)
3.12 2024.2+ βœ… Fully Supported (2024.2.0+)
3.13 2024.12+ βœ… Fully Supported (2024.2.0+)

Note: Our integration requires Home Assistant 2024.2.0+ which automatically provides Python 3.11-3.13 compatibility.

Tested Environments

  • Home Assistant: 2024.2.0 β†’ 2025.8.3+ (latest)
  • Python: 3.11, 3.12, 3.13
  • Platforms: Windows, macOS, Linux, Docker, Home Assistant OS
  • Architectures: x86_64, ARM64, ARM32

CI/CD Testing

  • GitHub Actions: Automated testing on Python 3.11, 3.12, 3.13
  • Coverage: Maintains >60% test coverage across all versions
  • Quality: Scrutinizer CI integration for code quality monitoring

⚠️ Important Notes

  • Unofficial Integration: This is not supported by Imou
  • API Limitations: Imou limits developer accounts to 5 devices
  • Internet Required: Push notifications require Home Assistant to be internet-accessible
  • Reverse Proxy: Required for push notifications due to API request formatting

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Original integration by @user2684
  • Enhanced and maintained by @maximunited
  • Community contributors and testers

Made with ❀️ for the Home Assistant community

Packages

No packages published

Languages

  • Python 93.9%
  • PowerShell 5.5%
  • Batchfile 0.6%