29th of September, 2019
This is generic for any RTSP camera and works fine with the HikVision Doorbell camera
Getting
Started with Monocle (Alexa RTSP skill ==> "Alexa show me front door"
Prerequisites
Location - make sure that Monocle is supported in your country / region - English only at this time:
Austria
Austrailia
Canada
France
Germany
India
Italy
Mexico
Spain
United Kingdom
United States
Supported Alexa devices
Amazon Echo Show 5®
Amazon Echo Show®
Amazon Echo Spot®
Amazon Fire TV® Stick 4K
Amazon Fire TV Cube®
Toshiba 4K Smart LED TV - Fire TV Edition
Amazon Fire TV® 4K
Amazon Fire TV Stick®
Amazon Fire Tablet®
Supported Cameras
Streaming Protocols RTSP / RTP
RTSP Command support : describe, setup, play and teardown (thinking most or all cams have this)
Video format : H264
Audio format: AAC / G711
Feed authentication methods: HTTP digest authentication
RTSP URI responsiveness: much occur withing 6 seconds
Steps:
1 - Create a Monocle account ==> hxxps://portal.monoclecam.com/register
2 - Define a camera feed
[sharedmedia=gallery:images:1253]
3 - add the Monocle Alexa skill ==> search for skill and add and configure it.
4 - Alexa ==> discover devices
5 - ask Alexa to show camera names
Adding a Monocle Gateway - here installed it on my current Ubuntu 18.04 automation computer ==> hxxps://monoclecam.com/monocle-gateway
The Monocle Gateway is a small service that runs on your local network to coordinate communication, encryption and security between your Alexa enabled devices and local IP cameras. When using the Monocle Gateway service, all camera steaming communication (RTSP) is securely routed through the Monocle Gateway service via SSL/TLS encrypted communication on HTTPS port 443.
[sharedmedia=gallery:images:1254]
Here is the Ubuntu way (many methodologies are listed)
1 - Download latest Monocle Gateway
Code:
curl -O hxxps://files.monoclecam.com/monocle-gateway/linux/monocle-gateway-linux-x64-v0.0.4.deb
2 - create configuration directory
3 - Monocle API token for Authentication
Generate and download your Monocle API token from your user account page in the Monocle web portal. See this topic for more details on how to generate your API token ==> hxxps://monoclecam.com/monocle-gateway/api-token
Once you have downloaded your monocle API token file, move or copy it to the Monocle system configuration directory: /etc/monocle/monocle.token
4 - Install Monocle Gateway
Code:
sudo dpkg -i monocle-gateway-linux-x64-v0.0.4.deb
5 - Confirm Monocle Gateway is Running
6 - If Monocle Gateway starts up successfully and established a connection to the Monocle platform , then you will get a print out that includes verbiage
MONOCLE RTSP SERVICE - INITIALIZED
7 - Configure one or more cameras for use with the Monocle Gateway service.
8 - Test your configured cameras with the Monocle Gateway service.
Service / daemon management
1 - Start the Monocle Gateway service:
Code:
sudo monocle-gateway --start
2 - Stop the Monocle Gateway service:
sudo monocle-gateway --stop
3 - Restart the Monocle Gateway service:
Code:
sudo monocle-gateway --restart
4 - Get the Status of the Monocle Gateway service:
sudo monocle-gateway --status
5 - Enable the Monocle Gateway service on system boot:
Code:
sudo monocle-gateway --enable
Code:
6 - Disable the Monocle Gateway service on system boot:
Code:
sudo monocle-gateway --disable
7 - Logging
sudo monocle-gateway --tail
8 - removal instuctions:
Code:
sudo dpkg --remove monocle-gateway
sudo rm -R /etc/monocle
Here is what you see when you log in to the Monocle gateway service (using two test cams and doorbell cam)
[sharedmedia=gallery:images:1255]
and this is what you see under Alexa devices after a discovery.
[sharedmedia=gallery:images:1256]