Page 1 of 1

ESP8266 Gyro_Database

Posted: Wed Mar 27, 2019 8:08 pm
by samerou
dear all ,
Thank you for your support privatly or but respond to my questions but unfortuanlly I'm completly lost and getting my mind more messier ,
The probleme that I'm finding alot of information ( servers , uasyncio, mqtt,esp,...) but I can't find what I need to do So I decided to post Question with the exercice that I'm doing right now :

I'm using ESP8266 , gyro sensor and UpyCraft as plateform to develop with so What I'm trying to do is to send data provided by my sensor to an external server out my ESP8266 in order to use it later by another device or APP my data are like this :

Code: Select all

X     Y     Z     T


-71     161     97     43.3065

-70     66     75     43.4947

-46     167     82     43.4947
But I'm stuck in doing because I Don't have really the right informations to continue .
I read many sites and informations until my mind became full of manything without finding the right way to start
Thank you in advance ,
B.R

Samerou "Beginner"

Re: ESP8266 Gyro_Database

Posted: Wed Mar 27, 2019 10:56 pm
by kevinkk525
Do you need the data in realtime? Or just every few minutes?
How will the app/pc receive the data?
Does mqtt fit your purpose?

Re: ESP8266 Gyro_Database

Posted: Thu Mar 28, 2019 6:40 am
by samerou
kevinkk525 wrote:
Wed Mar 27, 2019 10:56 pm
Do you need the data in realtime? Or just every few minutes?
How will the app/pc receive the data?
Does mqtt fit your purpose?
Thank you kevinkk for your reply
Yes I need the realtime data and I gonna develop an app later for extract those data in order to use them

And mqtt is good, so yes I think

Re: ESP8266 Gyro_Database

Posted: Thu Mar 28, 2019 7:34 am
by kevinkk525
MQTT is not the best way for realtime data but I don't know what's best in that case as you will probably want to stream that data directly to the app without a server in between?

Re: ESP8266 Gyro_Database

Posted: Thu Mar 28, 2019 7:52 am
by samerou
kevinkk525 wrote:
Thu Mar 28, 2019 7:34 am
MQTT is not the best way for realtime data but I don't know what's best in that case as you will probably want to stream that data directly to the app without a server in between?
I can't use something like a server "similar to wampserver (Tables) and SQL " the server will be on my PC and I will send messages from my esp there.
Last Time I talked with @roberthh about sending messages to PC what he said is :
"What you can do is sending messages from the ESP8266 to a PC and write it to a file there. You would need a small server on the PC for that. This server may be a small python script If you connect by WiFi, the PC with its server may not even have to be local. Please note, that "Server", is a software, which provides a service (here: receiving data & storing it). "

I don't know how to achieve that , well I googled MQTT and I found that is used also for facebook messenger which is realtime app no ?

Re: ESP8266 Gyro_Database

Posted: Thu Mar 28, 2019 8:47 am
by kevinkk525
Depends on what you think is realtime. MQTT is very fast and probably the best to start with. If it doesn't offer enough performance, you could always change to something else.
At your level of knowledge, I'd definitely start with MQTT before writing something else.

Re: ESP8266 Gyro_Database

Posted: Thu Mar 28, 2019 3:21 pm
by samerou
kevinkk525 wrote:
Thu Mar 28, 2019 8:47 am
Depends on what you think is realtime. MQTT is very fast and probably the best to start with. If it doesn't offer enough performance, you could always change to something else.
At your level of knowledge, I'd definitely start with MQTT before writing something else.
Realtime ,everything you measure is published to server every second I think but could you please provide me something to follow and guide me with the first steps to do in order to reach my objectif

Thank you Kevinkk for your support

Re: ESP8266 Gyro_Database

Posted: Thu Mar 28, 2019 4:47 pm
by kevinkk525
https://github.com/micropython/micropyt ... qtt.simple which doesn't need you to know about asyncio.
Once you get that running, you can make it more robust with: https://github.com/micropython/micropyt ... qtt.robust

Public mqtt broker: https://github.com/mqtt/mqtt.github.io/ ... ic_brokers
Or if you want to install one locally on your raspberry pi or similar: https://mosquitto.org/