惭愧 我还是没用起来 倒是编译好了 串口有输出,不过开门并没有什么log产生
esphome:
name: lock
platform: ESP32
board: esp32dev
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "90b0fd73250a4c010eedff2e3635f2b0"
wifi:
ssid: "XXXXX"
password: "XXXXX"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Lock Fallback Hotspot"
password: "7tHJPtkS5ft6"
captive_portal:
external_components:
- source: mine
esp32_ble_tracker:
scan_parameters:
window: 180ms
sensor:
- platform: xiaomi_zelkova
mac_address: "E9:4E:6A:D6:FE:7A"
bindkey: "d89e5bcebbe8115ae142bb03d809956e"
lockattr:
name: "LockAttr"
opmethod:
name: "OpMethod"
doorevt:
name: "DoorEvt"
battlvl:
name: "BattLvl"
keyid:
name: "KeyID"
opts:
name: "OpTS"
doorevtts:
name: "DoorEvtTS"
battlvlts:
name: "BattLvlTS"
然后编译 烧录
log如下:
[21:29:25][D][esp32_ble_tracker:620]: Found device 63:10:7D:59:F6:97 RSSI=-76
[21:29:25][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:29:25][I][wifi:513]: WiFi Connected!
[21:29:25][C][wifi:359]: SSID: 'Vaneber_2.4G'
[21:29:25][C][wifi:360]: IP Address: 192.168.50.30
[21:29:25][C][wifi:362]: BSSID: 76:7D:24:EB0:16
[21:29:25][C][wifi:363]: Hostname: 'lock'
[21:29:25][C][wifi:367]: Signal strength: -46 dB ▂▄▆█
[21:29:25][C][wifi:371]: Channel: 8
[21:29:25][C][wifi:372]: Subnet: 255.255.255.0
[21:29:25][C][wifi:373]: Gateway: 192.168.50.1
[21:29:25][C][wifi:374]: DNS1: 114.114.114.114
[21:29:25][C][wifi:375]: DNS2: 8.8.8.8
[21:29:25][D][wifi:522]: Disabling AP...
[21:29:25][C][ota:029]: Over-The-Air Updates:
[21:29:25][C][ota:030]: Address: lock.local:3232
[21:29:25][C][ota:032]: Using Password.
[21:29:25][C][api:022]: Setting up Home Assistant API server...
[21:29:25][I][app:059]: setup() finished successfully!
[21:29:25][I][app:105]: ESPHome version 1.21.0-dev compiled on Jul 23 2021, 12:59:22
[21:29:25][C][wifi:499]: WiFi:
[21:29:25][C][wifi:359]: SSID: 'Vaneber_2.4G'
[21:29:25][C][wifi:360]: IP Address: 192.168.50.30
[21:29:25][C][wifi:362]: BSSID: 76:7D:24:EB0:16
[21:29:25][C][wifi:363]: Hostname: 'lock'
[21:29:25][C][wifi:367]: Signal strength: -46 dB ▂▄▆█
[21:29:25][C][wifi:371]: Channel: 8
[21:29:25][C][wifi:372]: Subnet: 255.255.255.0
[21:29:25][C][wifi:373]: Gateway: 192.168.50.1
[21:29:25][C][wifi:374]: DNS1: 114.114.114.114
[21:29:25][C][wifi:375]: DNS2: 8.8.8.8
[21:29:25][C][logger:189]: Logger:
[21:29:25][C][logger:190]: Level: DEBUG
[21:29:25][C][logger:191]: Log Baud Rate: 115200
[21:29:25][C][logger:192]: Hardware UART: UART0
[21:29:25][C][esp32_ble_tracker:606]: BLE Tracker:
[21:29:25][C][esp32_ble_tracker:607]: Scan Duration: 300 s
[21:29:25][C][esp32_ble_tracker:608]: Scan Interval: 320.0 ms
[21:29:25][C][esp32_ble_tracker:609]: Scan Window: 180.0 ms
[21:29:25][C][esp32_ble_tracker:610]: Scan Type: ACTIVE
[21:29:25][C][xiaomi_zelkova:012]: Xiaomi ZELKOVA
[21:29:25][C][xiaomi_zelkova:013]: Bindkey: D8.9E.5B.CE.BB.E8.11.5A.E1.42.BB.03.D8.09.95.6E (16)
[21:29:25][C][xiaomi_zelkova:014]: OpMethod 'OpMethod'
[21:29:25][C][xiaomi_zelkova:014]: State Class: ''
[21:29:25][C][xiaomi_zelkova:014]: Unit of Measurement: ''
[21:29:25][C][xiaomi_zelkova:014]: Accuracy Decimals: 0
[21:29:25][C][xiaomi_zelkova:015]: OpKeyID 'KeyID'
[21:29:25][C][xiaomi_zelkova:015]: State Class: ''
[21:29:25][C][xiaomi_zelkova:015]: Unit of Measurement: ''
[21:29:25][C][xiaomi_zelkova:015]: Accuracy Decimals: 0
[21:29:25][C][xiaomi_zelkova:016]: OpTS 'OpTS'
[21:29:25][C][xiaomi_zelkova:016]: State Class: ''
[21:29:25][C][xiaomi_zelkova:016]: Unit of Measurement: ''
[21:29:25][C][xiaomi_zelkova:016]: Accuracy Decimals: 0
[21:29:25][C][xiaomi_zelkova:017]: LockAttr 'LockAttr'
[21:29:25][C][xiaomi_zelkova:017]: State Class: ''
[21:29:25][C][xiaomi_zelkova:017]: Unit of Measurement: ''
[21:29:25][C][xiaomi_zelkova:017]: Accuracy Decimals: 0
[21:29:25][C][xiaomi_zelkova:018]: BattLvl 'BattLvl'
[21:29:25][C][xiaomi_zelkova:018]: Device Class: 'battery'
[21:29:25][C][xiaomi_zelkova:018]: State Class: ''
[21:29:25][C][xiaomi_zelkova:018]: Unit of Measurement: '%'
[21:29:25][C][xiaomi_zelkova:018]: Accuracy Decimals: 0
[21:29:25][C][xiaomi_zelkova:019]: BattLvlTS 'BattLvlTS'
[21:29:25][C][xiaomi_zelkova:019]: State Class: ''
[21:29:25][C][xiaomi_zelkova:019]: Unit of Measurement: ''
[21:29:25][C][xiaomi_zelkova:019]: Accuracy Decimals: 0
[21:29:25][C][xiaomi_zelkova:020]: DoorEvt 'DoorEvt'
[21:29:25][C][xiaomi_zelkova:020]: State Class: ''
[21:29:25][C][xiaomi_zelkova:020]: Unit of Measurement: ''
[21:29:25][C][xiaomi_zelkova:020]: Accuracy Decimals: 0
[21:29:25][C][xiaomi_zelkova:021]: DoorEvtTS 'DoorEvtTS'
[21:29:25][C][xiaomi_zelkova:021]: State Class: ''
[21:29:25][C][xiaomi_zelkova:021]: Unit of Measurement: ''
[21:29:25][C][xiaomi_zelkova:021]: Accuracy Decimals: 0
[21:29:25][C][captive_portal:148]: Captive Portal:
[21:29:25][C][ota:029]: Over-The-Air Updates:
[21:29:25][C][ota:030]: Address: lock.local:3232
[21:29:25][C][ota:032]: Using Password.
[21:29:25][C][api:095]: API Server:
[21:29:25][C][api:096]: Address: lock.local:6053
[21:29:27][D][api.connection:670]: Client 'Home Assistant 2021.4.3 (192.168.50.221)' connected successfully!
[21:29:27][D][esp32_ble_tracker:620]: Found device 68:8F:B50:73:EC RSSI=-94
[21:29:27][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:29:27][D][esp32_ble_tracker:620]: Found device 68:3E:34:CC:E25 RSSI=-86
[21:29:27][D][esp32_ble_tracker:641]: Address Type: PUBLIC
[21:29:27][D][esp32_ble_tracker:643]: Name: '魅族遥控器'
[21:29:33][D][esp32_ble_tracker:620]: Found device 68:3E:34:CC:E0:88 RSSI=-87
[21:29:33][D][esp32_ble_tracker:641]: Address Type: PUBLIC
[21:29:33][D][esp32_ble_tracker:643]: Name: '魅族遥控器'
[21:31:35][D][esp32_ble_tracker:620]: Found device 78A:07:EA:E9:80 RSSI=-102
[21:31:35][D][esp32_ble_tracker:641]: Address Type: PUBLIC
[21:34:20][I][ota:046]: Boot seems successful, resetting boot loop counter.
[21:34:21][D][esp32_ble_tracker:180]: Starting scan...
[21:34:21][D][esp32_ble_tracker:620]: Found device 68:3E:34:CC:E0:88 RSSI=-95
[21:34:21][D][esp32_ble_tracker:641]: Address Type: PUBLIC
[21:34:21][D][esp32_ble_tracker:643]: Name: '魅族遥控器'
[21:34:21][D][esp32_ble_tracker:620]: Found device 53:FC:6C:F12:59 RSSI=-58
[21:34:21][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:34:21][D][esp32_ble_tracker:645]: TX Power: 2
[21:34:21][D][esp32_ble_tracker:620]: Found device 68:8F:B50:73:EC RSSI=-91
[21:34:21][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:34:21][D][esp32_ble_tracker:620]: Found device 68:3E:34:CC:E25 RSSI=-96
[21:34:21][D][esp32_ble_tracker:641]: Address Type: PUBLIC
[21:34:21][D][esp32_ble_tracker:643]: Name: '魅族遥控器'
[21:34:21][D][esp32_ble_tracker:620]: Found device 6F:10:83:0F:47:6C RSSI=-59
[21:34:21][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:34:21][D][esp32_ble_tracker:645]: TX Power: 2
[21:34:22][D][esp32_ble_tracker:620]: Found device E9:4E:6A6:FE:7A RSSI=-65
[21:34:22][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:34:22][D][esp32_ble_tracker:620]: Found device 7C:7EB:16:D9:42 RSSI=-71
[21:34:22][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:34:22][D][esp32_ble_tracker:645]: TX Power: 2
[21:34:23][D][esp32_ble_tracker:620]: Found device 69:14:8F:0F:92:C8 RSSI=-91
[21:34:23][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:34:24][D][esp32_ble_tracker:620]: Found device 63:10:7D:59:F6:97 RSSI=-66
[21:34:24][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:34:24][D][esp32_ble_tracker:620]: Found device 6E:96:F7:D4:7B:0F RSSI=-91
[21:34:24][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:39:21][D][esp32_ble_tracker:180]: Starting scan...
[21:39:21][D][esp32_ble_tracker:620]: Found device 6E:96:F7:D4:7B:0F RSSI=-98
[21:39:21][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:39:21][D][esp32_ble_tracker:620]: Found device 53:FC:6C:F1:D2:59 RSSI=-50
[21:39:21][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:39:21][D][esp32_ble_tracker:645]: TX Power: 2
[21:39:21][D][esp32_ble_tracker:620]: Found device 68:3E:34:CC:E2:D5 RSSI=-77
[21:39:21][D][esp32_ble_tracker:641]: Address Type: PUBLIC
[21:39:21][D][esp32_ble_tracker:643]: Name: '魅族遥控器'
[21:39:21][D][esp32_ble_tracker:620]: Found device 6F:10:83:0F:47:6C RSSI=-56
[21:39:21][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:39:21][D][esp32_ble_tracker:645]: TX Power: 2
[21:39:23][D][esp32_ble_tracker:620]: Found device 7C:7E:DB:16:D9:42 RSSI=-76
[21:39:23][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:39:23][D][esp32_ble_tracker:645]: TX Power: 2
[21:39:24][D][esp32_ble_tracker:620]: Found device 68:8F:B5:D0:73:EC RSSI=-103
[21:39:24][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:39:24][D][esp32_ble_tracker:620]: Found device E9:4E:6A:D6:FE:7A RSSI=-72
[21:39:24][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:39:24][D][esp32_ble_tracker:620]: Found device 63:10:7D:59:F6:97 RSSI=-70
[21:39:24][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:39:26][D][esp32_ble_tracker:620]: Found device 69:14:8F:0F:92:C8 RSSI=-99
[21:39:26][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:39:36][D][esp32_ble_tracker:620]: Found device 68:3E:34:CC:E0:88 RSSI=-95
[21:39:36][D][esp32_ble_tracker:641]: Address Type: PUBLIC
[21:39:36][D][esp32_ble_tracker:643]: Name: '魅族遥控器'
[21:39:55][D][esp32_ble_tracker:620]: Found device 78:DA:07:EA:E9:80 RSSI=-97
[21:39:55][D][esp32_ble_tracker:641]: Address Type: PUBLIC
[21:40:14][D][esp32_ble_tracker:620]: Found device 4A:53:84:DE:37:C7 RSSI=-94
[21:40:14][D][esp32_ble_tracker:641]: Address Type: RANDOM
[21:40:14][D][esp32_ble_tracker:645]: TX Power: 2 我是米家指纹锁,我看压缩包里还有个xiaomi_ble文件夹,是要用这个吗?
|