Skip to content

Commit 48eff78

Browse files
committed
add more logging to startScan
1 parent 1be9d50 commit 48eff78

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/switchbot-ble.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,11 @@ export class SwitchBotBLE extends EventEmitter {
300300

301301
this.noble.on('discover', async (peripheral: NobleTypes['peripheral']) => {
302302
const ad = await Advertising.parse(peripheral, this.log.bind(this))
303+
this.emit('debug', `Advertisement: ${ad}`)
304+
this.emit('debug', `Filter ID: ${p.id}`)
305+
this.emit('debug', `Filter Model: ${p.model}`)
303306
if (ad && await this.filterAd(ad, p.id, p.model)) {
307+
this.emit('debug', `Advertisement passed filter: ${ad}`)
304308
if (this.onadvertisement) {
305309
this.onadvertisement(ad)
306310
}

0 commit comments

Comments
 (0)