Paid 42.75, but is currently down to 37.25 rmb.

AJW-02_8285
| GPIO | Purpose |
|---|---|
| 3 | Button 1 |
| 4 | BL0937 CF |
| 5 | HLWBL CF1 |
| 12 | HLWBL SELi |
| 13 | LedLink |
| 14 | Relay 1 |

board: esp01_1m (chip has 2mb though?)
important: do not forget to enable web_server, else cannot manage
web_server:
docker run --rm -it -v "/root/esphome-config:/config" ghcr.io/esphome/esphome wizard livingroom.yaml
docker run --rm -it -v "/root/esphome-config:/config" ghcr.io/esphome/esphome compile livingroom.yaml
hint: ./.esphome/build/esp011m/.pioenvs/esp011m/firmware.bin
find -name firmware.bin
docker run --rm -it -v "/root/esphome-config:/config" -p 6052:6052 ghcr.io/esphome/esphome
pip install wheel esphome
esphome run livingroom.yaml
esphome upload livingroom.yaml
flash minimal first, or not enough space.
important: do not forget to enable web_server, else cannot manage
wifi:
ssid: $wifi_ssid
password: $wifi_password
manual_ip:
static_ip: 192.xxx.x.x
gateway: 192.xxx.x.x
subnet: 255.255.255.0
web_server:
port: 80
# esphome.exe compile .\livingroom.yaml
# esphome.exe upload .\livingroom.yaml
esphome:
name: esp011m
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
# password: ""
# Enable over-the-air updates
# ota:
# Enable over-the-air updates
ota:
- platform: esphome
password: ""
wifi:
ssid: ...
password: ...
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp011M Fallback Hotspot"
password: "WZzUh28S5wyb"
manual_ip:
static_ip: 192.168....
gateway: 192.168....
subnet: 255.255.255.0
captive_portal:
# Enable Web server
web_server:
# port: 80
switch:
- platform: gpio
name: relay
pin:
number: 14
mode: OUTPUT
inverted: false
restore_mode: RESTORE_DEFAULT_OFF
interlock_wait_time: 0ms
output:
- platform: gpio
id: led
pin:
number: 13
inverted: false
mode: OUTPUT
# substitutions:
# upper_devicename: Athom Smart Plug
#sensor:
## https://community.home-assistant.io/t/migration-power-plug-from-tasmota-to-esphome-bl0937-pinout/643780
# # Power sensor
# - platform: hlw8012
# model: BL0937
# # SEL pin indicates whether CF pin is VOLTAGE or CURRENT
# sel_pin:
# number: 12
# inverted: true
# # CF pin monitors CURRENT OR VOLTAGE
# cf_pin: 4
# # CF1 pin monitors the POWER used
# cf1_pin: 5
# # voltage_divider: "775"
# # current_resistor: "0.0009"
# # initial_mode: "VOLTAGE"
# change_mode_every: 10
# update_interval: 1s
# current:
# name: current
# unit_of_measurement: A
# accuracy_decimals: 3
# voltage:
# name: voltage
# unit_of_measurement: V
# accuracy_decimals: 3
# power:
# name: power
# unit_of_measurement: W
# accuracy_decimals: 3