The use of the ESP8266 in the world of IoT

User avatar
By lindnerlars
#86812 So, now I am also hooked up on the new IOT Home Automation wave and want build some applications for my family (dimming light, water heater temperature control). The controlling part is not the problem, I think I can say, I have good experience in Arduino development, like also in C, C# and so on. I have no experience in Android app development and I am also new to the ESP8266.

I want to create a fast and reliable communication between a self-build Android app and my ESP8266, to send variable values, Boolean and more. I was reading some posts and tutorials and came to the conclusion, that using WebSockets would be the best approach for this. Now, can I ask you, to give me some material / information please, how to start. I only found the MIT App inventor (https://appinventor.mit.edu/) and this nice tutorials:

https://tttapa.github.io/ESP8266/Chap01 ... P8266.html
https://leanpub.com/kolban-ESP32

I want to learn correctly, how this communications is working and how to implement WebSockets correctly in the Arduino ESP8266 and as Android App.


Thanks everybody for your time and effort and with best greetings from the hot Mexico.
Un saludo a todos hispanohablante :)
Lars
User avatar
By survivingwithandroid
#87413 Hi,

i was wondering why you need to use Websocket. I've made something like it using an Android App implementing a simple API server on Arduino, but you can use the same code with ESP8266.

https://www.survivingwithandroid.com/ar ... t-api-iot/ or https://www.survivingwithandroid.com/co ... eb-server/

Here you can find the source code too
Let me know if it helps you
User avatar
By lindnerlars
#87502 Hi "survivingwithandroid", thank you for your answer and maybe you are right.

As far as I understood, WebSockets can be used to implement a web communication, which sends and receive data in real time. For me this means, that if I want to implement a fast communication, I should probably use WebSockets. Of course, if you don't have a real-time requirement, then you don't need it at all.

Also, I would like to send and receive data, without sending html-strings or similar. I rather prefer, to write my data to a certain address or something like that, than sending strings over the wifi / web. But I don't know, if this would be possible using WebSockets.


Thanks again for your shared links and best regards
Lars