How to add a webcam to the map in the IoT Project - Public Monitoring Project

My Webcams | How to add a webcam to the map | City webcams | Photo archive from webcam | Video broadcast from webcam

+ How to add your webcam to the map

First of all, you should be aware that it is prohibited by law to install and publish Webcams that violate the privacy of citizens, as well as to add webcams from other people's websites without the permission of their owners.

1. Buy a digital webcam with the ability to connect to WiFi or Ethernet network based on the optimal price/quality ratio for you. In addition to expensive domestic solutions, there are also many Chinese WiFi/IP cameras with HD quality. You can also connect a USB-camera, but it will be more difficult to configure it and you will need to keep your computer constantly on (or connect to a router with OpenWRT firmware) and the quality is usually worse than that of standalone Webcams.
The main requirement is that your webcam provide the ability to download JPEG images over HTTP or provide RTSP/MJPEG video stream.
The forum 4PDA will help you to choose the right camera model and find out the addresses of the streams.

2. Install and connect your webcam to the Internet according to the instructions from its manufacturer (if not, then 4PDA will help you) and connect it to the Internet (for example, through your home or office network).

2.1. If you have a public IP: configure port forwarding (DNAT) on the router from the Internet to the webcam (if it has a local IP) and dynamic DNS (if you have not purchased a permanent public IP from your Internet provider).

2.2. If you have a gray IP: install the curl package on your home/office PC or router with OpenWRT (located in the same local network as the webcam) and configure it to download images from the webcam with their further upload to http://narodmon.com/post using the HTTP POST multipart/form-data method, using the value of the secret key created in the webcam registration dialog in the project as the file variable name.
The images received by the server are controlled by the URL http://narodmon.com/me from your local network.
Example: curl -F 'yourkey=@/path/to/image.jpg' http://narodmon.com/post

3. Log in to the project on its website or in the official application, specifying your e-mail (e-mail) or mobile phone number or use the social network of your choice.

4. In the "Cameras" section of the site, select "Add my webcam", fill in all the fields of the webcam registration form in the project and click "Save". If the camera is set up correctly in step 2, you should download the 1st picture from it (in case of RTSP in 2-3 minutes), otherwise you will receive an error message that should be read carefully and fix the specified problem.

5. Make sure that your webcam returns the correct Last-Modified HTTP header with the time of the last change of the webcam image UTC+0. This is necessary to prevent re-downloading of unchanged images and displaying the correct time of the image. Check out and learn more about Last-Modified at last-modified.com.