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.
No comments:
Post a Comment