File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -279,6 +279,25 @@ def iter_channels():
279
279
timestamp = time .time ()
280
280
output .write (f"{ timestamp :0.4f} ,{ channel } ,{ energy :0.4f} \n " )
281
281
282
+ import bellows .types
283
+ from bellows .zigbee .application import (
284
+ ControllerApplication as EzspControllerApplication ,
285
+ )
286
+
287
+ if not isinstance (app , EzspControllerApplication ):
288
+ return
289
+
290
+ await asyncio .sleep (1 )
291
+ for channel in channels :
292
+ networks = await app ._ezsp .startScan (
293
+ scanType = bellows .types .EzspNetworkScanType .ACTIVE_SCAN ,
294
+ channelMask = zigpy .types .Channels .from_channel_list ([channel ]),
295
+ duration = 6 ,
296
+ )
297
+
298
+ for network , lqi , rssi in networks :
299
+ print (f"Found network { network } : LQI={ lqi } , RSSI={ rssi } " )
300
+
282
301
283
302
@radio .command ()
284
303
@click .pass_obj
You can’t perform that action at this time.
0 commit comments