Skip to main content

Asynchronous websocket client for ESP32 controller.

Project description

micropython-async_websocket_client

This module is designed for ESP32 (and other) controllers.
Goal: create and keep alive connection channel with websocket server.
You may send captured data from controlled devices through this channel to server and accept managing signals on your controller.
This data channel works as background task while main control cycle is running too.
The break of websocket channel doesn't corrupt main cycle of control.

This project based on:
https://github.com/danni/uwebsockets
https://github.com/peterhinch/micropython-async

My gratitudes to authors.

requirements

This module is designed and tested on ESP32S-WROOM-32.
Development and tests were done based on esp32-20220117-v1.18.bin.

installation

Run this commands on your controller:
You have to reflash your board with [micropython](https://micropython.org/).  
Details are explained in https://github.com/Vovaman/start_ESP32_with_micropython.  
You may use VSCode as explained in link above or use `picocom` tool (also explained) to connect your board and run python console (REPL) on it.  
So, after you are in your board...
>>> import network
>>> wifi = network.WLAN(network.STA_IF)
>>> wifi.active(1)
>>> wifi.connect(<name_of_your_wifi_net>, <wifi_password>)
>>> import upip
>>> upip.install('micropython-async-websocket-client')

All needed dependencies are in esp32-20220117-v1.18.bin.

example

Sample using of this module is in https://github.com/Vovaman/example_async_websocket.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

micropython-async_websocket_client-0.1.6.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file micropython-async_websocket_client-0.1.6.tar.gz.

File metadata

  • Download URL: micropython-async_websocket_client-0.1.6.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

File hashes

Hashes for micropython-async_websocket_client-0.1.6.tar.gz
Algorithm Hash digest
SHA256 a671836a052288f81c75fde8a4a5d212403a4f50bf12d80c817022aa9680354a
MD5 42f34ce14d2d9a86f03eb77e74322393
BLAKE2b-256 670724b3182bb89b71184b0ef4cb70833c8b08f477415afc6dd3537e68b3602e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page