Control Arduino over Wi-Fi with ESP8266

Hey!

I'm building an Arduino controller for an espresso machine. I have the hardware and software part (LCD, buttons, pump and heater control etc) more or less finished.

Now I'd like to control the machine from my mobile phone over Wi-Fi. I bought ESP8266 Wi-Fi module and got it connected. I was able to connect to my home Wi-Fi and also send some POST and GET messages to the module.

Now that I know the module itself works I want to get things serious and think about the solution to actually control the Arduino and read data from it. I need to:

  • read data from Arduino (temperature)
  • write data to Arduino (target temperature, PID settings)
  • execute functions on Arduino (start machine remotely) - this could probably be done by changing some boolean state so it's actually writing data

Can you tell me what protocols and Arduino libraries I should look into?

edit:
Personally I found REST architecture promising. But maybe normal POST GET requests will do?

Eventually I want to create an iOS app to control the espresso machine so the protocol has to be relatively easy to implement there.

Lastly, I want to actually build it so the communication has to be reliable.

Please help and give me some ideas how to accomplish this :wink:

Personally I found REST architecture promising.

For what? You don’t seriously expect the Arduino to make a web service request, do you?

But maybe normal POST GET requests will do

Oh, good.

Eventually I want to create an iOS app to control the espresso machine so the protocol has to be relatively easy to implement there.

You’re kidding, right? You want to use a difficult to implement language and process to communicate between the iPhone and the Arduino, and you want the definition of the messages to send back and forth to be easy.

I think you are being too harsh on me.

My ideas were based on Adafruit tutorial along with their aREST library. It shows that it’s not a problem to control Arduino over Wi-Fi. My main question is whether this library works with ESP8266 connected to Arduino? It certainly works with ESP8266 as a standalone unit.

When I asked about POST GET I was inspired by this tutorial.

Finally, making a simple iPhone app that is capable of making REST calls shouldn’t be that much of a problem.

Once again my questions:
Do you know if it’s possible to use aREST library with ESP8266 connected to Arduino Uno? Maybe there are better solutions?
Do you see some major flaws in my plan?
Do you have ideas how to make it easier/better?

Thanks :wink: