Pages: [1]   Go Down
Author Topic: Can I HTTP Post and events log somewhere  (Read 316 times)
0 Members and 1 Guest are viewing this topic.
New Jersey
Offline Offline
Sr. Member
****
Karma: 1
Posts: 482
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have an Arduino that has an Ethernet shield and I'd like to have a log of events so I can see if it's operating they way I expect.  The Arduino is not located near me, so I can't use serial monitor.  I'd like to use the Ethernet shield to post events somewhere online, then I could go to a URL and see what was posted.  I want it to be a running log.  For example, at 8AM it might post 1 event, at 8:30 a second.  If I went to the URL at 9:00, I'd see both events in the log. I don't want to go to one URL for the first event and a different URL for the 2nd. I know for posting code there are services like PostBin.  Is there anything out there that could do this?
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 115
Posts: 5380
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes. I use an Apache server using php/MySQL. There are several threads on the forum that cover this.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 46113
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could make the Arduino be a server, and serve up a log file that it maintains on an SD card.

If that won't work, getting a domain name and standing up your own server, with PHP and MySQL, is not that difficult or expensive, and you'd learn a ton of stuff.
Logged

New Jersey
Offline Offline
Sr. Member
****
Karma: 1
Posts: 482
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was thinking about the SD card + Webserver as an option if there wasn't an easier way.

I was also thinking about posting text to a Google doc spreadsheet via a form.  I did this with another project and it worked well for a couple weeks, but then it just stopped working.  I couldn't insert any more data into the spreadsheet.  I only had a couple hundred rows in the spreadsheet. Even when I deleted a lot of the old data, it wouldn't start working again.

I figured it wouldn't be too hard to 'install' Apache and MySQL on a server, but I assumed that it would be pretty hard to then actually get it working as described above for someone like me who doesn't know anything about Apache and MySQL.  Maybe I'm wrong and there are some good tutorials out there.
Logged

0
Offline Offline
God Member
*****
Karma: 39
Posts: 986
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Don't overlook Cosm: https://cosm.com -- especially as there are ready-to-go sample sketches and your application is right in their sweet spot.

Having said that, you can learn a lot by setting up and running your own server, and writing services in PHP or whatever.  Why not do both?

-br

Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 46113
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I figured it wouldn't be too hard to 'install' Apache and MySQL on a server, but I assumed that it would be pretty hard to then actually get it working as described above for someone like me who doesn't know anything about Apache and MySQL.  Maybe I'm wrong and there are some good tutorials out there.
Sounds like a good opportunity to learn. You can even test everything locally, without the Arduino knowing what you are doing. When the server works from a browser, then the Arduino can connect to it, and make GET requests, too. The GET request that the Arduino and the browser make are, under the covers, identical. The PHP script parses the data and INSERTs that data in the MySQL database.

MySQL can time stamp the entries, so that the Arduino/browser/user doesn't need to.
Logged

Pages: [1]   Go Up
Jump to: