zigpy / zigpy-xbee

A library which communicates with XBee radios for zigpy
GNU General Public License v3.0
22 stars 18 forks source link

[REQUEST] Energy detection scan with zigpy-xbee for XBee Zigbee based adapters #112

Closed Hedda closed 12 months ago

Hedda commented 4 years ago

Requesting an "energy detection scan" feature in zigpy-xbee if possible matching what @puddly has recently added to zigpy-znp

Suggest implement similar channel energy scanning via some energy scanner tool but for XBee based firmware and hardware.

https://github.com/zha-ng/zigpy-znp

https://github.com/zha-ng/zigpy-znp/blob/dev/README.md

Energy scan

Perform an energy scan to find a quiet Zigbee channel:

$ python -m zigpy_znp.tools.energy_scan /dev/cu.usbmodem14101
Channel energy (mean of 1 / 5):
------------------------------------------------
 + Lower energy is better
 + Active Zigbee networks on a channel may still cause congestion
 + Using 26 in the USA may have lower TX power due to FCC regulations
 + Zigbee channels 15, 20, 25 fall between WiFi channels 1, 6, 11
 + Some Zigbee devices only join networks on channels 15, 20, and 25
------------------------------------------------
 - 11    61.57%  #############################################################
 - 12    60.78%  ############################################################
 - 13    12.16%  ############
 - 14    58.43%  ##########################################################
 - 15    57.65%  #########################################################
 - 16    29.80%  #############################
 - 17    38.82%  ######################################
 - 18    47.06%  ###############################################
 - 19    36.86%  ####################################
 - 20    10.98%  ##########
 - 21    16.47%  ################
 - 22    33.73%  #################################
 - 23    30.59%  ##############################
 - 24    20.39%  ####################
 - 25     5.88%  #####
 - 26*   20.39%  ####################
Shulyaka commented 12 months ago

The energy scan has been implemented, and I believe that the tool should be a separate package.