tinkerforge-async 1.7.0__tar.gz → 1.8.0__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 (43) hide show
  1. {tinkerforge_async-1.7.0/tinkerforge_async.egg-info → tinkerforge_async-1.8.0}/PKG-INFO +5 -5
  2. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/README.md +1 -0
  3. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/pyproject.toml +4 -8
  4. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/_version.py +1 -1
  5. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_barometer_v2.py +1 -1
  6. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_humidity_v2.py +2 -2
  7. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_industrial_dual_analog_in_v2.py +2 -2
  8. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_thermocouple_v2.py +2 -2
  9. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/device_factory.py +2 -0
  10. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/devices.py +6 -1
  11. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0/tinkerforge_async.egg-info}/PKG-INFO +5 -5
  12. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async.egg-info/requires.txt +0 -3
  13. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/LICENSE +0 -0
  14. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/setup.cfg +0 -0
  15. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/setup.py +0 -0
  16. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/__init__.py +0 -0
  17. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/async_event_bus.py +0 -0
  18. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/brick_master.py +0 -0
  19. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_ambient_light_v2.py +0 -0
  20. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_ambient_light_v3.py +0 -0
  21. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_analog_in.py +0 -0
  22. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_barometer.py +0 -0
  23. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_humidity.py +0 -0
  24. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_industrial_dual_0_20ma_v2.py +0 -0
  25. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_industrial_ptc.py +0 -0
  26. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_io16.py +0 -0
  27. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_io4_v2.py +0 -0
  28. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_isolator.py +0 -0
  29. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_moisture.py +0 -0
  30. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_motion_detector_v2.py +0 -0
  31. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_ptc.py +0 -0
  32. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_ptc_v2.py +0 -0
  33. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_rs232_v2.py +0 -0
  34. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_segment_display_4x7.py +0 -0
  35. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_segment_display_4x7_v2.py +0 -0
  36. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_temperature.py +0 -0
  37. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/bricklet_temperature_v2.py +0 -0
  38. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/helper.py +0 -0
  39. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/ip_connection.py +0 -0
  40. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async/ip_connection_helper.py +0 -0
  41. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async.egg-info/SOURCES.txt +0 -0
  42. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async.egg-info/dependency_links.txt +0 -0
  43. {tinkerforge_async-1.7.0 → tinkerforge_async-1.8.0}/tinkerforge_async.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tinkerforge-async
3
- Version: 1.7.0
3
+ Version: 1.8.0
4
4
  Summary: Python3 AsyncIO Tinkerforge driver
5
5
  Author-email: Patrick Baus <patrick.baus@physik.tu-darmstadt.de>
6
6
  License-Expression: GPL-3.0-or-later
@@ -9,11 +9,11 @@ Project-URL: Bug Tracker, https://github.com/PatrickBaus/tinkerforge_async/issue
9
9
  Project-URL: Download, https://github.com/PatrickBaus/tinkerforge_async/releases
10
10
  Keywords: IoT,Tinkerforge,API
11
11
  Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.9
13
- Classifier: Programming Language :: Python :: 3.10
14
12
  Classifier: Programming Language :: Python :: 3.11
15
13
  Classifier: Programming Language :: Python :: 3.12
16
14
  Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Programming Language :: Python :: 3.15
17
17
  Classifier: Development Status :: 5 - Production/Stable
18
18
  Classifier: Operating System :: OS Independent
19
19
  Classifier: Intended Audience :: Developers
@@ -21,10 +21,9 @@ Classifier: Intended Audience :: Science/Research
21
21
  Classifier: Natural Language :: English
22
22
  Classifier: Topic :: Home Automation
23
23
  Classifier: Topic :: Scientific/Engineering
24
- Requires-Python: >=3.9
24
+ Requires-Python: >=3.11
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE
27
- Requires-Dist: typing-extensions; python_version < "3.11"
28
27
  Provides-Extra: dev
29
28
  Requires-Dist: black; extra == "dev"
30
29
  Requires-Dist: build; extra == "dev"
