Mercurial > code > home > repos > homeauto
changeset 686:438edc93e29e
add task to pull new docker image
Ignore-this: f69eb791b4af38e32a165b1443c793e1
author | drewp@bigasterisk.com |
---|---|
date | Mon, 20 Jan 2020 17:09:39 -0800 |
parents | 7c5953801cf1 |
children | 1fe2a8e15ebf |
files | service/espNode/tasks.py |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/service/espNode/tasks.py Thu Jan 16 13:23:47 2020 -0800 +++ b/service/espNode/tasks.py Mon Jan 20 17:09:39 2020 -0800 @@ -1,16 +1,22 @@ 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): - tag = 'esphome/esphome' - ctx.run(f"docker run --rm -v `pwd`:/config -v /usr/share/fonts:/usr/share/fonts --device=/dev/ttyUSB1 -it {tag} {board}.yaml run", pty=True) + 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): - tag = 'esphome/esphome' 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): - tag = 'esphome/esphome' 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