From a8d4f1dff2a35e758770b29ea6c2264afbfa619f Mon Sep 17 00:00:00 2001 From: Alexei Chetroi Date: Wed, 29 Jan 2020 19:30:00 -0500 Subject: [PATCH 1/3] 0.10.0.dev0 version bump. --- zigpy_xbee/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zigpy_xbee/__init__.py b/zigpy_xbee/__init__.py index 3d6e1c1..0a1f503 100644 --- a/zigpy_xbee/__init__.py +++ b/zigpy_xbee/__init__.py @@ -1,5 +1,5 @@ MAJOR_VERSION = 0 -MINOR_VERSION = 9 +MINOR_VERSION = 10 PATCH_VERSION = "0.dev0" __short_version__ = "{}.{}".format(MAJOR_VERSION, MINOR_VERSION) __version__ = "{}.{}".format(__short_version__, PATCH_VERSION) From e9285b568b2c49ee29560ceb2f8e0fbdeda6921f Mon Sep 17 00:00:00 2001 From: Alexei Chetroi Date: Mon, 9 Mar 2020 09:54:20 -0400 Subject: [PATCH 2/3] Add coordinator device with correct status (#85) Update last_seen for coordinator when we receive any incoming message. --- zigpy_xbee/zigbee/application.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/zigpy_xbee/zigbee/application.py b/zigpy_xbee/zigbee/application.py index d492116..8c4545f 100644 --- a/zigpy_xbee/zigbee/application.py +++ b/zigpy_xbee/zigbee/application.py @@ -1,18 +1,18 @@ import asyncio import binascii import logging +import time import zigpy.application -import zigpy.exceptions import zigpy.device +import zigpy.exceptions import zigpy.quirks import zigpy.types import zigpy.util from zigpy.zcl.clusters.general import Groups from zigpy.zdo.types import NodeDescriptor, ZDOCmd -from zigpy_xbee.types import EUI64, TXStatus, UNKNOWN_IEEE, UNKNOWN_NWK - +from zigpy_xbee.types import EUI64, UNKNOWN_IEEE, UNKNOWN_NWK, TXStatus # how long coordinator would hold message for an end device in 10ms units CONF_CYCLIC_SLEEP_PERIOD = 0x0300 @@ -97,6 +97,7 @@ async def startup(self, auto_form=False): LOGGER.debug("sending CE command: %s", exc) dev = zigpy.device.Device(self, self.ieee, self.nwk) + dev.status = zigpy.device.Status.ENDPOINTS_INIT dev.add_endpoint(XBEE_ENDPOINT_ID) self.listener_event("raw_device_initialized", dev) xbee_dev = XBeeCoordinator(self, self.ieee, self.nwk, dev) @@ -283,6 +284,10 @@ def handle_rx( ) self.handle_join(nwk, ieee, 0) + try: + self.devices[self.ieee].last_seen = time.time() + except KeyError: + pass try: device = self.get_device(nwk=src_nwk) except KeyError: From 00da9169b9554258c4421fedb159b636bda45335 Mon Sep 17 00:00:00 2001 From: Alexei Chetroi Date: Mon, 9 Mar 2020 09:56:11 -0400 Subject: [PATCH 3/3] 0.10.0 version bump. --- zigpy_xbee/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zigpy_xbee/__init__.py b/zigpy_xbee/__init__.py index 0a1f503..20ff099 100644 --- a/zigpy_xbee/__init__.py +++ b/zigpy_xbee/__init__.py @@ -1,5 +1,5 @@ MAJOR_VERSION = 0 MINOR_VERSION = 10 -PATCH_VERSION = "0.dev0" +PATCH_VERSION = "0" __short_version__ = "{}.{}".format(MAJOR_VERSION, MINOR_VERSION) __version__ = "{}.{}".format(__short_version__, PATCH_VERSION)