@@ -71,6 +70,7 @@ The library is fully type-hinted.
71
70
  | [Barometer 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Barometer_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
72
71
  | [Humidity](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Humidity.html) |:heavy_check_mark:|:heavy_check_mark:|
73
72
  | [Humidity 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Humidity_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
73
+ | [Industrial Dual 0-20mA 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Dual_020mA_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
74
74
  | [Industrial Dual Analog In 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Dual_Analog_In_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
75
75
  | [Industrial PTC](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_PTC.html) |:heavy_check_mark:|:heavy_check_mark:|
76
76
  | [IO-4 2.0](https://www.tinkerforge.com/de/doc/Hardware/Bricklets/IO4_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
@@ -25,6 +25,7 @@ The library is fully type-hinted.
25
25
  | [Barometer 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Barometer_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
26
26
  | [Humidity](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Humidity.html) |:heavy_check_mark:|:heavy_check_mark:|
27
27
  | [Humidity 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Humidity_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
28
+ | [Industrial Dual 0-20mA 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Dual_020mA_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
28
29
  | [Industrial Dual Analog In 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Dual_Analog_In_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
29
30
  | [Industrial PTC](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_PTC.html) |:heavy_check_mark:|:heavy_check_mark:|
30
31
  | [IO-4 2.0](https://www.tinkerforge.com/de/doc/Hardware/Bricklets/IO4_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
@@ -9,14 +9,14 @@ license = "GPL-3.0-or-later"
9
9
  license-files = [
10
10
  "LICENSE",
11
11
  ]
12
- requires-python = ">=3.9"
12
+ requires-python = ">=3.11"
13
13
  classifiers = [
14
14
  "Programming Language :: Python :: 3",
15
- "Programming Language :: Python :: 3.9",
16
- "Programming Language :: Python :: 3.10",
17
15
  "Programming Language :: Python :: 3.11",
18
16
  "Programming Language :: Python :: 3.12",
19
17
  "Programming Language :: Python :: 3.13",
18
+ "Programming Language :: Python :: 3.14",
19
+ "Programming Language :: Python :: 3.15",
20
20
  "Development Status :: 5 - Production/Stable",
21
21
  "Operating System :: OS Independent",
22
22
  "Intended Audience :: Developers",
@@ -26,9 +26,6 @@ classifiers = [
26
26
  "Topic :: Scientific/Engineering",
27
27
  ]
28
28
  keywords = ["IoT", "Tinkerforge", "API"]
29
- dependencies = [
30
- "typing-extensions; python_version <'3.11'",
31
- ]
32
29
  dynamic = ["version"]
33
30
 
34
31
  [project.urls]
@@ -74,8 +71,7 @@ markers = [
74
71
 
75
72
  [build-system]
76
73
  requires = [
77
- "setuptools>=77.0",
78
- "typing-extensions; python_version <'3.11'",
74
+ "setuptools>=84.0",
79
75
  ]
80
76
  build-backend = "setuptools.build_meta"
81
77
 
@@ -1,2 +1,2 @@
1
1
  # pylint: disable=missing-module-docstring
2
- __version__ = "1.7.0"
2
+ __version__ = "1.8.0"
@@ -427,7 +427,7 @@ class BrickletBarometerV2(BrickletWithMCU): # pylint: disable=too-many-public-m
427
427
  Returns the callback configuration as set by :func:`Set Temperature Callback Configuration`.
428
428
  """
429
429
  _, payload = await self.ipcon.send_request(
430
- device=self, function_id=FunctionID.GET_ALTITUDE_CALLBACK_CONFIGURATION, response_expected=True
430
+ device=self, function_id=FunctionID.GET_TEMPERATURE_CALLBACK_CONFIGURATION, response_expected=True
431
431
  )
432
432
  period, value_has_to_change, option, minimum, maximum = unpack_payload(payload, "I ! c i i")
433
433
  option = Threshold(option)
@@ -322,7 +322,7 @@ class BrickletHumidityV2(BrickletWithMCU):
322
322
  self.__si_to_temperature_sensor(minimum),
323
323
  self.__si_to_temperature_sensor(maximum),
324
324
  ),
325
- "I ! c H H",
325
+ "I ! c h h",
326
326
  ),
327
327
  response_expected=response_expected,
328
328
  )
@@ -334,7 +334,7 @@ class BrickletHumidityV2(BrickletWithMCU):
334
334
  _, payload = await self.ipcon.send_request(
335
335
  device=self, function_id=FunctionID.GET_TEMPERATURE_CALLBACK_CONFIGURATION, response_expected=True
336
336
  )
337
- period, value_has_to_change, option, minimum, maximum = unpack_payload(payload, "I ! c H H")
337
+ period, value_has_to_change, option, minimum, maximum = unpack_payload(payload, "I ! c h h")
338
338
  option = Threshold(option)
339
339
  minimum, maximum = self.__temperature_sensor_to_si(minimum), self.__temperature_sensor_to_si(maximum)
340
340
  return AdvancedCallbackConfiguration(period, value_has_to_change, option, minimum, maximum)
@@ -325,7 +325,7 @@ class BrickletIndustrialDualAnalogInV2(BrickletWithMCU):
325
325
  .. versionadded:: 2.0.6$nbsp;(Plugin)
326
326
  """
327
327
  _, payload = await self.ipcon.send_request(
328
- device=self, function_id=FunctionID.GET_VOLTAGE_CALLBACK_CONFIGURATION, response_expected=True
328
+ device=self, function_id=FunctionID.GET_ALL_VOLTAGES_CALLBACK_CONFIGURATION, response_expected=True
329
329
  )
330
330
  return SimpleCallbackConfiguration(*unpack_payload(payload, "I !"))
331
331
 
@@ -540,4 +540,4 @@ class BrickletIndustrialDualAnalogInV2(BrickletWithMCU):
540
540
 
541
541
  elif function_id is CallbackID.ALL_VOLTAGES:
542
542
  values = unpack_payload(payload, self.CALLBACK_FORMATS[function_id])
543
- yield Event(self, 2, function_id, (self.__value_to_si(value) for value in values))
543
+ yield Event(self, 2, function_id, tuple(self.__value_to_si(value) for value in values))
@@ -379,14 +379,14 @@ class BrickletThermocoupleV2(BrickletWithMCU):
379
379
  if self.__sensor_type is SensorType.TYPE_G8:
380
380
  return Decimal(value / 8 / 1.6 / 2**17)
381
381
  if self.__sensor_type is SensorType.TYPE_G32:
382
- return Decimal(value / 8 / 1.6 / 2**17)
382
+ return Decimal(value / 32 / 1.6 / 2**17)
383
383
  return Decimal(value + 27315) / 100
384
384
 
385
385
  def __si_to_value(self, value: float | Decimal) -> int:
386
386
  if self.__sensor_type is SensorType.TYPE_G8:
387
387
  return int(float(value) * 8 * 1.6 * 2**17)
388
388
  if self.__sensor_type is SensorType.TYPE_G32:
389
- return int(float(value) * 8 * 1.6 * 2**17)
389
+ return int(float(value) * 32 * 1.6 * 2**17)
390
390
  return int(value * 100) - 27315
391
391
 
392
392
  async def read_events(
@@ -15,6 +15,7 @@ from .bricklet_barometer import BrickletBarometer
15
15
  from .bricklet_barometer_v2 import BrickletBarometerV2
16
16
  from .bricklet_humidity import BrickletHumidity
17
17
  from .bricklet_humidity_v2 import BrickletHumidityV2
18
+ from .bricklet_industrial_dual_0_20ma_v2 import BrickletIndustrialDual020mAV2
18
19
  from .bricklet_industrial_dual_analog_in_v2 import BrickletIndustrialDualAnalogInV2
19
20
  from .bricklet_industrial_ptc import BrickletIndustrialPtc
20
21
  from .bricklet_io4_v2 import BrickletIO4V2
@@ -71,6 +72,7 @@ device_factory.register(BrickletBarometer)
71
72
  device_factory.register(BrickletBarometerV2)
72
73
  device_factory.register(BrickletHumidity)
73
74
  device_factory.register(BrickletHumidityV2)
75
+ device_factory.register(BrickletIndustrialDual020mAV2)
74
76
  device_factory.register(BrickletIndustrialDualAnalogInV2)
75
77
  device_factory.register(BrickletIndustrialPtc)
76
78
  device_factory.register(BrickletIO4V2)
@@ -111,6 +111,11 @@ class BrickletPort(Enum):
111
111
  B = "b"
112
112
  C = "c"
113
113
  D = "d"
114
+ E = "e" # Only available on Bricks/HATs with more than four ports
115
+ F = "f"
116
+ G = "g"
117
+ H = "h"
118
+ Z = "z" # Bricklets connected to an Isolator Bricklet are always at position 'z'
114
119
 
115
120
 
116
121
  class GetSPITFPErrorCount(NamedTuple):
@@ -184,7 +189,7 @@ class Device:
184
189
  the position, the hardware and firmware version as well as the
185
190
  device identifier.
186
191
 
187
- The position can be 'a', 'b', 'c' or 'd'.
192
+ The position can be 'a' to 'h' or 'z' (behind an Isolator Bricklet).
188
193
 
189
194
  The device identifier numbers can be found :ref:`here <device_identifier>`.
190
195
  |device_identifier_constant|
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tinkerforge-async
3
- Version: 1.7.0
3
+ Version: 1.8.0
4
4
  Summary: Python3 AsyncIO Tinkerforge driver
5
5
  Author-email: Patrick Baus <patrick.baus@physik.tu-darmstadt.de>
6
6
  License-Expression: GPL-3.0-or-later
@@ -9,11 +9,11 @@ Project-URL: Bug Tracker, https://github.com/PatrickBaus/tinkerforge_async/issue
9
9
  Project-URL: Download, https://github.com/PatrickBaus/tinkerforge_async/releases
10
10
  Keywords: IoT,Tinkerforge,API
11
11
  Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.9
13
- Classifier: Programming Language :: Python :: 3.10
14
12
  Classifier: Programming Language :: Python :: 3.11
15
13
  Classifier: Programming Language :: Python :: 3.12
16
14
  Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Programming Language :: Python :: 3.15
17
17
  Classifier: Development Status :: 5 - Production/Stable
18
18
  Classifier: Operating System :: OS Independent
19
19
  Classifier: Intended Audience :: Developers
@@ -21,10 +21,9 @@ Classifier: Intended Audience :: Science/Research
21
21
  Classifier: Natural Language :: English
22
22
  Classifier: Topic :: Home Automation
23
23
  Classifier: Topic :: Scientific/Engineering
24
- Requires-Python: >=3.9
24
+ Requires-Python: >=3.11
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE
27
- Requires-Dist: typing-extensions; python_version < "3.11"
28
27
  Provides-Extra: dev
29
28
  Requires-Dist: black; extra == "dev"
30
29
  Requires-Dist: build; extra == "dev"
@@ -71,6 +70,7 @@ The library is fully type-hinted.
71
70
  | [Barometer 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Barometer_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
72
71
  | [Humidity](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Humidity.html) |:heavy_check_mark:|:heavy_check_mark:|
73
72
  | [Humidity 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Humidity_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
73
+ | [Industrial Dual 0-20mA 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Dual_020mA_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
74
74
  | [Industrial Dual Analog In 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Dual_Analog_In_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
75
75
  | [Industrial PTC](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_PTC.html) |:heavy_check_mark:|:heavy_check_mark:|
76
76
  | [IO-4 2.0](https://www.tinkerforge.com/de/doc/Hardware/Bricklets/IO4_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
@@ -1,7 +1,4 @@
1
1
 
2
- [:python_version < "3.11"]
3
- typing-extensions
4
-
5
2
  [dev]
6
3
  black
7
4
  build