From 9190117bffece6b3503a089b8aad0d74376015fe Mon Sep 17 00:00:00 2001 From: nao-pon Date: Sun, 25 Sep 2022 14:34:23 +0900 Subject: [PATCH] Ignore not-yet-supported notifications of node profile class --- pychonet/echonetapiclient.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pychonet/echonetapiclient.py b/pychonet/echonetapiclient.py index b4693a0..0960a5a 100644 --- a/pychonet/echonetapiclient.py +++ b/pychonet/echonetapiclient.py @@ -39,8 +39,12 @@ async def echonetMessageReceived(self, raw_data, addr): # handle discovery message response for opc in processed_data["OPC"]: epc = opc["EPC"] - if seojgc == 14 and seojcc == 240 and (epc == INSTANCE_LIST or epc == ENL_MANUFACTURER or epc == ENL_UID): # process discovery data - await self.process_discovery_data(host, opc) + if seojgc == 0x0E and seojcc == 0xF0: + if (epc in [INSTANCE_LIST, ENL_MANUFACTURER, ENL_UID]): # process discovery data + await self.process_discovery_data(host, opc) + else: + # @todo handling others (0x05: Notify of change instance list, etc...) + continue elif host not in self._state: # echonet packet arrived we dont know about if self._debug_flag: self._logger(f"Unknown ECHONETLite node has been identified at {host} - discovery packet fired")