-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (34 loc) · 1.21 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
USB_ADDRESS ?= $(error USB_ADDRESS is not set)
.PHONY: all clean build upload dashboard logs
all: build upload dashboard logs
clean:
esphome clean config.yaml
build:
esphome config config.yaml
esphome compile config.yaml
upload:
@echo "Uploading to $(USB_ADDRESS)"
esphome upload --device $(USB_ADDRESS) config.yaml
logs:
@echo "Uploading to $(USB_ADDRESS)"
esphome logs config.yaml --device $(USB_ADDRESS)
dashboard:
esphome dashboard . --open-ui --address 127.0.0.1 --port 6053
run-usb:
# run-usb is used for the first time a device is setup
# uncomment the wifi section in config.yaml
# then put the device into DFU mode (button pressed -> reset -> button release)
# you can then run the run-ota command which will preserve the wifi settings
# this is a workaround until eshome supports improv_serial on esp32s2
esphome \
-s name ankermake-m5-muffler \
-s friendly_name "AnkerMake M5 Muffler" \
-s ntc_resistance "100kOhm" \
run config.yaml --device $(USB_ADDRESS)
run-ota:
# run-ota is used for subsequent uploads after the device has been joined to the wifi network
esphome \
-s name ankermake-m5-muffler \
-s friendly_name "AnkerMake M5 Muffler" \
-s ntc_resistance "100kOhm" \
run config.yaml