Search This Blog

Showing posts with label expose raspberry pi cam to public ip. Show all posts
Showing posts with label expose raspberry pi cam to public ip. Show all posts

Monday, October 9, 2017

How to get a public ip for a home camera running on Raspberry pi using motion.conf

IF you have attached a USB webcam to your PI and thinking to view it over the internet here is the way to do it.

Go to duckdns.org and login and get a url and the token.

Go to you pi and create a duckdns.sh script as shown below.

echo url="https://www.duckdns.org/update?domains=nameofcam&token=token&ip=" | curl -k -o /root/test/duckdns/duck.log -K -


Now go to crontab and create a cron entry like this.

*/5 * * * * /root/test/duckdns/duck.sh >/dev/null 2>&1

crontab reload

Make sure script has execute permissions.

Now test the url you specified in duckdns , you should see your camera ip being updated every minute.
Make sure you do a port forward on your router to the wlan ip of the camera.