Question

I am trying to setup a system for automating certain tasks in my home.

I am thinking of a solution wherein a server side application would be able to send/receive commands/data to Arduino (attached with Arduino Ethernet Shield) via the web.

Here the Arduino may both act as a sensor interface to the server application or command executor interface for the server app.

E.g. (user story):

  1. The overhead water tank in my house has a water level sensor attached with Arduino (attached with Arduino Ethernet Shield).

  2. Another Arduino (attached with Arduino Ethernet Shield) is attached with a relay/latch. This relay/latch is then connected to a water pump.

  3. Now the server side application on the web is able to get/receive water level information from the Arduino on the water tank.

  4. Depending on the water level information received, the web application should send suitable signals/commands to Arduino on water pump to switch 'ON' or switch 'OFF' the water pump.

Now for such a system to work across the web, I am thinking of using one of the type of solutions in order of my priority:

  1. Using XMPP for communication between server application and Arduino.

  2. Using HTTP polling.

  3. Using HTTP hanging GET.

For solution number 1, I need to implement a XMPP client that would reside on Arduino.

Is it possible to write a XMPP client small enough to reside on an Arduino?

If yes what are the minimum possible XMPP client functionality that I need to write for Arduino, so that it would be able to contact XMPP servers solutions like GTalk, etc.?

For solution number 2 and 3 I need guidance in implementation.

Also which solution would be cost effective and easily extendable?

Was it helpful?

Solution 8

After looking into all of the available options I was not satisfied with any.

Currently I am working on to put my own solution to the problem that i defined above.

The solution is on the lines of the comment that i replied to 'Dustin' above.

Will post the project URL as soon as i come up with the first release of my solution here.

OTHER TIPS

You can take a look at MQTT, it has an arduino library, its a simple publisher-subscriber message broker.

I don't think I'd look for any of those for what you're trying to do.

Just feed the sensor data out of the Arduino on a given interval and have the other side do the smarts.

Also, for these types of projects, I've been looking to avoid the Ethernet shields and use either XBee or RFM12B. These would guide you in that direction, but more importantly, make it far easier to have lots more devices doing both telemetry and control.

If there were something like XMPP that ran on the Arduino, it'd be a really stripped down presence protocol proxied through a smarter server-side process. That is, it'd be a similar amount of work. Though it may be possible, XMPP in 1 KB of RAM alongside your application code sounds really painful.

We're working on an open source relay infrastructure to make Arduinos (and any other device supporting TCP/IP sockets) accessible over the Web. Your application could then call the Arduinos through a simple REST API. See http://www.yaler.org/ for more info and a live demo.

Regards, tamberg

There is a project in development, has policies and data recorder capabilities. (sensors/any_data_source over xmpp) http://middlewaresensing.wordpress.com/

Why not use the good old RS485 to reach the sensor actuators? Just invent some simple protocol (address, command, data). If you need something more complex, use another guy as a RS485/ethernet bridge.

Open source project

Manage sensors and networks | record sensor data | charts | policies | history/date/sensor rules | sms/email/url/twitter/xmpp notifications | event logging | Google Maps | and much more

demo at http://dev.hci.uma.pt/sawa

wiki at dev.hci.uma.pt/mediawiki/index.php

blog at middlewaresensing.wordpress.com

You can use send data to server using HTTP Post, then sensor data is published via XMPP. HTTP Post (for resource limited devices, such as arduino) and sox_tools a xmpp client for publish via xmpp on this system

There is a new library for making REST-like HTTP requests and receiving JSON responses on an Arduino (with Ethernet) called RESTduino. It could be useful drop-in HTTP interface for your Arduino project.

http://jasongullickson.posterous.com/restduino-arduino-hacking-for-the-rest-of-us

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top