-->
Page 1 of 4

Newbee: Very general question wrt iot usage of the esp

PostPosted: Sat Jan 02, 2016 8:43 am
by Arduolli
Hi everyone;
I hope I am in the right thread to post this.... I read through a lot of posts / searched the forum w/o finding an answer, so here it goes:
This is what I want to do:
I would like to use an esp (programmed via Arduino IDE) to read a gasmeter (reed switch on an gpio): Each time the reed switch is activated (shortest interval 3 seconds), the esp should send the reed switch count (and possibly a time stamp) over the Wlan to a Server (running Ubuntu), where this information needs to be stored in a file. (visualisation / analysis of this data will be done independently)
My question: How can the communication part be established in the most lightweight & simplest way - on the esp as well as the server side?
What protocol to use ? Bare tcp? Udp? Mqtt? Other?
I am searching for the lightest solution, which a newbee like me can implement fairly easily - on both ends.
(The server side is running a barebone ubuntu on a small atom based device ("Joggler"); main purpose of this setup is beeing a Music server w a dedicated gui, so the solution I am looking for should run headless.
Hope anybody can help me with this. Thanks - and: great forum - great people!

Re: Newbee: Very general question wrt iot usage of the esp

PostPosted: Wed Jan 06, 2016 12:34 pm
by Arduolli
Slight bump...I am surprised nobody answered to my question so far ....
I thought this has to be THE question every beginner wonders about who wants to read out a sensor over WLAN....Maybe my post was too wordy and / or misleading. So, I try it again:

When using the esp8266 as a standalone system (programmed via Arduino IDE):
What is the simplest way to store the read out of a local GPIO on a remote server (within the LAN, not Internet)?
What is needed on the esp8266 sending side and what on the receiving side in terms of software?

Any hints would be greatly appreciated.

Re: Newbee: Very general question wrt iot usage of the esp

PostPosted: Wed Jan 06, 2016 1:10 pm
by martinayotte
There are so many ways to do such thing... ;)
Personally, I would do that with bare TCP client on ESP along with TCP server on the Server using python script that will write result in a MySql database.

Re: Newbee: Very general question wrt iot usage of the esp

PostPosted: Thu Jan 07, 2016 12:03 pm
by Arduolli
Hi martinayotte;
thank you for your reply suggesting using TCP.
Can you lead me somewhefe to get started?
Some example code for the esp TCP client side?
That would be great!