python-selve-new 2.3.0__tar.gz → 2.3.1__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.3.0/python_selve_new.egg-info → python_selve_new-2.3.1}/PKG-INFO +5 -2
  2. {python_selve_new-2.3.0 → python_selve_new-2.3.1/python_selve_new.egg-info}/PKG-INFO +5 -2
  3. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/__init__.py +26 -1
  4. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/setup.py +1 -1
  5. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/.github/FUNDING.yml +0 -0
  6. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/.github/workflows/python-publish.yml +0 -0
  7. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/.gitignore +0 -0
  8. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/.idea/.gitignore +0 -0
  9. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  10. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/.idea/misc.xml +0 -0
  11. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/.idea/modules.xml +0 -0
  12. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/.idea/python-selve-new.iml +0 -0
  13. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/.idea/vcs.xml +0 -0
  14. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/.vscode/settings.json +0 -0
  15. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/LICENSE +0 -0
  16. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/README.md +0 -0
  17. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/package.sh +0 -0
  18. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/pyproject.toml +0 -0
  19. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/python_selve_new.egg-info/SOURCES.txt +0 -0
  20. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/python_selve_new.egg-info/dependency_links.txt +0 -0
  21. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/python_selve_new.egg-info/entry_points.txt +0 -0
  22. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/python_selve_new.egg-info/requires.txt +0 -0
  23. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/python_selve_new.egg-info/top_level.txt +0 -0
  24. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/commands/__init__.py +0 -0
  25. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/commands/command.py +0 -0
  26. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/commands/device.py +0 -0
  27. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/commands/event.py +0 -0
  28. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/commands/group.py +0 -0
  29. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/commands/iveo.py +0 -0
  30. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/commands/param.py +0 -0
  31. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/commands/senSim.py +0 -0
  32. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/commands/sender.py +0 -0
  33. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/commands/sensor.py +0 -0
  34. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/commands/service.py +0 -0
  35. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/device.py +0 -0
  36. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/gateway.py +0 -0
  37. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/group.py +0 -0
  38. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/iveo.py +0 -0
  39. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/senSim.py +0 -0
  40. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/sender.py +0 -0
  41. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/sensor.py +0 -0
  42. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/util/__init__.py +0 -0
  43. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/util/errors.py +0 -0
  44. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/selve/util/protocol.py +0 -0
  45. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/setup.cfg +0 -0
  46. {python_selve_new-2.3.0 → python_selve_new-2.3.1}/test.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: python-selve-new
3
- Version: 2.3.0
3
+ Version: 2.3.1
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
@@ -30,6 +30,9 @@ Requires-Dist: pybase64
30
30
  Requires-Dist: untangle
31
31
  Requires-Dist: nest_asyncio
32
32
  Requires-Dist: aioconsole
33
+ Dynamic: author
34
+ Dynamic: home-page
35
+ Dynamic: license-file
33
36
 
34
37
  # python-selve-new
35
38
  Python module for controlling Selve devices using an USB-RF-Gateway. Written completely new.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: python-selve-new
3
- Version: 2.3.0
3
+ Version: 2.3.1
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
@@ -30,6 +30,9 @@ Requires-Dist: pybase64
30
30
  Requires-Dist: untangle
31
31
  Requires-Dist: nest_asyncio
32
32
  Requires-Dist: aioconsole
33
+ Dynamic: author
34
+ Dynamic: home-page
35
+ Dynamic: license-file
33
36
 
34
37
  # python-selve-new
35
38
  Python module for controlling Selve devices using an USB-RF-Gateway. Written completely new.
@@ -138,7 +138,32 @@ class Selve:
138
138
  # serious trouble
139
139
 
140
140
 
141
+ def list_ports(self):
142
+ available_ports = list_ports.comports()
143
+ return available_ports
141
144
 
145
+ async def check_port(self, port):
146
+ if port is not None:
147
+ try:
148
+ self._serial = serial.Serial(
149
+ port=port,
150
+ baudrate=115200,
151
+ bytesize=serial.EIGHTBITS,
152
+ parity=serial.PARITY_NONE,
153
+ stopbits=serial.STOPBITS_ONE,
154
+ xonxoff=False,
155
+ rtscts=False,
156
+ dsrdtr=False)
157
+
158
+ if await self.pingGateway():
159
+ return True
160
+ except (serial.SerialException, IOError) as e:
161
+ self._LOGGER.debug("Configured port not valid! " + str(e))
162
+ return False
163
+ except Exception as e:
164
+ self._LOGGER.error("Unknown exception: " + str(e))
165
+ return False
166
+ return False
142
167
 
143
168
 
144
169
  async def setup(self, discover=False, fromConfigFlow=False):
@@ -681,7 +706,7 @@ class Selve:
681
706
  async def _executeCommandSyncWithResponse(self, command: Command):
682
707
  async with self._writeLock:
683
708
  async with self._readLock:
684
- if not self._serial.is_open:
709
+ if self._serial is not None and not self._serial.is_open:
685
710
  self._serial.open()
686
711
  await self._sendCommandToGateway(command)
687
712
  start_time = time.time()
@@ -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.3.0', # Required
18
+ version='2.3.1', # 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",