Mercurial > code > home > repos > homeauto
changeset 1576:0bf15b97f25a
don't insist on ttyUSB0 device when doing OTA updates
author | drewp@bigasterisk.com |
---|---|
date | Thu, 13 May 2021 01:06:26 -0700 |
parents | 0991844ee9ae |
children | 6ddc5e037f15 |
files | espNode/tasks.py |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/espNode/tasks.py Thu May 13 01:05:40 2021 -0700 +++ b/espNode/tasks.py Thu May 13 01:06:26 2021 -0700 @@ -1,10 +1,11 @@ from invoke import task tag = 'esphome/esphome:dev' -tag = 'esphome_dev' -esphome = f'docker run --rm -v `pwd`:/config -v /usr/share/fonts:/usr/share/fonts --device=/dev/ttyUSB0 -it {tag}' +esphome = f'docker run --rm -v `pwd`:/config -v /usr/share/fonts:/usr/share/fonts -it {tag}' -esphome = '/home/drewp/Downloads/esphome/env/bin/esphome' +# on dash for lcd code for theater display: +#tag = 'esphome_dev' +#esphome = '/home/drewp/Downloads/esphome/env/bin/esphome' @task def get_dev_esphome(ctx): @@ -19,7 +20,7 @@ board = board.replace('.yaml', '') print('connect gnd, 3v3, rx/tx per https://randomnerdtutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/, ') print('rts to reset (if possible), dtr to gpio0 per https://github.com/espressif/esptool/wiki/ESP32-Boot-Mode-Selection#automatic-bootloader') - ctx.run(f"{esphome} {board}.yaml run", pty=True) + ctx.run(f"{esphome} --device=/dev/ttyUSB0 {board}.yaml run", pty=True) @task def program_board_over_wifi(ctx, board): @@ -29,7 +30,7 @@ @task def monitor_usb(ctx, board): board = board.replace('.yaml', '') - ctx.run(f"{esphome} {board}.yaml logs", pty=True) + ctx.run(f"{esphome} --device=/dev/ttyUSB0 {board}.yaml logs", pty=True) # device up? # nmap -Pn -p 3232,6053 10.2.0.21