zigbeefordomoticz / Domoticz-Zigbee

Zigbee plugin for Domoticz. Allow to connect various zigbee controllers like Zigate but also Texas Instrument CC2531, CC13x2, CC26x2 ; Silicon-Labs; deConz based chipset to be connected to Domoticz
GNU General Public License v3.0
100 stars 43 forks source link

Zigpy reived_packet has LQI and RSSI #1728

Closed pipiche38 closed 5 months ago

pipiche38 commented 5 months ago

Today due to Zigate the plugin has only managed LQI. Would it make sense to also get RSSI collected ?

pipiche38 commented 5 months ago

2024-04-09 18:45:03,362 DEBUG :Received a packet: ZigbeePacket(timestamp=datetime.datetime(2024, 4, 9, 16, 45, 3, 361604, tzinfo=datetime.timezone.utc), src=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x4261), src_ep=1, dst=AddrModeAddress(addr_mode=<AddrMode.NWK: 2>, address=0x0000), dst_ep=1, source_route=None, extended_timeout=False, tsn=137, profile_id=260, cluster_id=513, data=Serialized[b'\x18\x15\n\x11\x00)(\n\x12\x00)\xd0\x07'], tx_options=<TransmitOptions.NONE: 0>, radius=0, non_member_radius=0, lqi=92, rssi=-77)

pipiche38 commented 5 months ago
# Get RSSI and LQI values from the device
device = self.ControllerLink.app.get_device(ieee_address, endpoint)

rssi = device.get_value("rssi")
lqi = device.get_value("lqi")