6 min to read
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.
I’ve got one setup in my woodworking workshop, and one covering the front entrance to my house.
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.
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.
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.
-
Register for a Monocle account (free) and login.
-
Login to your UniFi Protect
- Click the camera you want to add
- Click Manage
- 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.
- Copy the rtsp address that is generated
- Back in the Monocle dashboard, click Add Camera Feed.
- Fill out all the details and paste in the camera feed url you generated in the previous step.
- 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:
- Create a configuration directory
bash
sudo mkdir /etc/monocle
-
Generate an API token from the Monocole dashboard
- Login to the Monocle Dashboard
- Click your username –> My Account
- Click Add API Token
- Create a file called
/etc/monocle/monocle.token
and paste the API token. - Download and install the Monocle Gateway
bash
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
- Confirm the gateway is running
bash
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.
- Configure the Monocle Gateway to start on boot
bash
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.
- Discover the cameras using the voice command
"Alexa, discover devices"
- 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"
Comments