arduino and smartphone to turn on home AC

Hi,
so im really new to arduino and before i go and buy all of the modules possible for my project i figured i should ask someone who knows :slight_smile:

I want to be able to turn on my home airconditioner using my smartphone (android) from a distant location.
so i figured im going to need :

  1. IR module to simulate the airconditioner remote.
  2. a wifi module to connect the arduino to my wireless router ( i want this to be an independent unit).
  3. power supply
  4. arduino microcontroller
  5. smartphone
    so i guess my basic question is - is this possible ? (im not sure how i can communicate with the arduino once its connected to my home network, the smartphone is not connected to the same local network and i guess my local ip is static but the router ip changes every time it connects and disconnects right?)

if its possible ill appreciate module recommendations (and microcontroller as well) of course a detailed explanation with references etc. is greatly appreciated.
thanks

Do-able? Yes.

Novice level work? My opinion varies from a "Eh, not really" to a very resounding "No", depending on how indepth you want to get.

Perhaps the Treeduino makes a good starting place? http://www.instructables.com/id/Treeduino-The-Web-Controlled-Christmas-Tree/

sitzikbs:
but the router ip changes every time it connects and disconnects right?)

Depends on the ISP, but a lot of companies now-a-days will "assign" you an IP address. If it does change, you can use a dynamic DNS service that will give you a web address to use instead of the IP address.

thanks.
so how would you approach this challenge?

sitzikbs:
thanks.
so how would you approach this challenge?

Don't go out and buy everything you need, throw it all together, write a bunch of code and sit back and pray.

Start with getting one part of it working and build from that. Just as an example, I would get the IR module working first, perhaps with the Serial monitor to accept commands or just a button, before even touching WiFi.

sitzikbs, I'm working on exactly the same project!
I had a lilypad lying around, so I did my prototyping on that before I went and ordered a Mega compatible microcontroller off eBay.
I found this IR library, which is excellent: http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
and after much probing, discovered that AC remotes send out the entire state of the AC, and thus the signal they send can be quite long. This modified version of the library takes care of that: 64-bit RC6 codes, Arduino, and Xbox remotes
You could use this library to record the codes your AC remote sends, and then repeat them. I found that creating a simple oscilloscope via an LED plugged into the mic in and running Audacity is a good way to double check the codes interpreted by the above library. If you want to take it a step further (as I have), you could take the time to reverse engineer the IR codes your remote uses, and expand on the library (or even contribute the codes to LIRC).

The next step is creating a webserver on the arduino, and having it serve a simple page to the phone's browser. The treeduino looks useful. I'm going to go over that myself too.

-Ethan

Another ready to go is Arduserver (you still need to connect to the air-con controller).