Hi!
I have project using ESP8266. It is public, it has public git repo. Developers are using many different configurations and some are uploading code to ESP via serial and some want to use OTA updates. Firmware has enabled checking password on upload. Adding upload_flags
with --auth=PASSWORD
to platformio.ini
is not acceptable solution, since:
- it would save password in git repository
- these are different password in each case
- probably uploader (esptool) will complain about unrecoginzed option when upload_flags are present for regular serial upload
There is no option (or I could not find) to set upload_flags via CLI.
Is there some solution which allows to use both upload via serial and OTA with password?
I was trying to use dynamic build flags, but it looks like bang syntax is recognized only with build_flags
option. I have written simple python script which outputs given text file or some default value if file is not present. Then each developer could have own file with --auth
directive and that file would be in gitignore. But as I said - it looks like !python script.py
syntax is not recognized by PIO when used with upload_flags
Other solution would be to get some possibility to include files to platformio.ini
and that values from included files would overwrite previous values. That way we could include local sensitive data (assuming PIO won’t complain when included file is not present). File would be in gitignore and each developer can provide own .ini values.
Or just way to set bot upload_flags
and upload_protocol
via CLI would be enough (uploading code from CLI is good enough solution)
Best regards,