Mercurial > code > home > repos > homeauto
view espNode/tasks.py @ 1530:f4e1493e9526
there's a plan
Ignore-this: 994107ade471f5e66c4746996c9e5a11
darcs-hash:dd80cdf9badb6cc9fb22989a34ce555e663f63f0
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Wed, 05 Feb 2020 17:12:18 -0800 |
parents | ed3d29eb989a |
children |
line wrap: on
line source
from invoke import task tag = 'esphome/esphome:dev' @task def pull_esphome(ctx): ctx.run(f"docker pull {tag}") @task def program_board_over_usb(ctx, board): ctx.run(f"docker run --rm -v `pwd`:/config -v /usr/share/fonts:/usr/share/fonts --device=/dev/ttyUSB0 -it {tag} {board}.yaml run", pty=True) @task def program_board_over_wifi(ctx, board): ctx.run(f"docker run --rm -v `pwd`:/config -v /usr/share/fonts:/usr/share/fonts -it --net=host {tag} {board}.yaml run", pty=True) @task def monitor_usb(ctx, board): ctx.run(f"docker run --rm -v `pwd`:/config --device=/dev/ttyUSB0 -it {tag} {board}.yaml logs", pty=True) # device up? # nmap -Pn -p 3232,6053 10.2.0.21