esp-signed-updater-mqtt/platformio.ini

54 lines
1.4 KiB
INI

; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[platformio]
default_envs = serial
[common]
ssid = wifi
password = foobar
mqtt_server = mqtt
mqtt_room = test
mqtt_device = ledstrip
; must be a positive integer value
; must be incremented for automated updates to happen!
firmware_version = 1
[uploadconfig]
sign_prog = $PROJECT_PACKAGES_DIR/framework-arduinoespressif8266/tools/signing.py
sign_key = ../private.pem
sign_cert = ../public.pem
upl_url = http://mqtt/arduino-upload.php
upl_token = secretpassphrase
[env]
platform = espressif8266
board = d1_mini
framework = arduino
build_flags =
'-DINI_SSID="${common.ssid}"'
'-DINI_PSK="${common.password}"'
'-DINI_SERVER="${common.mqtt_server}"'
'-DINI_ROOM="${common.mqtt_room}"'
'-DINI_DEVICE="${common.mqtt_device}"'
'-DINI_VERSION="${common.firmware_version}"'
extra_scripts = pre:public_key.py
[env:serial]
upload_port = /dev/ttyUSB*
upload_speed = 921600
monitor_port = /dev/ttyUSB*
monitor_speed = 115200
[env:web]
upload_protocol = custom
extra_scripts = pre:sign_and_upload.py