-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve http uploader for platformio upload comand #17378
Conversation
I thought only Theo is using ;-) |
Oh my. I'm just in the process of rewriting this stuff. I'm doing the gz stuff on the server side using a php script like:
I also wonder how on earth the espupload.py ever got in the tools folder. It should have been in the pio-tools folder |
@pgollor
it needs to be added in the main scripts section and the |
Agree. It has to be in the platform_override.ini file. This is a snapshot of mine:
|
Okay sorry. I used it only in the |
Never used and tbh not knowing how it is working, i didnt touch, when doing all the platformio rework. Dont touch stuff from "Master" :-) |
That 's the best approach LoL. Anyway, @pgoller let me do some tweaking first before continuing with this PR. |
A snapshot of mine platformio_override.ini:
|
okay thanks. Maybe the PR tasmota/docs#1128 in the documentation should also be adjusted |
Have a look at my current, much cut down version of, espupload.py. It needs a complete URL instead of seperate parameters.
It also doesn't use curl anymore in favour of requests. |
thre was a 50% 50% chance to do the right one fpr me. Maybe we can move the script from tools to pio-tools. I used the script at my jenkins server and not only from platformio. But I don't really care in which subfolder it is. |
This is very intrusive since used for all env.
so no local upload (flash) via esptool.py possible anymore for every! env If you do overrides on more places, this will generate "fun". Been there, and wasted some time with such and similar stuff. Platformio will behave at some point eratic when to many overrides, on different places, are done. Result are strange compile errors which does not give a clue what the real reason is. |
Oh okay sorry. |
Whether it's a complete URL or individual parameters, I think that's a personal preference. You decide what you think makes more sense. |
And i think repleacing the curl stuff with the requests library is a good idea. |
What I'll do is renaming the current espupload.py into espupload_legacy.py and keep it in pio-tools removing the one from tools. I'll then add my new espupload.py with the requests library. This way you can still select from one of the two. I'll have a look at your gz implementation too. |
Okay sorry for that and thanks for your hint. |
Thanks for your great work. |
Change Tasmota OTA scripts now support both unzipped and gzipped file uploads (#17378)
My latest PR builds on your groundwork and updates the following files:
The default behaviour now is that if a .bin.gz file is present it is uploaded to the OTA server. If not found it tries to upload the .bin file and generates a .bin.gz on the OTA server using the php script. Give it a try. I hope we do not need to add some kind of override to enforce .bin over .bin.gz ;-) |
Description:
pio-tools
to upload gzip firmware files via platformio upload commandespupload.py
http-uploader.py
to work with otherespupload.py
scriptTo work it is needed to modify the
[env]
section like:PR for documentation will comming soon.
Checklist: