Web Client ESP32 micropython

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
javargas26
Posts: 9
Joined: Wed Nov 29, 2017 12:35 am

Web Client ESP32 micropython

Post by javargas26 » Tue Dec 05, 2017 10:43 pm

Hi... the thing is this:

I am collecting some data from a sensor and showing it in the console, but I want to send it to a server that is not on my LAN. I am also able to conect to wifi using my phone as an AP, but it is just that, just conected to the wifi.

What I want to do and I don't have any idea how is to be able to send the data I get from the sensor to a data base over the internet conection.

All I know is that I have to make a web client.

Any help or sugestions would be very nice

User avatar
Roberthh
Posts: 775
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Web Client ESP32 micropython

Post by Roberthh » Wed Dec 06, 2017 7:42 am


SpotlightKid
Posts: 277
Joined: Wed Apr 08, 2015 5:19 am

Re: Web Client ESP32 micropython

Post by SpotlightKid » Wed Dec 06, 2017 1:02 pm

The solution also also depends on the kind of server you want your data to send to.

* If it's a plain HTTP web server or a REST API, I suggest you use urequests.
* If it's a MQTT broker, use umqtt.
* If it's a Redis database, use micropython-redis or picoredis
* If it's an FTP server, use micropython-ftplib

SpotlightKid
Posts: 277
Joined: Wed Apr 08, 2015 5:19 am

Re: Web Client ESP32 micropython

Post by SpotlightKid » Thu Dec 07, 2017 5:45 pm

And here's a new online resource, that might help you: Python socket cheatsheet

User avatar
rdagger
Posts: 48
Joined: Tue Feb 28, 2017 6:16 pm
Contact:

Re: Web Client ESP32 micropython

Post by rdagger » Sat Dec 09, 2017 5:28 pm

Here's another great light weight web client for the ESP32 and it's very easy to use and well documented:

https://github.com/jczic/MicroWebCli

Post Reply