The cronjob is delayed by 60 secs to allow networking to come up first. The proxy-start script is run as a cronjob as root at boot to start the RTSP proxy. You have to make sure nothing else is using that port on the server running the proxy. The proxy is therefore started with -p 8554 on the command line. In my case the proxy port is 8554 since the cameras have their RTSP port set to 554. The RTSP proxy needs to be on a different port than the individual streams. I didn't make the other changes that emtunc made (port and stream naming). I needed to set OutPacketBuffer::maxSize to 400000 bytes in live555ProxyServer.cpp to stop the feed from getting truncated. Setup the RTSP ProxyĮmtunc's blog provides excellent instructions on how to setup the proxy from Live555. You'll have to edit config.json to make it reflect your camera names and specs. The code emulates the camera configuration data that would normally come from a 3rd party camera cloud service. Replace the Lambda code in the template example with the code in index.js in lambda directory of this repo. The Steps to Build a Smart Home Skill and Build Smart Home Camera Skills on the Amazon Alexa Developers site give detailed instructions on how to create the skill and how the API works. Setup the Alexa Smart Home Skill and and Lambda handler There are several values in that file that need to be changed to suit your setup. Installation Steps Clone this repo Configure General SettingsĬopy config-template.json to a file called config.json. I used an existing server running Ubuntu 18.04 but a Raspberry Pi, for example, would be fine. A Linux machine connected to your LAN.IP camera(s) connected to your LAN that support streaming over RTSP and local recordings.You'll need the following setup before starting this project. A webserver running on the local linux machine that allows the Lambda instance to access the recordings stored by the cameras.In my case I used a node.js app I created called process-events.js. A program running on the local linux machine that uploads camera recording metadata to the Alexa Event Gateway via the Alexa.MediaMetadata Interface to enable the viewing of past events captured by the camera.A TLS encryption proxy on the local linux machine that encypts the stream from the RTSP proxy server and streams it on local machine's port 443.This component isn't needed if you only have one camera. A RTSP proxy running on the local linux machine that aggregates the streams from the cameras on the LAN into one front-end stream.An Alexa-enabled device with a display such as Amazon Echo Show or Spot.An AWS Lambda instance for handling the skill intents including camera discovery and control.The system consists of the following main components. I've described the project in some detail and outlined the steps below that I used to create this skill. Note: Please see my related smart-zoneminder project that enables fast upload of ZoneMinder alarm frame images to an S3 archive where they are analyzed by Amazon Rekognition or locally by Tensorflow and made accessible by voice via Alexa. To do that I had to develop an Alexa Smart Home skill plus some supporting components running on the local Linux machine. So I created the alexa-ip-camera project to solve this problem and enable me to view my home's live and recorded camera streams on Amazon devices such as the Echo Show, the Echo Spot and the FireTV. No camera cloud service is needed in my system which avoids associated recurring costs BUT the system is not Alexa compatible "out of the box". I also use Zoneminder as a Network Video Recorder and its mobile companion app zmNinja. In my case I have several Axis IP cameras around the house connected via a LAN to a local Linux machine and are configured to do motion detection and store recordings on the Linux box. This API is great but assumes you are using a cloud service for your cameras and has very specific security and streaming requirements that makes it challenging to connect standalone cameras. Many people like myself have IP cameras without a cloud service that perhaps they'd like to control using Amazon's Alexa Smart Home Skill API. Use Alexa's Smart Home Skill API with standalone IP cameras to stream live video and recorded video to an Alexa device without needing any camera cloud service. I am working with Amazon to fix things on their side but in the meantime the steps described below should work with the majority of Amazon devices. IMPORTANT NOTE: At the current time some Amazon devices may not work with this project because they don't properly manage the recent Let's Encrypt root certification expiration.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |