dresden-elektronik / deconz-serial-protocol

deCONZ Serial Protocol
7 stars 2 forks source link

[REQUEST] Energy detection scan with documented API in deconz serial protocol #4

Open Hedda opened 3 years ago

Hedda commented 3 years ago

@manup Requesting an "energy detection scan" feature (with documented API) in deconz serial protocol

https://github.com/zigpy/zigpy-deconz

https://github.com/zigpy/zigpy-deconz/issues/130

Hope can be used by zigpy-deconz (so if possible something similar what @puddly has added to zigpy-znp radio library for zigpy).

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

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

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

That command and feature is in turn used in zigpy-cli (a unified command line interface for zigpy radios):

https://github.com/zigpy/zigpy-cli

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%  ####################