Devqon/ring-hassio

A Home Assistant add-on for live streaming from Ring devices.

★ 0Forks 0JavaScriptGitHub ↗Compare

README

ring-hassio

Support the author on Patreon Buy me a coffee

About

A Home Assistant add-on to enable live streams of Ring Cameras. This add-on wraps around Dgreif's excellent work and exposes a livestream. It can be used both in HASSIO / Home Assistant and Home Assistant Core using Docker.

Installation in HASSIO / Home Assistant

  1. Add this GitHub repository to your add-on store.
  2. Configure your Ring Refresh Token and port (see configuration below).
  3. Start the "Ring Livestream" add-on. Check for errors in the logs.
  4. Open port 3000 (default) on your router or whatever you set in the config.
  5. Open the stream at http://hassio.local:port/public/stream.m3u8 to make sure it works before going any further. We recommend using VLC or equivalent.
  6. Add a camera to Home Assistant, such as:
    camera:
      - platform: generic
        name: Ring Livestream
        stream_source: http://hassio.local:port/public/stream.m3u8
        still_image_url: http://hassio.local:port/public/stream.m3u8
    (Don't worry about the still_image_url not pointing to an actual image, we are not going to use it, but it is required.)
  7. Add a card Picture Glance card to your UI, set the 'Camera Entity` to the camera you have just created. If it was created for your automatically, go in and see if the settings are correct!
  8. Done! Enjoy your shiny new livestream!

Configuration

Example configuration:

{
    "ring_refresh_token": your_refresh_token
}

Installation in Home Assistant Core / Docker

Thanks to @robert-alfaro for figuring this out!

  1. Ensure device that you will be using has UPnP/NAT-PMP enabled. This is most probably a setting in your router. To be more strict, if you can, use explicit port forward rules for the ports documented here: Ring Ports.
  2. Clone this repository.
  3. Create environment variables or create options.json file:
{
    "ring_refresh_token": your_refresh_token,
    "port": 3000
}
  1. Build docker image

NOTE: substitute below 'armv7' with your machine architecture

cd <path to this repo>
docker build --build-arg BUILD_FROM='homeassistant/armv7-base:3.11' -t ring-hassio .
  1. run docker image
docker run --init -d --name="ring-livestream" -v <path to options.json>:/data/options.json -p 3000:3000 ring-hassio

Taking a snapshot

Currently the addon does not support taking snapshots, but when it does this is the configuration you will need: In order to use the snapshot service, you will need to following settings in your configuration.yaml:

homeassistant:
  whitelist_external_dirs:
    - /config/tmp

You can then call the snapshot service like this:

service: camera.snapshot
entity_id: [entityID]
filename: tmp/foo.jpg

Contributors

jeroenterheerdtBrahmahHarryJHolmesdgreif

Issues