The opposite approach to over internet control of arduino

Please forgive me if this is a arduino networking noob question but I can't find an answer. I have a couple years experience with simple arduino projects but this is my first networking one. I find all kinds of examples of people controlling an arduino by hosting a website on the device itself, my question is can I host the site elsewhere and have the arduino monitor a mySQL database (or something similar) for changes. Why would I want to do this?.. I'm a web designer for a company that hosts its own sites. We have 5 static IPs. At home (where the arduino is) I don't have a static IP and I'd prefer not to use a service to mimic one. Thanks Guys.

Yes, and it's a far better way of doing things than putting "server" on an Arduino.

Basically What you need is an application on your PC/real server which will talk to the Arduino over the coms port/Ethernet/WiFi or what ever. I can't see why you would want an Arduino to Monitor an R-DB.


I didn't know there was a way to send information to the arduino without it having a static IP. The idea was a website with a simple interface that would change the values of a database then whenever the arduino queried the DB it would turn on a light or adjust the thermostat. (Yes this is another home automation project) If I can send an arduino a command directly that's perfect. How would I do that. If it changes your answer, I am talking about an arduino with an Ethernet shield connected to a router not an arduino connected to a computer.

I found the answer… I’ve been looking for four days and finally found something I can build off of. Thank you for your guidance it helped me find my answer. Anyone else looking for the method for the same approach I found it here… bildr Getting Data From The Web - Arduino + Ethernet - bildr

I've never configured ethernet, so I'd look at having the Arduino make the connection to the static IP on startup. And having an app on a free port on the server.


Use a normal web page to post data into your database.

Create a web service that exposes the data you want, in response to a specific GET request.

Have your Arduino running as a web client and periodically poll the web service. If there is data for the Arduino then it can parse the web service response and act on the data.

Decide on your polling interval based on how fast you need the Arduino to act to new commands posted into your database.

Once the Arduino has carried out the command you can even have it post back, again via a web service, into your database to confirm receipt and action to close the communication loop.

All nice and simple stuff for any web developer. :-)

Eric_Erb: can I ... have the arduino monitor a mySQL database (or something similar) for changes.

And do [u]what[/u] with them?

The Arduino can be a client just as easily as a server, although it's not obvious so far whether that's a sensible solution to your problem because you haven't explained what the problem is.

Sure PerterH, "Do what with them?" This is a home automation project so trip relays for the most part.

The Problem: I don't have a static IP to serve a website from the arduino at home nor do I want to use a service to simulate having a static IP. I do have Static IPs at work I can use. So, I wanted to know how to use it as a client to access a DB instead of serving a website from it.

I'm going to do exactly as tack said.

Im new to all this Arduino network/ethernet stuff as well..

but wouldnt the Arduino need an Ethernet shield then? in any fashion? to be able to 'connect' to this web service/site that is remotely hosted?

On the opposite side.. (and Windows based only) which is a bit different than your scenario as you have/want your web servers t be in another location form the Arduino..

but I have installed WAMP server locally on a PC..... created a FLASH based GUI/interface that allows me to send RGB values to a PHP script.. that in turn dumps the data to a com port that Arduino is listening to....

works great normally anywhere inside the LAN.. if I wanted to open it up the public.. I only need ot log-into my router...and forward any HTTP traffic to the machine with the WAMP (web) server running control the Arduino from the 'net'..

xl97, I am using an ethernet shield. I just didn't want to host the site on the arduino.

but wouldnt the Arduino need an Ethernet shield then? in any fashion? to be able to 'connect' to this web service/site that is remotely hosted?

Yes, but as the OP said he was using ethernet it was safe to assume that he was using an ethernet shield.