Setup Unifi Protect cameras on an Echo Show 5

I recently bought an Amazon Echo Show 5 for my home office to act primarily as a clock, and also voice control for my various Alexa integrated home automations. Given that the Echo Show 5 has a nice pretty display, I wanted to see if I could use voice control to display the feeds of my home security cameras.

My setup

I've got a bunch of existing Ubiquiti networking kit that I use to run my home network. To compliment that I picked up a few UniFi G3 cameras a few months ago and set them up around the house.

g3

I've got one setup in my woodworking workshop, and one covering the front entrance to my house.

file

The UniFi Protect software that comes with the cameras is great! It's intuitive, full featured, and lets me view a stream of the camera from any web browser. It even has a companion app for iOS or Android that lets you view the feed on your mobile device.

The problem though, is that I need to be near a computer or my phone if want to view the camera feed. It's not entirely practical. Those options don't help if my dogs are barking at someone at the front gate, and I want to quickly check if the butter chicken I ordered has arrived.

To solve this problem, initially I had a dedicated RaspberryPi hooked up to a small 7" display with the video feed running on it. That did the job just fine, but with my new Echo Show 5, I thought that there may be a better way.

Alexa ecosystem

Alexa Skills are like apps that developers create and publish to the Alexa Skills marketplace, and enables users to add additional functionality to their Alexa devices. For example, the fart sounds skill which does exactly what you think it does.

file

When it comes to my video cameras, I know i'm going to need a skill that will let me display them on my Echo Show.

Ideally, I'd like to use a first party skill created by the manufacturer of the camera. I have a much higher level of trust for an organization like Ubiquiti when it comes to securing access to my video cameras, than I do from some random skill publisher that i've never heard of. Unfortunately, in this case, Ubiquiti do not have a skill that I can use. Bummer!

Next option is to look at third party ones.
When searching the marketplace for camera related skills, they all had one thing in common; I needed to expose my camera feed through my firewall to the public internet. This wasn't something I was willing to do.

Just when I thought I might have to write my own skill, I came across a skill called Monocle.

Monocle

Monocle provides a free service that allows you to run a gateway service inside your network, and link that up to an Alexa skill.

In essence, Monocle is simply an aggregator of camera feed information and we implement all the necessary backend integration and secure communication with the Amazon Alexa services.
file

So basically, Monocle acts as a proxy service for the local video camera stream to the Amazon Cloud hosted Alexa skill. It's how an Alexa device can see the cameras on the local network. And the best part? It'll work with any camera that provides an RTSP stream!

Camera setup

The first thing I needed to do is to tell Monocle about my cameras, and the method in which to access them.

  1. Register for a Monocle account (free) and login.
    monoclecam.com
  2. Login to your UniFi Protect
    a) Click the camera you want to add
    b) Click Manage
    c) Click the quality you want for the RTSP feed. In my case I picked medium - im not going to need a super high resolution video feed on the small display of my Echo Show 5.
    d) Copy the rtsp address that is geneated
    file
  3. Back in the Monocle dashbaord, click Add Camera Feed.
    file
  4. Fill out all the details and paste in the camera feed url you generated in the previous step.
    file
  5. The @tunnel tag is the tag used to instruct Monocle to forward connections from an Alexa device to the camera on your local network. This basically tells Monocole to create a secure tunnel connection directly between the camera and the Alexa device.

Gateway setup

The gateway is what communicates to the cloud hosted Alexa skill, and uses the details configured in the steps above to tell my Echo Show how to communicate with my local camera.

The documentation has some great instructions on how to configure the gateway on a variety of different systems, but in my example i'll be setting it up on a RaspberryPi.

On a freshly configured RaspberryPi:

  1. Create a configuration directory
    sudo mkdir /etc/monocle
  2. Generate an API token from the Monocole dashboard
    a) Login to the Monocle Dashboard
    b) Click your username --> My Account
    file
    C) Click Add API Token
  3. Create a file called /etc/monocle/monocle.token and paste the API token.
  4. Download and install the Monocle Gateway
    curl -O https://files.monoclecam.com/monocle-gateway/raspberrypi/monocle-gateway-linux-raspi-v0.0.4.deb
    sudo dpkg -i monocle-gateway-linux-raspi-v0.0.4.deb
  5. Confirm the gateway is running
    monocle-gateway --tail

    Look for the Look for the MONOCLE RTSP SERVICE - INITIALIZED message; this means that everything started successfully and the gateway is fully running.

  6. Configure the Monocle Gateway to start on boot
    sudo monocle-gateway --enable

Echo Show setup

With the gateway configured and allowing my Echo Show to talk to my cameras, now its time to set them up as devices on the Echo.

  1. Discover the cameras using the voice command "Alexa, discover devices"
  2. Once the device has been discovered, thats all that's needed. You can exit discovery mode now, or continue to configure some of the minor settings.

That's it! Super simple.
Now I can view the camera by simply saying:
"Alexa, show the Workshop"

What do you think?