Using 'COM7' as serial port.
Writing at 0x000ec000... (100 %)Wrote 1529872 bytes (915773 compressed) at 0x00010000 in 21.2 seconds (effective 577.5 kbit/s)...
Hash of data verified.
Leaving...
Hard Resetting...
Done! Flashing is complete!
Showing logs:
[20:41:07]ets Jun 8 2016 00:22:57
[20:41:07]
[20:41:07]rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[20:41:07]configsip: 0, SPIWP:0xee
[20:41:07]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[20:41:07]modeIO, clock div:2
[20:41:07]load:0x3fff0018,len:4
[20:41:07]load:0x3fff001c,len:1044
[20:41:07]load:0x40078000,len:8896
[20:41:07]load:0x40080400,len:5828
[20:41:07]entry 0x400806ac
[20:41:08][I][logger:170]: Log initialized
[20:41:08][C][ota:378]: There have been 0 suspected unsuccessful boot attempts.
[20:41:08][I][app:029]: Running through setup()...
[20:41:08][D][esp32_ble_tracker:180]: Starting scan...
[20:41:08][C][wifi:037]: Setting up WiFi...
[20:41:09][D][wifi:380]: Starting scan...
[20:41:09][D][esp32_ble_tracker:620]: Found device 77:65:029:5E:49 RSSI=-53
[20:41:09][D][esp32_ble_tracker:641]: Address Type: RANDOM
[20:41:09][D][esp32_ble_tracker:645]: TX Power: 2
[20:41:09][D][esp32_ble_tracker:620]: Found device E9:4E:6A6:FE:7A RSSI=-75
[20:41:09][D][esp32_ble_tracker:641]: Address Type: RANDOM
[20:41:09][D][esp32_ble_tracker:620]: Found device 75:74:0C:06:33:98 RSSI=-57
[20:41:09][D][esp32_ble_tracker:641]: Address Type: RANDOM
[20:41:09][D][esp32_ble_tracker:645]: TX Power: 2
[20:41:10][D][esp32_ble_tracker:620]: Found device 68:3E:34:CC:E25 RSSI=-86
[20:41:10][D][esp32_ble_tracker:641]: Address Type: PUBLIC
[20:41:10][D][esp32_ble_tracker:643]: Name: '魅族遥控器'
[20:41:12][D][wifi:395]: Found networks:
[20:41:12][I][wifi:441]: - 'Vaneber_2.4G' (76:7D:24:EB0:16) ▂▄▆█
[20:41:12][D][wifi:442]: Channel: 8
[20:41:12][D][wifi:443]: RSSI: -61 dB
[20:41:12][D][wifi:445]: - 'ChinaNet-jJtM' (D4:5F:25:24:74:44) ▂▄▆█
[20:41:12][D][wifi:445]: - 'iTV-jJtM' (D6:5F:25:34:74:44) ▂▄▆█
[20:41:12][D][wifi:445]: - 'ChinaNet-mu3346' (DC:9C:9F:5A:AC:17) ▂▄▆█
[20:41:12][D][wifi:445]: - 'iTV-9fJM' (DE:9C:9F:5A:AC:17) ▂▄▆█
[20:41:12][D][wifi:445]: - 'mu3346' (8C:AB:8E:B2:0D8) ▂▄▆█
[20:41:12][D][wifi:445]: - 'TP-LINK_803' (F4:83:CD:66:F9:4B) ▂▄▆█
[20:41:12][D][wifi:445]: - 'CMCC-N57Q' (A0:8C:F8:E7:B5:C4) ▂▄▆█
[20:41:12][D][wifi:445]: - '15-503' (F0:E4:A2:2F:70:AC) ▂▄▆█
[20:41:12][D][wifi:445]: - 'lixiang' (C4:2B:44:25:4F:40) ▂▄▆█
[20:41:12][I][wifi:250]: WiFi Connecting to 'Vaneber_2.4G'...
[20:41:13][D][esp32_ble_tracker:620]: Found device E9:79:5E2:A9:6A RSSI=-93
[20:41:13][D][esp32_ble_tracker:641]: Address Type: RANDOM
[20:41:13][D][esp32_ble_tracker:643]: Name: 'Mi Band 3'
[20:41:13][I][wifi:513]: WiFi Connected!
[20:41:13][C][wifi:359]: SSID: 'Vaneber_2.4G'
[20:41:13][C][wifi:360]: IP Address: 192.168.50.12
[20:41:13][C][wifi:362]: BSSID: 76:7D:24:EB0:16
[20:41:13][C][wifi:363]: Hostname: 'lock'
[20:41:13][C][wifi:367]: Signal strength: -60 dB ▂▄▆█
[20:41:13][C][wifi:371]: Channel: 8
[20:41:13][C][wifi:372]: Subnet: 255.255.255.0
[20:41:13][C][wifi:373]: Gateway: 192.168.50.1
[20:41:13][C][wifi:374]: DNS1: 114.114.114.114
[20:41:13][C][wifi:375]: DNS2: 8.8.8.8
[20:41:13][D][wifi:522]: Disabling AP...
[20:41:13][C][ota:029]: Over-The-Air Updates:
[20:41:13][C][ota:030]: Address: lock.local:3232
[20:41:13][C][ota:032]: Using Password.
[20:41:13][C][api:022]: Setting up Home Assistant API server...
[20:41:13][I][app:059]: setup() finished successfully!
[20:41:13][I][app:105]: ESPHome version 1.21.0-dev compiled on Jul 24 2021, 03:23:58
[20:41:13][C][wifi:499]: WiFi:
[20:41:13][C][wifi:359]: SSID: 'Vaneber_2.4G'
[20:41:13][C][wifi:360]: IP Address: 192.168.50.12
[20:41:13][C][wifi:362]: BSSID: 76:7D:24:EB0:16
[20:41:13][C][wifi:363]: Hostname: 'lock'
[20:41:13][C][wifi:367]: Signal strength: -61 dB ▂▄▆█
[20:41:13][C][wifi:371]: Channel: 8
[20:41:13][C][wifi:372]: Subnet: 255.255.255.0
[20:41:13][C][wifi:373]: Gateway: 192.168.50.1
[20:41:13][C][wifi:374]: DNS1: 114.114.114.114
[20:41:13][C][wifi:375]: DNS2: 8.8.8.8
[20:41:13][C][logger:189]: Logger:
[20:41:13][C][logger:190]: Level: DEBUG
[20:41:13][C][logger:191]: Log Baud Rate: 115200
[20:41:13][C][logger:192]: Hardware UART: UART0
[20:41:13][C][esp32_ble_tracker:606]: BLE Tracker:
[20:41:13][C][esp32_ble_tracker:607]: Scan Duration: 300 s
[20:41:13][C][esp32_ble_tracker:608]: Scan Interval: 320.0 ms
[20:41:13][C][esp32_ble_tracker:609]: Scan Window: 180.0 ms
[20:41:13][C][esp32_ble_tracker:610]: Scan Type: ACTIVE
[20:41:13][C][xiaomi_zelkova:012]: Xiaomi ZELKOVA
[20:41:13][C][xiaomi_zelkova:013]: Bindkey: D8.9E.5B.CE.BB.E8.11.5A.E1.42.BB.03.D8.09.95.6E (16)
[20:41:13][C][xiaomi_zelkova:014]: OpMethod 'OpMethod'
[20:41:13][C][xiaomi_zelkova:014]: State Class: ''
[20:41:13][C][xiaomi_zelkova:014]: Unit of Measurement: ''
[20:41:13][C][xiaomi_zelkova:014]: Accuracy Decimals: 0
[20:41:13][C][xiaomi_zelkova:015]: OpKeyID 'KeyID'
[20:41:13][C][xiaomi_zelkova:015]: State Class: ''
[20:41:13][C][xiaomi_zelkova:015]: Unit of Measurement: ''
[20:41:13][C][xiaomi_zelkova:015]: Accuracy Decimals: 0
[20:41:13][C][xiaomi_zelkova:016]: OpTS 'OpTS'
[20:41:13][C][xiaomi_zelkova:016]: State Class: ''
[20:41:13][C][xiaomi_zelkova:016]: Unit of Measurement: ''
[20:41:13][C][xiaomi_zelkova:016]: Accuracy Decimals: 0
[20:41:13][C][xiaomi_zelkova:017]: LockAttr 'LockAttr'
[20:41:13][C][xiaomi_zelkova:017]: State Class: ''
[20:41:13][C][xiaomi_zelkova:017]: Unit of Measurement: ''
[20:41:13][C][xiaomi_zelkova:017]: Accuracy Decimals: 0
[20:41:13][C][xiaomi_zelkova:018]: BattLvl 'BattLvl'
[20:41:13][C][xiaomi_zelkova:018]: Device Class: 'battery'
[20:41:13][C][xiaomi_zelkova:018]: State Class: ''
[20:41:13][C][xiaomi_zelkova:018]: Unit of Measurement: '%'
[20:41:13][C][xiaomi_zelkova:018]: Accuracy Decimals: 0
[20:41:13][C][xiaomi_zelkova:019]: BattLvlTS 'BattLvlTS'
[20:41:13][C][xiaomi_zelkova:019]: State Class: ''
[20:41:13][C][xiaomi_zelkova:019]: Unit of Measurement: ''
[20:41:13][C][xiaomi_zelkova:019]: Accuracy Decimals: 0
[20:41:13][C][xiaomi_zelkova:020]: DoorEvt 'DoorEvt'
[20:41:13][C][xiaomi_zelkova:020]: State Class: ''
[20:41:13][C][xiaomi_zelkova:020]: Unit of Measurement: ''
[20:41:13][C][xiaomi_zelkova:020]: Accuracy Decimals: 0
[20:41:13][C][xiaomi_zelkova:021]: DoorEvtTS 'DoorEvtTS'
[20:41:13][C][xiaomi_zelkova:021]: State Class: ''
[20:41:13][C][xiaomi_zelkova:021]: Unit of Measurement: ''
[20:41:13][C][xiaomi_zelkova:021]: Accuracy Decimals: 0
[20:41:13][C][captive_portal:148]: Captive Portal:
[20:41:13][C][ota:029]: Over-The-Air Updates:
[20:41:13][C][ota:030]: Address: lock.local:3232
[20:41:13][C][ota:032]: Using Password.
[20:41:13][C][api:095]: API Server:
[20:41:13][C][api:096]: Address: lock.local:6053
[20:41:14][D][esp32_ble_tracker:620]: Found device 77:59:8C:75:07:C3 RSSI=-92
[20:41:14][D][esp32_ble_tracker:641]: Address Type: RANDOM
[20:41:17][D][esp32_ble_tracker:620]: Found device 51:C6:C86:2B:2D RSSI=-96
[20:41:17][D][esp32_ble_tracker:641]: Address Type: RANDOM
[20:41:18][D][esp32_ble_tracker:620]: Found device 50:EB:60:97:B4:9A RSSI=-96
[20:41:18][D][esp32_ble_tracker:641]: Address Type: RANDOM
[20:41:20][D][esp32_ble_tracker:620]: Found device 74:61:5A:74:66:83 RSSI=-49
[20:41:20][D][esp32_ble_tracker:641]: Address Type: RANDOM
[20:41:20][D][esp32_ble_tracker:645]: TX Power: 2
[20:41:21][D][esp32_ble_tracker:620]: Found device 48:02:87:87:BF:77 RSSI=-93
[20:41:21][D][esp32_ble_tracker:641]: Address Type: RANDOM
[20:41:38][D][api:067]: Disconnecting aioesphomeapi (192.168.50.221)
[20:41:38][D][api.connection:670]: Client 'Home Assistant 2021.4.3 (192.168.50.221)' connected successfully!
[20:41:43][D][esp32_ble_tracker:620]: Found device 63:10:7D:59:F6:97 RSSI=-73
[20:41:43][D][esp32_ble_tracker:641]: Address Type: RANDOM
[20:41:59][D][esp32_ble_tracker:620]: Found device 68:3E:34:CC:E0:88 RSSI=-95
[20:41:59][D][esp32_ble_tracker:641]: Address Type: PUBLIC
[20:41:59][D][esp32_ble_tracker:643]: Name: '魅族遥控器'
[20:44:23][D][esp32_ble_tracker:620]: Found device 78:DA:07:EA:E9:80 RSSI=-97
[20:44:23][D][esp32_ble_tracker:641]: Address Type: PUBLIC
b:“Manufacturer Specific Data”(0xFF)含有小米公司识别码(ID:0x038F),这类消息是加密的,又分为两种(已可以解密,见下文):
b.1:待机状态下,长度固定为16,这是锁属性/状态报告,大概十来秒发一次;
- 在开锁或发生其他事件时,门锁会发出长度不同的“Manufacturer Specific Data”广播报文:
b.2:比如开锁时,长度为25,对应小米文档里的“锁事件”。显然,这个是很重要的;
#48里又提到:
1. 我的锁有用消息都是在scan response中的“Manufacturer Specific Data”当中,而你的锁都是在advertising中“Service Data”里。也就是说,你只需要被动接收即可,无需主动扫描,更省电