Best way to Control an Arduino from Anywhere on Earth??

Hello everyone, I am not quite new to the forums but have not posted here in a long time! It's great to be back!!

So I'm building a home-automation system. Not really that difficult, if I wanted to, I could use a Bluetooth module and be done. However, I'd like to be able to control the Arduino (which will of course be the controller of the project) from anywhere on Earth (well, realistically, anywhere in the United States with internet access). I figured that at very least I'd need an Ethernet shield to connect to the internet (That way it can run independently and not need to be plugged into my computer at all times).

**ON A SIDE NOTE! I'd eventually like to add in some SMS functionality (i.e. a locked door/window has been opened, send me a text message) and will of course need a GSM shield. I know that the GSM shield has some internet functionality, would I need both a Ethernet shield AND a GSM shield, or just a GSM shield? Please let me know!

Anyway, back to the original issue. I've seen a lot of wireless Arduino applications but most are Bluetooth and that leads me to believe that you can only control the module within a certain range, such as 30 meters or so. I once created a simple project with TouchOSC where I created a custom interface (on my Ipod) to control a set of LED's connected to an Arduino which was hooked up to my laptop; but once again, the laptop that the Arduino was connected to and the mobile device needed to be on the same wireless network, so that's a no-go.

IDEALLY I would like to be able to be able to create an Android APP (a simple, custom interface to denote rooms and appliances that I would like to control) that I could then connect to the internet with via mobile device and then connect to the Arduino which is in my home.

Is that a good idea? Would I need to place the APP in the Google store to use or could I just upload it to my mobile device? Are there better ideas? Would it be better to not create an APP and instead run everything on a website? Would this be expensive? These are the questions that I really would appreciate some help with. I can probably figure out HOW to do most of it, I would just like to be pointed into the best direction so that I don't spend weeks working one something and then find out that it's not a feasible idea.

I also saw this, the ArduDroid (Andruino): ARDUDROID: The 2-Way Android Controller for Arduino via Bluetooth - YouTube which might work, but again, I think this is just a Bluetooth device that won't work for great distances.

Please let me know if anything I said was unclear. I have the entire idea drawn out, I would just like the best implementation. Thanks in advance for any advice and ideas! Cheers! -Joe

All you really need is an arduino ethernet. You can run a web server on it and connect to it from anywhere that has internet access. For SMS, your cell carrier will have a web site that lets you send texts to its subscribers. Your phone can hit the web site too, no special need to have a custom Android app. The other advantage of this hardware is that given you have an SD card, you have additional capacity to serve up more numerous and more complex pages.

If your web site needs are greater, consider a mega or perhaps an RPi to act as front man for the arduino.

Hey its not controlling it from anywhere you have to connect through Bluetooth and Bluetooth can go about 10 feet or so

To control anywhere....

You need a network shield, configure your modem for port forwarding, put in your details for your arduino.
The tricky part comes next.

Create a web server or write an app.

Both methods have pro's and cons, the webserver way will quickly exhaust your resources, memory, you also have to worry about anyone accessing it and then waste more resources protecting it.

The app way would mean a much easier way arduino side, easier to write arduino side if you use an app.
. But the down side is without a webpage, it's going to be tricky to remote control on any device without an app.

All you helpers forgot that the OP is behind a home internet service dns and may not have a website that he can use. In case this is true, he needs a dynamic dns service to expose his arduino shield IP address. It is not free but cheap enough.

Running an arduino as a server behind a home router is a fairly easy setup. The arduino can serve up web pages, but the pages can be served from other servers, or probably only exist on your android. Most cell phone carriers have email SMS gateways to which the arduino could send messages. I use the no-ip free dynamic ip service for outside connections. Nothing terribly complex.

From what I've gathered, the best thing I could do is run a simple web server on an Arduino Ethernet Shield. I will look up some tutorials on how do do this (I've taken a .Net course AND a Web Applications course and it's still a concept I never fully grasped) and return with questions.

Someone mentioned a dynamic DNS service. Would this still be necessary if I was running a simple web server on an Ethernet shield? I assume so. How would I set this up and get the Arduino Ethernet Shield to communicate with it? How much would the service cost? I believe I could get a cheap DNS for only like $6/month.

Lastly, How would I go about creating a simple GUI for the mobile device? That's why I figured that an Andoid App would be best, for the interface. As I mentioned before, I have used TouchOSC which I really liked, but am unsure of its capabilities for this application.

Thoughts? Thanks Everyone! -Joe

Here's actually something that I had saved in a playlist from years ago. Felt it might come in handy one day haha.

It's an X2 Gateway from Sparkfun. This one connects to the internet via an Xbee Shield and has pre-made hosts for access at all time (I assume for free). This seems very feasible, just got to figure out how to make a nice GUI. Also...Python...haven't done that in several years, may need a refresher haha

-Joe

She kind of brushed over many things. I remember this video from some years ago when I didn't know anything about xbees. I think the present day solution may be the XIG, or xbee internet gateway. It allows two-way communication between xbees and the internet, via the digi device cloud (now etheros). You don't pay for this service with a simple developer account. I have the gateway X4 and a bunch of radios for a project :smiley: They are cool!

liudr:
You don't pay for this service with a simple developer account. I have the gateway X4 and a bunch of radios for a project :smiley: They are cool!

So you think this may be my best avenue? How is the user interface on the device-side? Is it bare-bones typing like she was doing or is it customizible? -Joe

I don't know the exact Python script she put on the gateway. I am using XIG so yes, you can reach your xbee by posting to the device cloud and waiting for reply. The cloud will forward your message to the X2 gateway and then the xbee, so your led lights up.

Commands section D. I just tried. It worked.

zoomkat:
Running an arduino as a server behind a home router is a fairly easy setup. The arduino can serve up web pages, but the pages can be served from other servers, or probably only exist on your android. Most cell phone carriers have email SMS gateways to which the arduino could send messages. I use the no-ip free dynamic ip service for outside connections. Nothing terribly complex.

Pre-written pages can be served from SD cards, and dynamic content can be made with pre-written templates and some Javascript.