From 4bd7429c728f2a85ee62d57059ab20573c8423d1 Mon Sep 17 00:00:00 2001 From: msinn Date: Fri, 31 Mar 2023 14:10:16 +0200 Subject: [PATCH] onewire: Added a "sleep-time" for testing to improve io_cycle reading for parasite powered devices; Bumped version to 1.9.4 --- onewire/__init__.py | 5 +++-- onewire/plugin.yaml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/onewire/__init__.py b/onewire/__init__.py index 59266bf29..3b378bc60 100755 --- a/onewire/__init__.py +++ b/onewire/__init__.py @@ -43,7 +43,7 @@ class OneWire(SmartPlugin): the update functions for the items """ - PLUGIN_VERSION = '1.9.3' + PLUGIN_VERSION = '1.9.4' _flip = {0: '1', False: '1', 1: '0', True: '0', '0': True, '1': False} @@ -304,12 +304,13 @@ def _io_cycle(self): value = (addr in entries) else: value = self._flip[self.owbase.read('/uncached' + path).decode()] + self.stopevent.wait(self._parasitic_power_wait) except ConnectionError as e: self.logger.warning(f"_io_cycle: 'raise' {self._ios[addr][key]['readerrors']}. problem connecting to {addr}-{key}, error: {e}") raise except Exception as e: # time.sleep(self._parasitic_power_wait) - self.stopevent.wait(self._parasitic_power_wait) + #self.stopevent.wait(self._parasitic_power_wait) self._ios[addr][key]['readerrors'] = self._ios[addr][key].get('readerrors', 0) + 1 if self._ios[addr][key]['readerrors'] % self.warn_after == 0: self.logger.warning(f"_io_cycle: {self._ios[addr][key]['readerrors']}. problem reading {addr}-{key}, error: {e}") diff --git a/onewire/plugin.yaml b/onewire/plugin.yaml index 519da5f1b..a74228138 100755 --- a/onewire/plugin.yaml +++ b/onewire/plugin.yaml @@ -11,7 +11,7 @@ plugin: keywords: 1wire onewire dallas ibutton sensor temperature humidity documentation: '' support: https://knx-user-forum.de/forum/supportforen/smarthome-py/1493319-support-thread-zum-onewire-plugin - version: 1.9.3 # Plugin version + version: 1.9.4 # Plugin version sh_minversion: 1.9.3.5 # minimum shNG version to use this plugin multi_instance: True restartable: True