Skip to content

How to contribute

user2684 edited this page Dec 17, 2023 · 11 revisions

You are more than welcome to contribute to this project!

Github is used to host code, to track issues and feature requests, as well as accept pull requests. Pull requests are the best way to propose changes to the codebase.

In order to test the integration you may want to setup a Home Assistant Developer Environment by going through the following steps:

  • Review in details the instructions at https://developers.home-assistant.io/docs/development_environment/ to install all the requirements and setup the environment. Specifically ensure to:
  • Run Home Assistant by running the appropriate task
  • The first time is run, all the dependencies are download and you are asked to create a user. Create new user, for example: admin/admin
  • Clone the integration repositories inside the devcontainer:
    • mkdir imou
    • git clone https://github.com/user2684/imouapi
    • git clone https://github.com/user2684/imou_life
  • Install the imouapi library. Repeat this task every time you change something in the imouapi library
    • pip install -e imouapi
  • Optionally test if the imouapi library works correctly:
    • python -m imouapi.cli --app-id <app_id>--app-secret <app_secret> discover
    • python -m imouapi.cli --app-id <app_id>--app-secret <app_secret> get_device <device_id>
  • Install the integration in Home Assistant. A manual process could be the following. This will create a symlink to the previously cloned repository
    • mkdir <ha>/config/custom_components
    • ln -s /workspaces/homeassistant-core/imouapi/imou_life/custom_components/imou_life .
  • Edit Home Assistant configuration.yml file to add debug logging
  • Install ffmpeg if you need to test live video streaming:
    • sudo apt-get update; sudo apt-get install ffmpeg