Mercurial > code > home > repos > homeauto
annotate service/rdf_to_mqtt/tasks.py @ 739:03bad43bbcb3
more renaming, build updates
Ignore-this: 94a0df55a1d8a74d90ec84bb7351d3ef
author | drewp@bigasterisk.com |
---|---|
date | Mon, 10 Feb 2020 23:56:42 -0800 |
parents | fdddbdaf07b5 |
children |
rev | line source |
---|---|
739 | 1 from invoke import Collection, task |
2 import sys | |
3 sys.path.append('/my/proj/release') | |
4 from serv_tasks import serv_tasks | |
581
30022797642e
mqtt_graph_bridge to new build rules and to py3
drewp@bigasterisk.com
parents:
460
diff
changeset
|
5 |
739 | 6 ns = Collection() |
7 serv_tasks(ns, 'serv.n3', 'rdf_to_mqtt') | |
373
2158e7ad19b1
receive oneshot updates from reasoning; emit commands on MQTT to control H801 wifi dimmer
drewp@bigasterisk.com
parents:
diff
changeset
|
8 |
739 | 9 # leftover frontdoor setup I think |
10 @ns.add_task | |
581
30022797642e
mqtt_graph_bridge to new build rules and to py3
drewp@bigasterisk.com
parents:
460
diff
changeset
|
11 @task |
30022797642e
mqtt_graph_bridge to new build rules and to py3
drewp@bigasterisk.com
parents:
460
diff
changeset
|
12 def program_board_over_usb(ctx): |
30022797642e
mqtt_graph_bridge to new build rules and to py3
drewp@bigasterisk.com
parents:
460
diff
changeset
|
13 tag = 'esphome/esphome' |
30022797642e
mqtt_graph_bridge to new build rules and to py3
drewp@bigasterisk.com
parents:
460
diff
changeset
|
14 ctx.run(f"docker run --rm -v `pwd`:/config --device=/dev/ttyUSB0 -it {tag} door.yaml run", pty=True) |
30022797642e
mqtt_graph_bridge to new build rules and to py3
drewp@bigasterisk.com
parents:
460
diff
changeset
|
15 # config_skylight.yaml run --no-logs |
30022797642e
mqtt_graph_bridge to new build rules and to py3
drewp@bigasterisk.com
parents:
460
diff
changeset
|
16 |
739 | 17 @ns.add_task |
581
30022797642e
mqtt_graph_bridge to new build rules and to py3
drewp@bigasterisk.com
parents:
460
diff
changeset
|
18 @task |
30022797642e
mqtt_graph_bridge to new build rules and to py3
drewp@bigasterisk.com
parents:
460
diff
changeset
|
19 def monitor_usb(ctx): |
30022797642e
mqtt_graph_bridge to new build rules and to py3
drewp@bigasterisk.com
parents:
460
diff
changeset
|
20 tag = 'esphome/esphome' |
30022797642e
mqtt_graph_bridge to new build rules and to py3
drewp@bigasterisk.com
parents:
460
diff
changeset
|
21 ctx.run(f"docker run --rm -v `pwd`:/config --device=/dev/ttyUSB0 -it {tag} door.yaml logs", pty=True) |
30022797642e
mqtt_graph_bridge to new build rules and to py3
drewp@bigasterisk.com
parents:
460
diff
changeset
|
22 |
739 | 23 @ns.add_task |
581
30022797642e
mqtt_graph_bridge to new build rules and to py3
drewp@bigasterisk.com
parents:
460
diff
changeset
|
24 @task |
30022797642e
mqtt_graph_bridge to new build rules and to py3
drewp@bigasterisk.com
parents:
460
diff
changeset
|
25 def tail_mqtt(ctx): |
30022797642e
mqtt_graph_bridge to new build rules and to py3
drewp@bigasterisk.com
parents:
460
diff
changeset
|
26 ctx.run(f'mosquitto_sub -h bang -p 10010 -d -v -t \#') |