[Bayres’] dad setup a webcam as a surveillance camera for a remote property. The only problem was that the only stable Internet connection they could get at this property was DSL. This meant that the external IP address of the webcam would change somewhat often; the needed a way to keep track of the external IP address whenever it changed. That’s when [Bayres] built a solution using Arduino and an Ethernet shield.
The main function of this device is to monitor the public IP address and report any changes. This is accomplished by first making a request to checkip.dyndns.org. This website simply reports your current public IP address. [Bayres] uses an Arduino library called Textfinder in order to search through the returned string and identify the IP address.
From there, the program compares this current value to the previous one. If there is any change, the program uses the Sendmail() function to reach out to an SMTP server and send an e-mail alert to [Beyres’] dad. The system also includes a small LCD. The Arduino outputs the current IP address to this display, making it easy to check up on the connection. The LCD is driven by 74HC595 shift register in order to conserve pins on the Arduino.
The system is also designed with a pretty slick setup interface. When it is booted, the user can enter a configuration menu via a Serial terminal. This setup menu allows the user to configure options such as SMTP server, email address, etc. These variables are then edited and can be committed to EEPROM as a more permanent storage solution. Whenever the system is booted, these values are read back out of the EEPROM and returned to their appropriate variables. This means you can reconfigure the device on the fly without having to edit the source code and re-upload.
Why wouldn’t somebody use a simple dynamic DNS service that could likely be ran on the webcam itself? You are literally already using Dyndns to find the IP…
Agreed. this thing is redundant and total overkill. Dynamic DNS updating + free public subdomain = a better and a free solution with no required specialty hardware. He wouldn’t need to get the IP emailed to him, he could just use a regular old web address everytime.
Because it’s Hackaday.
hackers gonna hack
Bizarre. Maybe it’s because dyndns wants you to pay now. No-ip.org is still free though and supported out of the box by openWRT (as are several other free DNSs).
Almost all IP cameras come with a free dynamic DNS service. the $19.00 clearance Dlink devices even have it.
dns is chargeable (if your set up is in another country)
Also DD-WRT will work with dyndns to keep everything updated. My dynamic IP with frontier has been very static, it has not changed in a couple years now.
On the other hand my provider disconnects me every 23h just to change my ip. They hidden this behind clause “ISP reserves right to maintenance disconnection”. Orange Poland – the worst provider in Poland.
Many ISPs in Europe do that. Reason for that is their “fixed IP” option which usually costs you more than internet connection so they do not want you to have fixed IP if you’re not paying for it. If you pay for that option they disconnect you every 24h but you get the same IP every time.
Wow, that is rough.. I am glad I don’t have to deal with that level of ISP crap
The arduino can make http get requests and get the external IP of the network it is connected to.
Then it can update a free dyndns at afraid.org using their HTTP API.
Boom, I just made this a whole lot easier, it could even auto setup via DHCP.
I am currently constructing a raspberry pi b+ as a security system, and had this very thought as well.
http://hackaday.io/project/4542-raspberry-pi-security-system
I’ve almost finished the hardware portion of my build and need to find some time to get the software the way I would want it. Something similar to YAWcam.
Best service for getting your external IP is ipecho.net/plain
I prefer http://wtfismyip.com/text
http://icanhazip.com/
http://www.moanmyip.com/
The best way is to run your own VPS sevice and connect to that, and for ~$3 a year a server isn’t that expensive anymore, it’s even cheaper than dyndns.
Rick… Third sentence in. They needed a way?
Pedant alert – I’m guessing the shift register is a 74HC595, not a 74HC959. The text is correct, but the tag says 959.
Before I started reading the comments, I had checkip.dyndns.org written down on a sticky note. While reading the comments, I read that it is fee based. Now that is scratched off my sticky note and I have afraid.org, No-ip.org, and ipecho.org/plain on the sticky, Thanks commenters!
Then you got things confused a bit ;)
(dyndns the dynDNS service costs money, afraid.org and no-ip are alternatives to it. checkip.dyndns.org and ipecho.org/plain are sites that just tell you your IP address and are free)
Ive been using no-ip,org for a couple years now… I am pleased with the free service enough to consider the paid. (free service requires clicking an email link and entering a Captcha once a month to keep it active.)
I use it to keep my purchased domain name pointed at my home server.
I am a bit confused with this, but hey. There’s many ways to skin a cat. I’d’ve just used no-ip and be done with it.
Driving the LCD with a shift register is a great idea. Can you share the code for that?
There you go : http://www.instructables.com/id/Hookup-a-16-pin-HD44780-LCD-to-an-Arduino-in-6-sec/
You can buy already made serial backpacks for 16×2 LCDs on the eBay, but DIY solution is really simple and easy made.
you are better off getting cable modem because even dsl is unstable.
Why not just upgrade to a static ip over dsl. I have a small business and believe me, money is tight, but we run static dsl ip’s. We have to have it was because our point of sale system must talk to a server somewhere out there in the world, and they require a static ip to whitelist. I couldn’t imagine running people’s credit card info over a free to use dynamic ip provider. Oh and we have an ip cam and recorder, so yes it made perfect sense to upgrade.
The data does not run through the providers network, dynamicIP providers just offer a service that seeds the worlds DNS nameservers with your domain\IP info.
…it’s like… DynIP are the people that collate the names\numbers to print, the nameservers are the phone book and the internet is the phone system. Just because you looked the phone number up in the phone book doesn’t mean someone at the Yellow Pages office is listening to your phone call.
not if your cable modem provider is comcast, in which case you are better off with a 300 baud modem
Ouch, why not use the dyndns service direct? The Arduino should be capable doing this, too. Or the router software should be able, so you have a device less to fail.
lol this is literally the most idiotic thing I’ve seen on HaD. I honestly don’t think I could come up with a worse way of doing this.
As others have said, there are many free DDnS solutions he could have used, most of which are probably already built in as an option on his modem, router or the camera itself.
You are all correct, a free DDnS service would have been a much easier solution. I looked at many of them before putting this together. None of them would work because there was no DDnS support on the DSL modem or camera system (yes it was a cheap camera setup). The only alternative was to run a DDnS client on a PC 24/7, this wasn’t an option because there was no PC permanently at the property. Paying the ISP for a static IP would have more than doubled the price of the internet service. I’m sure there are other, better ways to do this but this worked and was low cost.
The last sentence sums the whole thing up. Sure there are a million ways to do this, but it worked and was low cost. Game, point, match.
If you ever find yourself revisiting this then maybe look into 3rd-party router firmware like OpenWRT or DD-WRT? In addition to supporting more DynDNS providers some firmwares also would allow you to log into the router remotely via SSH or with a browser using a built in webserver.
3rd-party firmwares essentially turn routers into low-level linux machines… I’m sure something could even be rigged to regularly reboot the remote system… (modem, router, cameras… all of it)
…or like you said… cheap, easy and it works- no need to go fiddling and break it, right?
Thanks that’s a good suggestion. I didn’t consider 3rd party router firmware when I did this.
You are all correct, a free DDnS service would have been a much easier solution. I looked at many of them before putting this together. None of them would work because there is no DDnS support on the DSL modem or camera system (yes, it is a cheap camera setup). The only alternative was to run a DDnS client on a PC 24/7, this wasn’t an option because there was no PC permanently at the property. Paying the ISP for a static IP would have more than doubled the price of the internet service. I’m sure there are other, better ways to do this but this worked and was low cost.
I have a Juiper SSG-5 router. It does DynDns. Why reinvent the wheel. That is how my dynamic IP is resolved. Way to complicated to do what was done in this article.
Just about any router with DD-WRT will do this in 2 minutes of setup. These routers are cheap compared to a Juniper router.
Arduino – for people not capable of one line scripts
One line trolls…
…for people that lack creativity.
Already do this with my Pi. Haven’t activated the comparison part yet because I’m using it to send messages about house temp in the winter with all the cold. but that’s the next upgrade to that feature.
There is another case where this would be useful.
I have a remote site with it’s internet supplied by the mobile network. Unfortunately the modem/dongle i have doesn’t support bridged mode so the main router is actually behind the router built into the dongle. The main router never sees the real public IP address, only the local address supplied by the dongle. So a built in DDNS client in the main router doesn’t work. And the dongle has no
But a $2 arduino setup that makes a request to one of the services listed in the comments to get the public IP and then send that to the NOIP server to update the listed public IP would likely work. NOIP has a simple HTTP GET format that would make the update trivial. https://www.noip.com/integrate/request
Yes, i could change the hardware (dongle and main router) to a mobile and DDNS capable router.
But the $2 solution looks better than a $100 solution.
i want to buy this