English 中文(简体)
Home automation using Arduino / XMPP client for Arduino
原标题:

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?

最佳回答

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.

问题回答

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





相关问题
How to set response filename without forcing "save as" dialog

I am returning a stream in some response setting the appropriate content-type header. The behavior I m looking for is this: If the browser is able to render content of the given content type then it ...

Which Http redirects status code to use?

friendfeed.com uses 302. bit.ly uses 301. I had decided to use 303. Do they behave differently in terms of support by browsers ?

Does HttpWebRequest send 200 OK automatically?

Background: I am implementing Paypal IPN handler. This great article on Paypal states that I am required to send a 200 OK back to Paypal after I read the response. The processing of IPN request is ...

Java HTTPAUTH

我试图把桌面应用程序连接起来,我是同D.icio.us api @ Delicious Alan书写的,简单地向他们提供我的用户名和密码,并请他把书记上写给我......。

Finding out where curl was redirected

I m using curl to make php send an http request to some website somewhere and have set CURLOPT_FOLLOWLOCATION to 1 so that it follows redirects. How then, can I find out where it was eventually ...

热门标签