# 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](https://ru.wikipedia.org/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:ESP32_Espressif_ESP-WROOM-32_Dev_Board.jpg).
Development and tests were done based on [esp32-20220618-v1.19.1.bin](https://micropython.org/resources/firmware/esp32-20220618-v1.19.1.bin).
# installation
<details>
<summary>Run this commands on your controller:</summary>
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...
</details>
```python
>>> 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-20220618-v1.19.1.bin.
# example
Sample using of this module is in https://github.com/Vovaman/example_async_websocket.
0.2.0
-----
Fix for big data packet.
Author: [mutatrum](https://github.com/mutatrum)
0.1.9
-----
Method `close()` is added and example project (see link above) is changed
to demonstrate it.
0.1.8
-----
Partial support for wss protocol is added.
Author: [huytranle](https://github.com/huytranle)
> **Disclaimer!** Server and client certificates verification
> is not supported in this version.
> Waiting for new micropython release...
0.1.7
-----
Websocket can send custom headers to server in ``handshake`` function. Author: [pluzmedia](https://github.com/pluzmedia)
0.1.6
-----
First release.
Raw data
{
"_id": null,
"home_page": "https://github.com/Vovaman/micropython_async_websocket_client",
"name": "micropython-async-websocket-client",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "ESP32,micropython,websocket,asynchronous,client",
"author": "Vladimir Badashkin",
"author_email": "bd_postbox1@mail.ru",
"download_url": "https://files.pythonhosted.org/packages/18/07/a63ab7bd2a7d6caaf501239a61a71289852dee0697f54a264d75d7bcfa41/micropython-async_websocket_client-0.2.0.tar.gz",
"platform": null,
"description": "# micropython-async_websocket_client\nThis module is designed for ESP32 (and other) controllers.\nGoal: create and keep alive connection channel with websocket server.\nYou may send captured data from controlled devices through this channel to server and accept managing signals on your controller.\nThis data channel works as background task while main control cycle is running too.\nThe break of websocket channel doesn't corrupt main cycle of control.\n\nThis project based on:\nhttps://github.com/danni/uwebsockets\nhttps://github.com/peterhinch/micropython-async\n\n**My gratitudes to authors**.\n\n# requirements\nThis module is designed and tested on [ESP32S-WROOM-32](https://ru.wikipedia.org/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:ESP32_Espressif_ESP-WROOM-32_Dev_Board.jpg).\nDevelopment and tests were done based on [esp32-20220618-v1.19.1.bin](https://micropython.org/resources/firmware/esp32-20220618-v1.19.1.bin).\n\n# installation\n<details>\n <summary>Run this commands on your controller:</summary>\n\n You have to reflash your board with [micropython](https://micropython.org/).\n Details are explained in https://github.com/Vovaman/start_ESP32_with_micropython.\n 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.\n So, after you are in your board...\n</details>\n\n```python\n>>> import network\n>>> wifi = network.WLAN(network.STA_IF)\n>>> wifi.active(1)\n>>> wifi.connect(<name_of_your_wifi_net>, <wifi_password>)\n>>> import upip\n>>> upip.install('micropython-async-websocket-client')\n```\n\nAll needed dependencies are in esp32-20220618-v1.19.1.bin.\n# example\nSample using of this module is in https://github.com/Vovaman/example_async_websocket.\n\n\n0.2.0\n-----\nFix for big data packet.\nAuthor: [mutatrum](https://github.com/mutatrum)\n\n0.1.9\n-----\nMethod `close()` is added and example project (see link above) is changed\nto demonstrate it.\n\n0.1.8\n-----\nPartial support for wss protocol is added.\nAuthor: [huytranle](https://github.com/huytranle)\n> **Disclaimer!** Server and client certificates verification\n> is not supported in this version.\n> Waiting for new micropython release...\n\n0.1.7\n-----\nWebsocket can send custom headers to server in ``handshake`` function. Author: [pluzmedia](https://github.com/pluzmedia)\n\n0.1.6\n-----\nFirst release.\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "Asynchronous websocket client for ESP32 controller.",
"version": "0.2.0",
"split_keywords": [
"esp32",
"micropython",
"websocket",
"asynchronous",
"client"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1807a63ab7bd2a7d6caaf501239a61a71289852dee0697f54a264d75d7bcfa41",
"md5": "288054e993c2d74e097795440ec833e4",
"sha256": "b8d2ffa961cb23885cea45b00281c4220cc77e31d8828d7a4dac4ec6135f123d"
},
"downloads": -1,
"filename": "micropython-async_websocket_client-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "288054e993c2d74e097795440ec833e4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4425,
"upload_time": "2023-04-23T17:26:45",
"upload_time_iso_8601": "2023-04-23T17:26:45.789600Z",
"url": "https://files.pythonhosted.org/packages/18/07/a63ab7bd2a7d6caaf501239a61a71289852dee0697f54a264d75d7bcfa41/micropython-async_websocket_client-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-23 17:26:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "Vovaman",
"github_project": "micropython_async_websocket_client",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "micropython-async-websocket-client"
}