fritz-smh / yi-hack

Xiaomi Yi Ants camera hack
1.39k stars 333 forks source link

DDNS (NoIP)?? #76

Open kostas125 opened 7 years ago

kostas125 commented 7 years ago

Hello and congrats dude!

Is it possible to update my NoIP from my camera with an embedded script??

Keep up the good work mate!!!

robertbeal commented 7 years ago

Need to find a way to use cron. But if you can use cron on the camera, simply get cron to run the below periodically:

#!/bin/bash

echo "Updating Dynamic IP..."

# No-IP uses emails as passwords, so make sure that you encode the @ as %40
USERNAME=foo
PASSWORD=bar
HOST=foobar.no-ip.org
IP=$(wget -O - http://icanhazip.com/ -o /dev/null)  
curl -u $USERNAME:$PASSWORD "http://dynupdate.no-ip.com/nic/update?hostname=$HOST&myip=$IP"