Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pappz/ota-promoter
Over the air MicroPython application update tool for ESP8266 type microcomputer. With this tool you can track and you can publish the changed files from your developer PC to your microchips via HTTP.
https://github.com/pappz/ota-promoter
esp8266 ota
Last synced: 24 days ago
JSON representation
Over the air MicroPython application update tool for ESP8266 type microcomputer. With this tool you can track and you can publish the changed files from your developer PC to your microchips via HTTP.
- Host: GitHub
- URL: https://github.com/pappz/ota-promoter
- Owner: pappz
- License: gpl-2.0
- Created: 2020-01-03T14:18:27.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-04T11:42:40.000Z (almost 2 years ago)
- Last Synced: 2024-10-01T15:33:44.692Z (about 1 month ago)
- Topics: esp8266, ota
- Language: Go
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OTA-promoter
Over the air MicroPython application update tool for ESP8266 type microcomputer.
With this tool you can track and you can publish the changed files from
your developer PC to your microchips via HTTP.## Motivation
I designed this solution for decrease the testing-development period times during
the MicroPython application development.
In my personal cases I am not using or I can not using USB wire for upload the
Python files to my devices during the development circles.## How does it work
The service registers some information about the promoted files.- file names and full path of it
- generated unique hashes of the files
- version hash code of the current state of the promoted filesThis service is listening on HTTP and with inotify are watching the modifications in a
specified folder. Every time has occur a changes it will update the version information from the files
and it will generate a new version hash code.
With an HTTP client can get the current version code and the list of the available
files. Based on the hash code the HTTP client can download the modified files.You can set a list of ignored file. Create a **.promoterignore** file in the root path of your Python source and in it you can set the list of the ignored files. The service can process reqular expressions.
## API
### Get current version code
#### Request
`GET /files/version`#### Example Response
```json
{"version":"8a841114726b9f327a6b94d6d129ec8588b5bdc7"}
```#### Cmd line example
```bash
$ curl -v http://192.168.0.10:9090/files/version
{"version":"8a841114726b9f327a6b94d6d129ec8588b5bdc7"}
```### List of available files
#### Request
`GET /files`#### Example Response
```json
{
"files": [
{
"path": "README.txt",
"checksum": "96f264583956281570cc591158c9371f8bba3736"
}
],
"version": "8a841114726b9f327a6b94d6d129ec8588b5bdc7"
}
```#### Cmd line example
```
$ curl http://192.168.0.10:9090/files | python3 -m json.tool
{
"files": [
{
"path": "README.txt",
"checksum": "96f264583956281570cc591158c9371f8bba3736"
}
],
"version": "8a841114726b9f327a6b94d6d129ec8588b5bdc7"
}
```### Download file by hash
#### Request
`GET /files/{file_hash}`#### Example Response
```
< HTTP/1.1 200 OK
< Content-Disposition: attachment; filename=powermgm.py
< Content-Length: 1078
< X-Target-Path: powermgm.py
< Date: Mon, 14 Nov 2022 18:38:37 GMT
< Content-Type: text/plain; charset=utf-8
```#### Cmd line example
```bash
curl http://192.168.0.10:9090/files/96f264583956281570cc591158c9371f8bba3736
```
## Client side library[MicroPython lib](https://github.com/pappz/ota-promoter-py)