SQL Queries

Hello all,

Im having an issue trying to figure out a solution.

We have 3 door monitors using arduino unos that detect if a door is open and tracks how long. if the doors are open for more than one minute an alarm sounds and an email is sent to the COO and shift supervisors and makes a database entry so that trends can be monitored and tracked. Theses controllers can be disabled by a key should the doors need to be opened for longer than 1 min. This all works perfect but the COO would like to be able to go to a website and disable them for duration he enters. the logic I'm thinking would be to post to a db that they have been disabled and then the arduino could check this db and start a countdown for the set duration. My issue is how to get the data from the db to the controller. Is there an sql library that i haven't come across yet?

Any suggestions would be awesome!!


See this

Seems a rather roundabout way of doing this.
Why don't you just create a mechanism that directly sends(PUSH) a message to arduino to disable/enable/set duration etc.
What you are trying is to PULL the event, that too by using a database for a state event. Build some sort of script/CGI/servlet/asp/.net utility that receives the command through a web interface (whch you are doing anyway) and then propagates that message to the controllers. Why bother to write it to a database and then keep polling that db from the controller?

Anyway, who writes the log entries into the db, today? What interface do they use?

@HugoPT Thanks for the link! I'll look into that now!

@tttt The db entries are posted via php. We are wanting to retain the info in the bd for tracking and history so well know who disabled the controller and for how long. The issue with push is that the ethernet shield has to be setup as a client and not a server. Im sure there is a more efficient way of accomplishing my task but as of now this is the only one i can come up with.

Thank you guys for the help!