Mercurial > code > home > repos > homeauto
diff espNode/tasks.py @ 1678:7831b5de3572
espNode checkpoint
author | drewp@bigasterisk.com |
---|---|
date | Mon, 27 Sep 2021 22:59:39 -0700 |
parents | 0bf15b97f25a |
children | 33747dcf57ea |
line wrap: on
line diff
--- a/espNode/tasks.py Wed Sep 22 01:22:05 2021 -0700 +++ b/espNode/tasks.py Mon Sep 27 22:59:39 2021 -0700 @@ -2,7 +2,7 @@ tag = 'esphome/esphome:dev' esphome = f'docker run --rm -v `pwd`:/config -v /usr/share/fonts:/usr/share/fonts -it {tag}' - +esphomeUsb = esphome.replace('--rm', '--rm --device=/dev/ttyUSB0') # on dash for lcd code for theater display: #tag = 'esphome_dev' #esphome = '/home/drewp/Downloads/esphome/env/bin/esphome' @@ -20,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} --device=/dev/ttyUSB0 {board}.yaml run", pty=True) + ctx.run(f"{esphomeUsb} run {board}.yaml --device=/dev/ttyUSB0", pty=True) @task def program_board_over_wifi(ctx, board): @@ -30,7 +30,7 @@ @task def monitor_usb(ctx, board): board = board.replace('.yaml', '') - ctx.run(f"{esphome} --device=/dev/ttyUSB0 {board}.yaml logs", pty=True) + ctx.run(f"{esphomeUsb} logs {board}.yaml --device=/dev/ttyUSB0", pty=True) # device up? # nmap -Pn -p 3232,6053 10.2.0.21