Mercurial > code > home > repos > homeauto
comparison espNode/tasks.py @ 1716:2bed2f68243c
older work
author | drewp@bigasterisk.com |
---|---|
date | Sun, 07 Aug 2022 02:25:40 -0700 |
parents | 33747dcf57ea |
children | e9540ee0cf73 |
comparison
equal
deleted
inserted
replaced
1715:8578afcae65e | 1716:2bed2f68243c |
---|---|
25 print('rts to reset (if possible), dtr to gpio0 per https://github.com/espressif/esptool/wiki/ESP32-Boot-Mode-Selection#automatic-bootloader') | 25 print('rts to reset (if possible), dtr to gpio0 per https://github.com/espressif/esptool/wiki/ESP32-Boot-Mode-Selection#automatic-bootloader') |
26 ctx.run(f"{esphomeUsb} run {board}.yaml --device={port}", pty=True, echo=True) | 26 ctx.run(f"{esphomeUsb} run {board}.yaml --device={port}", pty=True, echo=True) |
27 | 27 |
28 @task | 28 @task |
29 def program_board_over_wifi(ctx, board): | 29 def program_board_over_wifi(ctx, board): |
30 global esphome | |
30 board = board.replace('.yaml', '') | 31 board = board.replace('.yaml', '') |
32 if board == 'theater_lcd': | |
33 tag = 'esphome_dev' | |
34 esphome = 'esphome-local/env/bin/esphome' | |
35 | |
31 ctx.run(f"{esphome} {board}.yaml run", pty=True) | 36 ctx.run(f"{esphome} {board}.yaml run", pty=True) |
37 | |
32 | 38 |
33 @task | 39 @task |
34 def monitor_usb(ctx, board): | 40 def monitor_usb(ctx, board): |
35 board = board.replace('.yaml', '') | 41 board = board.replace('.yaml', '') |
36 ctx.run(f"{esphomeUsb} logs {board}.yaml --device={port}", pty=True) | 42 ctx.run(f"{esphomeUsb} logs {board}.yaml --device={port}", pty=True) |