python-selve-new 2.2.17__tar.gz → 2.2.19__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. {python_selve_new-2.2.17/python_selve_new.egg-info → python_selve_new-2.2.19}/PKG-INFO +1 -1
  2. {python_selve_new-2.2.17 → python_selve_new-2.2.19/python_selve_new.egg-info}/PKG-INFO +1 -1
  3. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/__init__.py +10 -7
  4. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/setup.py +1 -1
  5. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/test.py +1 -1
  6. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/.github/FUNDING.yml +0 -0
  7. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/.github/workflows/python-publish.yml +0 -0
  8. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/.gitignore +0 -0
  9. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/.idea/.gitignore +0 -0
  10. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  11. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/.idea/misc.xml +0 -0
  12. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/.idea/modules.xml +0 -0
  13. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/.idea/python-selve-new.iml +0 -0
  14. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/.idea/vcs.xml +0 -0
  15. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/.vscode/settings.json +0 -0
  16. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/LICENSE +0 -0
  17. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/README.md +0 -0
  18. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/package.sh +0 -0
  19. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/pyproject.toml +0 -0
  20. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/python_selve_new.egg-info/SOURCES.txt +0 -0
  21. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/python_selve_new.egg-info/dependency_links.txt +0 -0
  22. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/python_selve_new.egg-info/entry_points.txt +0 -0
  23. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/python_selve_new.egg-info/requires.txt +0 -0
  24. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/python_selve_new.egg-info/top_level.txt +0 -0
  25. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/commands/__init__.py +0 -0
  26. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/commands/command.py +0 -0
  27. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/commands/device.py +0 -0
  28. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/commands/event.py +0 -0
  29. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/commands/group.py +0 -0
  30. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/commands/iveo.py +0 -0
  31. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/commands/param.py +0 -0
  32. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/commands/senSim.py +0 -0
  33. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/commands/sender.py +0 -0
  34. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/commands/sensor.py +0 -0
  35. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/commands/service.py +0 -0
  36. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/device.py +0 -0
  37. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/gateway.py +0 -0
  38. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/group.py +0 -0
  39. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/iveo.py +0 -0
  40. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/senSim.py +0 -0
  41. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/sender.py +0 -0
  42. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/sensor.py +0 -0
  43. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/util/__init__.py +0 -0
  44. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/util/errors.py +0 -0
  45. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/selve/util/protocol.py +0 -0
  46. {python_selve_new-2.2.17 → python_selve_new-2.2.19}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-selve-new
3
- Version: 2.2.17
3
+ Version: 2.2.19
4
4
  Summary: Python library for interfacing with selve devices using the USB-RF controller. Written completely new.
5
5
  Home-page: https://github.com/Kannix2005/python-selve-new
6
6
  Author: Stefan Altheimer
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-selve-new
3
- Version: 2.2.17
3
+ Version: 2.2.19
4
4
  Summary: Python library for interfacing with selve devices using the USB-RF controller. Written completely new.
5
5
  Home-page: https://github.com/Kannix2005/python-selve-new
6
6
  Author: Stefan Altheimer
@@ -40,12 +40,13 @@ from selve.util.protocol import ParameterType
40
40
  class Selve:
41
41
  """Implementation of the serial communication to the Selve Gateway"""
42
42
 
43
- def __init__(self, port=None, discover=True, develop=False, logger=None):
43
+ def __init__(self, port=None, discover=True, develop=False, logger=None, loop=None):
44
44
  # Gateway state
45
45
  self._callbacks = set()
46
46
  self._eventCallbacks = set()
47
47
  self.lastLogEvent = None
48
48
  self.state = None
49
+ self.loop = loop
49
50
 
50
51
  # Data from Duty Cycle Event
51
52
  self.utilization = 0
@@ -237,8 +238,11 @@ class Selve:
237
238
  except Exception as e:
238
239
  self._LOGGER.error("(Selve Worker): " + "Unknown exception: " + str(e))
239
240
 
240
-
241
- available_ports = list_ports.comports()
241
+ if self.loop is not None:
242
+ available_ports = await self.loop.run_in_executor(None, list_ports.comports())
243
+ else:
244
+ available_ports = list_ports.comports()
245
+
242
246
  self._LOGGER.debug("(Selve Worker): " + "available comports: " + str(available_ports))
243
247
 
244
248
  if len(available_ports) == 0:
@@ -973,8 +977,6 @@ class Selve:
973
977
  sender.lastEvent = response.event
974
978
  sender.name = response.senderName
975
979
  self.addOrUpdateDevice(sender, SelveTypes.SENSOR)
976
- for callback in self._eventCallbacks:
977
- callback(response)
978
980
 
979
981
  if isinstance(response, LogEventResponse):
980
982
  self.lastLogEvent = response
@@ -992,8 +994,9 @@ class Selve:
992
994
  self.sendingBlocked = response.mode
993
995
  self.utilization = response.traffic
994
996
 
995
- for callback in self._eventCallbacks:
996
- callback(response)
997
+
998
+ for callback in self._eventCallbacks:
999
+ callback(response)
997
1000
 
998
1001
 
999
1002
  def commandResult(self, response: IveoResultResponse | CommandResultResponse):
@@ -15,7 +15,7 @@ with open(path.join(here, 'README.md'), encoding='utf-8') as f:
15
15
  setup(
16
16
 
17
17
  name='python-selve-new', # Required
18
- version='2.2.17', # Required
18
+ version='2.2.19', # Required
19
19
  description='Python library for interfacing with selve devices using the USB-RF controller. Written completely new.', # Required
20
20
  long_description=long_description, # Optional
21
21
  long_description_content_type="text/markdown",
@@ -19,7 +19,7 @@ handler.setFormatter(formatter)
19
19
  logger.addHandler(handler)
20
20
 
21
21
 
22
- selve = selve.Selve(portname, develop=True, discover=False, logger=logger)
22
+ selve = selve.Selve(portname, develop=True, discover=False, logger=logger, loop=loop)
23
23
  loop.run_until_complete(selve.setup())
24
24
 
25
25
  loop.run_until_complete(selve.discover())