Skip to content

Sonoff Camera Setup

Ben edited this page Apr 16, 2021 · 1 revision
  1. Find the IP and password for your camera

    Note this is different from your eWeLink password.

    This information can be found from the eWeLink application by going to the camera → Device Settings → More Settings → RTSP.

    RTSP Page Screenshot

    The password needed is referred to as "RTSP password" in the above screenshot. The password can be changed from this screen if you choose to do so.

    It is recommended to setup your camera with a static IP from your router.

  2. Install homebridge-camera-ffmpeg

    Since homebridge-ewelink does not natively support the camera (no need to reinvent the wheel), homebridge-camera-ffmpeg is required for camera streaming.

    To install, please see the homebridge-camera-ffmpeg readme.

  3. Configure homebridge-camera-ffmpeg for your camera

    A basic configuration example which will work with the Sonoff camera is:

    {
       "platform": "Camera-ffmpeg",
       "name": "Camera FFmpeg",
       "cameras": [
          {
             "name": "Sonoff Camera",
             "videoConfig": {
                "source": "-rtsp_transport tcp -i rtsp://rtsp:[email protected]:554/av_stream/ch0",
             }
          }
       ]
    }

    You will need to replace:

    • 12345678 with the password from above, and
    • 192.168.4.146 with your camera's IP address

    More optional configuration parameters are detailed on the homebridge-camera-ffmpeg readme. You can experiment with these options to find a configuration that suits you. A more detailed configuration example which enables audio streaming and sets a custom video height, width and FPS:

    {
       "platform": "Camera-ffmpeg",
       "name": "Camera FFmpeg",
       "cameras": [
          {
             "name": "Sonoff Camera",
             "videoConfig": {
                "source": "-rtsp_transport tcp -i rtsp://rtsp:[email protected]:554/av_stream/ch0",
                "maxWidth": 1280,
                "maxHeight": 720,
                "maxFPS": 15,
                "audio": true,
             }
          }
       ]
    }

Limitations

The motion detection feature in the eWeLink application is not available through Homebridge.