tinkerforge-async 1.4.3__tar.gz → 1.5.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 (41) hide show
  1. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/PKG-INFO +37 -26
  2. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/README.md +33 -25
  3. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/pyproject.toml +3 -2
  4. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/_version.py +1 -1
  5. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/brick_master.py +1 -6
  6. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_industrial_dual_analog_in_v2.py +10 -8
  7. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_io4_v2.py +11 -10
  8. tinkerforge_async-1.5.1/tinkerforge_async/bricklet_isolator.py +307 -0
  9. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_ptc.py +11 -3
  10. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_ptc_v2.py +10 -2
  11. tinkerforge_async-1.5.1/tinkerforge_async/bricklet_thermocouple_v2.py +419 -0
  12. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/device_factory.py +6 -2
  13. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/devices.py +12 -0
  14. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/ip_connection.py +1 -1
  15. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async.egg-info/PKG-INFO +38 -27
  16. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async.egg-info/SOURCES.txt +2 -0
  17. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async.egg-info/requires.txt +2 -0
  18. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/LICENSE +0 -0
  19. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/setup.cfg +0 -0
  20. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/setup.py +0 -0
  21. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/__init__.py +0 -0
  22. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/async_event_bus.py +0 -0
  23. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_ambient_light_v2.py +0 -0
  24. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_ambient_light_v3.py +0 -0
  25. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_analog_in.py +0 -0
  26. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_barometer.py +0 -0
  27. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_barometer_v2.py +0 -0
  28. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_humidity.py +0 -0
  29. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_humidity_v2.py +0 -0
  30. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_industrial_ptc.py +0 -0
  31. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_io16.py +0 -0
  32. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_moisture.py +0 -0
  33. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_motion_detector_v2.py +0 -0
  34. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_rs232_v2.py +0 -0
  35. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_segment_display_4x7.py +0 -0
  36. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_segment_display_4x7_v2.py +0 -0
  37. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_temperature.py +0 -0
  38. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/bricklet_temperature_v2.py +0 -0
  39. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async/ip_connection_helper.py +0 -0
  40. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async.egg-info/dependency_links.txt +0 -0
  41. {tinkerforge_async-1.4.3 → tinkerforge_async-1.5.1}/tinkerforge_async.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tinkerforge_async
3
- Version: 1.4.3
3
+ Version: 1.5.1
4
4
  Summary: Python3 AsyncIO Tinkerforge driver
5
5
  Author-email: Patrick Baus <patrick.baus@physik.tu-darmstadt.de>
6
6
  License: GNU General Public License v3 (GPLv3)
@@ -14,6 +14,7 @@ Classifier: Programming Language :: Python :: 3.8
14
14
  Classifier: Programming Language :: Python :: 3.9
15
15
  Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
17
18
  Classifier: Development Status :: 5 - Production/Stable
18
19
  Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
19
20
  Classifier: Operating System :: OS Independent
@@ -33,6 +34,7 @@ Requires-Dist: isort; extra == "dev"
33
34
  Requires-Dist: mypy; extra == "dev"
34
35
  Requires-Dist: pre-commit; extra == "dev"
35
36
  Requires-Dist: pylint; extra == "dev"
37
+ Requires-Dist: setuptools; extra == "dev"
36
38
  Requires-Dist: twine; extra == "dev"
37
39
  Provides-Extra: doc
38
40
  Requires-Dist: myst-parser; extra == "doc"
@@ -41,11 +43,13 @@ Provides-Extra: test
41
43
  Requires-Dist: mypy; extra == "test"
42
44
  Requires-Dist: pylint; extra == "test"
43
45
  Requires-Dist: pytest; extra == "test"
46
+ Requires-Dist: setuptools; extra == "test"
44
47
 
45
- [![pylint](https://github.com/PatrickBaus/tinkerforge_async/actions/workflows/pylint.yml/badge.svg)](https://github.com/PatrickBaus/tinkerforge_async/actions/workflows/pylint.yml)
48
+ [![pylint](../../actions/workflows/pylint.yml/badge.svg)](../../actions/workflows/pylint.yml)
46
49
  [![PyPI](https://img.shields.io/pypi/v/tinkerforge-async)](https://pypi.org/project/tinkerforge-async/)
47
50
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tinkerforge-async)
48
51
  ![PyPI - Status](https://img.shields.io/pypi/status/tinkerforge-async)
52
+ [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](LICENSE)
49
53
  [![code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
50
54
  # TinkerforgeAsync
51
55
  This is a reimplementation of the Tinkerforge Python bindings ([original Python bindings](https://www.tinkerforge.com/en/doc/Software/API_Bindings_Python.html)) using Python 3 asyncio. The original bindings used threads to manage the blocking operations. A much cleaner implementation is possible using the `await` syntax from asyncio.
@@ -59,28 +63,30 @@ The library is fully type-hinted.
59
63
  |--|--|--|--|
60
64
  |[Master](https://www.tinkerforge.com/en/doc/Hardware/Bricks/Master_Brick.html)|:heavy_check_mark:|:heavy_check_mark:| |
61
65
 
62
- |Bricklet|Supported|Tested|
63
- |--|--|--|
64
- |[Ambient Light 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Ambient_Light_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
65
- |[Ambient Light 3.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Ambient_Light_V3.html)|:heavy_check_mark:|:heavy_check_mark:|
66
- |[Analog In](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Analog_In.html)|:heavy_check_mark:|:heavy_check_mark:|
67
- |[Barometer](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Barometer.html)|:heavy_check_mark:|:heavy_check_mark:|
68
- |[Barometer 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Barometer_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
69
- |[Humidity](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Humidity.html)|:heavy_check_mark:|:heavy_check_mark:|
70
- |[Humidity 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Humidity_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
71
- |[Industrial Dual Analog In Bricklet 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Dual_Analog_In_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
72
- |[Industrial PTC](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_PTC.html)|:heavy_check_mark:|:heavy_check_mark:|
73
- |[IO-4 2.0](https://www.tinkerforge.com/de/doc/Hardware/Bricklets/IO4_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
74
- |[IO-16](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/IO16.html)|:heavy_check_mark:|:heavy_check_mark:|
75
- |[Moisture](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Moisture.html)|:heavy_check_mark:|:heavy_check_mark:|
76
- |[Motion Detector 2.0](https://www.tinkerforge.com/de/doc/Hardware/Bricklets/Motion_Detector_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
77
- |[PTC Bricklet](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/PTC.html)|:heavy_check_mark:|:heavy_check_mark:|
78
- |[PTC Bricklet 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/PTC_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
79
- |[RS232 Bricklet 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/RS232_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
80
- |[Segment Display 4x7 Bricklet](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Segment_Display_4x7.html)|:heavy_check_mark:|:heavy_check_mark:|
81
- |[Segment Display 4x7 Bricklet 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Segment_Display_4x7_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
82
- |[Temperature](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Temperature.html)|:heavy_check_mark:|:heavy_check_mark:|
83
- |[Temperature 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Temperature_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
66
+ | Bricklet |Supported|Tested|
67
+ |--------------------------------------------------------------------------------------------------------------------------|--|--|
68
+ | [Ambient Light 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Ambient_Light_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
69
+ | [Ambient Light 3.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Ambient_Light_V3.html) |:heavy_check_mark:|:heavy_check_mark:|
70
+ | [Analog In](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Analog_In.html) |:heavy_check_mark:|:heavy_check_mark:|
71
+ | [Barometer](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Barometer.html) |:heavy_check_mark:|:heavy_check_mark:|
72
+ | [Barometer 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Barometer_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
73
+ | [Humidity](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Humidity.html) |:heavy_check_mark:|:heavy_check_mark:|
74
+ | [Humidity 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Humidity_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
75
+ | [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:|
76
+ | [Industrial PTC](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_PTC.html) |:heavy_check_mark:|:heavy_check_mark:|
77
+ | [IO-4 2.0](https://www.tinkerforge.com/de/doc/Hardware/Bricklets/IO4_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
78
+ | [IO-16](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/IO16.html) |:heavy_check_mark:|:heavy_check_mark:|
79
+ | [Isolator](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Isolator.html) |:heavy_check_mark:|:heavy_check_mark:|
80
+ | [Moisture](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Moisture.html) |:heavy_check_mark:|:heavy_check_mark:|
81
+ | [Motion Detector 2.0](https://www.tinkerforge.com/de/doc/Hardware/Bricklets/Motion_Detector_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
82
+ | [PTC](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/PTC.html) |:heavy_check_mark:|:heavy_check_mark:|
83
+ | [PTC 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/PTC_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
84
+ | [RS232 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/RS232_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
85
+ | [Segment Display 4x7](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Segment_Display_4x7.html) |:heavy_check_mark:|:heavy_check_mark:|
86
+ | [Segment Display 4x7 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Segment_Display_4x7_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
87
+ | [Temperature](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Temperature.html) |:heavy_check_mark:|:heavy_check_mark:|
88
+ | [Temperature 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Temperature_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
89
+ | [Thermocouple 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Thermocouple_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
84
90
 
85
91
  ## Documentation
86
92
  The documentation is currently work in progress. The full documentation will be moved to
@@ -200,6 +206,11 @@ Some design choices of the original Tinkerforge API are overly complex. I theref
200
206
  - `BrickletPtcV2()` takes an additional parameter to define the type of sensor. The options are `BrickletPtc.SensorType.PT_100` and `BrickletPtc.SensorType.PT_1000`. This only determines the resistance returned by the bricklet. The default is `BrickletPtc.SensorType.PT_100`.
201
207
  - `BrickletPtcV2.sensor_type` getter and setter to change the type of sensor used.
202
208
 
209
+ - ### [Thermocouple Bricklet 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Thermocouple_V2.html)
210
+ - `BrickletThermocoupleV2()` takes an additional parameter to define the type of sensor. The options are of type `BrickletThermocoupleV2.SensorType`. The default is `BrickletPtc.SensorType.TYPE_K`.
211
+ - `BrickletThermocoupleV2.sensor_type` getter and setter to change the type of sensor used.
212
+
213
+
203
214
  - ### [Segment Display 4x7 Bricklet 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Segment_Display_4x7_V2.html)
204
215
  - `BrickletSegmentDisplay4x7V2.set_segments()` takes a `list`/`tuple` of 4 `int` instead of digit0, digit1, digit2, digit3. This is the same API as the older [Segment Display 4x7 Bricklet](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Segment_Display_4x7.html).
205
216
 
@@ -213,11 +224,11 @@ python3 setup.py install
213
224
 
214
225
  ## Versioning
215
226
  I use [SemVer](http://semver.org/) for versioning. For the versions available, see the
216
- [tags on this repository](https://github.com/PatrickBaus/tinkerforge_async/tags).
227
+ [tags on this repository](../../tags).
217
228
 
218
229
  ## Authors
219
230
  * **Patrick Baus** - *Initial work* - [PatrickBaus](https://github.com/PatrickBaus)
220
231
 
221
232
  ## License
222
233
  This project is licensed under the GPL v3 license - see the
223
- [LICENSE](https://github.com/PatrickBaus/tinkerforge_async/tree/master/LICENSE) file for details
234
+ [LICENSE](LICENSE) file for details
@@ -1,7 +1,8 @@
1
- [![pylint](https://github.com/PatrickBaus/tinkerforge_async/actions/workflows/pylint.yml/badge.svg)](https://github.com/PatrickBaus/tinkerforge_async/actions/workflows/pylint.yml)
1
+ [![pylint](../../actions/workflows/pylint.yml/badge.svg)](../../actions/workflows/pylint.yml)
2
2
  [![PyPI](https://img.shields.io/pypi/v/tinkerforge-async)](https://pypi.org/project/tinkerforge-async/)
3
3
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tinkerforge-async)
4
4
  ![PyPI - Status](https://img.shields.io/pypi/status/tinkerforge-async)
5
+ [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](LICENSE)
5
6
  [![code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
6
7
  # TinkerforgeAsync
7
8
  This is a reimplementation of the Tinkerforge Python bindings ([original Python bindings](https://www.tinkerforge.com/en/doc/Software/API_Bindings_Python.html)) using Python 3 asyncio. The original bindings used threads to manage the blocking operations. A much cleaner implementation is possible using the `await` syntax from asyncio.
@@ -15,28 +16,30 @@ The library is fully type-hinted.
15
16
  |--|--|--|--|
16
17
  |[Master](https://www.tinkerforge.com/en/doc/Hardware/Bricks/Master_Brick.html)|:heavy_check_mark:|:heavy_check_mark:| |
17
18
 
18
- |Bricklet|Supported|Tested|
19
- |--|--|--|
20
- |[Ambient Light 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Ambient_Light_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
21
- |[Ambient Light 3.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Ambient_Light_V3.html)|:heavy_check_mark:|:heavy_check_mark:|
22
- |[Analog In](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Analog_In.html)|:heavy_check_mark:|:heavy_check_mark:|
23
- |[Barometer](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Barometer.html)|:heavy_check_mark:|:heavy_check_mark:|
24
- |[Barometer 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Barometer_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
25
- |[Humidity](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Humidity.html)|:heavy_check_mark:|:heavy_check_mark:|
26
- |[Humidity 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Humidity_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
27
- |[Industrial Dual Analog In Bricklet 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_Dual_Analog_In_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
28
- |[Industrial PTC](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_PTC.html)|:heavy_check_mark:|:heavy_check_mark:|
29
- |[IO-4 2.0](https://www.tinkerforge.com/de/doc/Hardware/Bricklets/IO4_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
30
- |[IO-16](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/IO16.html)|:heavy_check_mark:|:heavy_check_mark:|
31
- |[Moisture](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Moisture.html)|:heavy_check_mark:|:heavy_check_mark:|
32
- |[Motion Detector 2.0](https://www.tinkerforge.com/de/doc/Hardware/Bricklets/Motion_Detector_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
33
- |[PTC Bricklet](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/PTC.html)|:heavy_check_mark:|:heavy_check_mark:|
34
- |[PTC Bricklet 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/PTC_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
35
- |[RS232 Bricklet 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/RS232_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
36
- |[Segment Display 4x7 Bricklet](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Segment_Display_4x7.html)|:heavy_check_mark:|:heavy_check_mark:|
37
- |[Segment Display 4x7 Bricklet 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Segment_Display_4x7_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
38
- |[Temperature](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Temperature.html)|:heavy_check_mark:|:heavy_check_mark:|
39
- |[Temperature 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Temperature_V2.html)|:heavy_check_mark:|:heavy_check_mark:|
19
+ | Bricklet |Supported|Tested|
20
+ |--------------------------------------------------------------------------------------------------------------------------|--|--|
21
+ | [Ambient Light 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Ambient_Light_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
22
+ | [Ambient Light 3.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Ambient_Light_V3.html) |:heavy_check_mark:|:heavy_check_mark:|
23
+ | [Analog In](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Analog_In.html) |:heavy_check_mark:|:heavy_check_mark:|
24
+ | [Barometer](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Barometer.html) |:heavy_check_mark:|:heavy_check_mark:|
25
+ | [Barometer 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Barometer_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
26
+ | [Humidity](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Humidity.html) |:heavy_check_mark:|:heavy_check_mark:|
27
+ | [Humidity 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Humidity_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
28
+ | [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
+ | [Industrial PTC](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Industrial_PTC.html) |:heavy_check_mark:|:heavy_check_mark:|
30
+ | [IO-4 2.0](https://www.tinkerforge.com/de/doc/Hardware/Bricklets/IO4_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
31
+ | [IO-16](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/IO16.html) |:heavy_check_mark:|:heavy_check_mark:|
32
+ | [Isolator](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Isolator.html) |:heavy_check_mark:|:heavy_check_mark:|
33
+ | [Moisture](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Moisture.html) |:heavy_check_mark:|:heavy_check_mark:|
34
+ | [Motion Detector 2.0](https://www.tinkerforge.com/de/doc/Hardware/Bricklets/Motion_Detector_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
35
+ | [PTC](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/PTC.html) |:heavy_check_mark:|:heavy_check_mark:|
36
+ | [PTC 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/PTC_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
37
+ | [RS232 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/RS232_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
38
+ | [Segment Display 4x7](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Segment_Display_4x7.html) |:heavy_check_mark:|:heavy_check_mark:|
39
+ | [Segment Display 4x7 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Segment_Display_4x7_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
40
+ | [Temperature](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Temperature.html) |:heavy_check_mark:|:heavy_check_mark:|
41
+ | [Temperature 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Temperature_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
42
+ | [Thermocouple 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Thermocouple_V2.html) |:heavy_check_mark:|:heavy_check_mark:|
40
43
 
41
44
  ## Documentation
42
45
  The documentation is currently work in progress. The full documentation will be moved to
@@ -156,6 +159,11 @@ Some design choices of the original Tinkerforge API are overly complex. I theref
156
159
  - `BrickletPtcV2()` takes an additional parameter to define the type of sensor. The options are `BrickletPtc.SensorType.PT_100` and `BrickletPtc.SensorType.PT_1000`. This only determines the resistance returned by the bricklet. The default is `BrickletPtc.SensorType.PT_100`.
157
160
  - `BrickletPtcV2.sensor_type` getter and setter to change the type of sensor used.
158
161
 
162
+ - ### [Thermocouple Bricklet 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Thermocouple_V2.html)
163
+ - `BrickletThermocoupleV2()` takes an additional parameter to define the type of sensor. The options are of type `BrickletThermocoupleV2.SensorType`. The default is `BrickletPtc.SensorType.TYPE_K`.
164
+ - `BrickletThermocoupleV2.sensor_type` getter and setter to change the type of sensor used.
165
+
166
+
159
167
  - ### [Segment Display 4x7 Bricklet 2.0](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Segment_Display_4x7_V2.html)
160
168
  - `BrickletSegmentDisplay4x7V2.set_segments()` takes a `list`/`tuple` of 4 `int` instead of digit0, digit1, digit2, digit3. This is the same API as the older [Segment Display 4x7 Bricklet](https://www.tinkerforge.com/en/doc/Hardware/Bricklets/Segment_Display_4x7.html).
161
169
 
@@ -169,11 +177,11 @@ python3 setup.py install
169
177
 
170
178
  ## Versioning
171
179
  I use [SemVer](http://semver.org/) for versioning. For the versions available, see the
172
- [tags on this repository](https://github.com/PatrickBaus/tinkerforge_async/tags).
180
+ [tags on this repository](../../tags).
173
181
 
174
182
  ## Authors
175
183
  * **Patrick Baus** - *Initial work* - [PatrickBaus](https://github.com/PatrickBaus)
176
184
 
177
185
  ## License
178
186
  This project is licensed under the GPL v3 license - see the
179
- [LICENSE](https://github.com/PatrickBaus/tinkerforge_async/tree/master/LICENSE) file for details
187
+ [LICENSE](LICENSE) file for details
@@ -14,6 +14,7 @@ classifiers = [
14
14
  "Programming Language :: Python :: 3.9",
15
15
  "Programming Language :: Python :: 3.10",
16
16
  "Programming Language :: Python :: 3.11",
17
+ "Programming Language :: Python :: 3.12",
17
18
  "Development Status :: 5 - Production/Stable",
18
19
  "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
19
20
  "Operating System :: OS Independent",
@@ -36,7 +37,7 @@ dynamic = ["version"]
36
37
 
37
38
  [project.optional-dependencies]
38
39
  dev = [
39
- "black", "build", "isort", "mypy", "pre-commit", "pylint", "twine",
40
+ "black", "build", "isort", "mypy", "pre-commit", "pylint", "setuptools", "twine",
40
41
  ]
41
42
 
42
43
  doc = [
@@ -44,7 +45,7 @@ doc = [
44
45
  ]
45
46
 
46
47
  test = [
47
- "mypy", "pylint", "pytest",
48
+ "mypy", "pylint", "pytest", "setuptools"
48
49
  ]
49
50
 
50
51
  [tool.pylint.'MESSAGES CONTROL']
@@ -1,2 +1,2 @@
1
1
  # pylint: disable=missing-module-docstring
2
- __version__ = "1.4.3"
2
+ __version__ = "1.5.1"
@@ -15,7 +15,7 @@ from typing import TYPE_CHECKING, AsyncGenerator, Iterable, NamedTuple
15
15
 
16
16
  from .devices import BasicCallbackConfiguration
17
17
  from .devices import BrickletPort as Port
18
- from .devices import DeviceIdentifier, DeviceWithMCU, Event, GetSPITFPErrorCount
18
+ from .devices import DeviceIdentifier, DeviceWithMCU, Event, GetSPITFPBaudrateConfig, GetSPITFPErrorCount
19
19
  from .devices import ThresholdOption as Threshold
20
20
  from .devices import _FunctionID
21
21
  from .ip_connection_helper import pack_payload, unpack_payload
@@ -265,11 +265,6 @@ class GetWifi2MeshAPStatus(NamedTuple):
265
265
  mac_address: tuple[int, int, int, int, int, int]
266
266
 
267
267
 
268
- class GetSPITFPBaudrateConfig(NamedTuple):
269
- enable_dynamic_baudrate: bool
270
- minimum_dynamic_baudrate: int
271
-
272
-
273
268
  class GetProtocol1BrickletName(NamedTuple):
274
269
  protocol_version: int
275
270
  firmware_version: tuple[int, int, int]
@@ -11,7 +11,14 @@ from decimal import Decimal
11
11
  from enum import Enum, unique
12
12
  from typing import TYPE_CHECKING, AsyncGenerator, NamedTuple
13
13
 
14
- from .devices import AdvancedCallbackConfiguration, BrickletWithMCU, DeviceIdentifier, Event, LedConfig
14
+ from .devices import (
15
+ AdvancedCallbackConfiguration,
16
+ BrickletWithMCU,
17
+ DeviceIdentifier,
18
+ Event,
19
+ LedConfig,
20
+ SimpleCallbackConfiguration,
21
+ )
15
22
  from .devices import ThresholdOption as Threshold
16
23
  from .devices import _FunctionID
17
24
  from .ip_connection_helper import pack_payload, unpack_payload
@@ -99,11 +106,6 @@ class GetChannelLEDStatusConfig(NamedTuple):
99
106
  config: ChannelLedStatusConfig
100
107
 
101
108
 
102
- class GetAllVoltagesCallbackConfiguration(NamedTuple):
103
- period: int
104
- value_has_to_change: bool
105
-
106
-
107
109
  class BrickletIndustrialDualAnalogInV2(BrickletWithMCU):
108
110
  """
109
111
  Measures two DC voltages between -35V and +35V with 24bit resolution each
@@ -313,7 +315,7 @@ class BrickletIndustrialDualAnalogInV2(BrickletWithMCU):
313
315
  response_expected=response_expected,
314
316
  )
315
317
 
316
- async def get_all_voltages_callback_configuration(self) -> GetAllVoltagesCallbackConfiguration:
318
+ async def get_all_voltages_callback_configuration(self) -> SimpleCallbackConfiguration:
317
319
  """
318
320
  Returns the callback configuration as set by :func:`Set All Voltages Callback Configuration`.
319
321
 
@@ -322,7 +324,7 @@ class BrickletIndustrialDualAnalogInV2(BrickletWithMCU):
322
324
  _, payload = await self.ipcon.send_request(
323
325
  device=self, function_id=FunctionID.GET_VOLTAGE_CALLBACK_CONFIGURATION, response_expected=True
324
326
  )
325
- return GetAllVoltagesCallbackConfiguration(*unpack_payload(payload, "I !"))
327
+ return SimpleCallbackConfiguration(*unpack_payload(payload, "I !"))
326
328
 
327
329
  async def set_sample_rate(self, rate: _SamplingRate | int, response_expected: bool = True) -> None:
328
330
  """
@@ -10,7 +10,13 @@ from decimal import Decimal
10
10
  from enum import Enum, unique
11
11
  from typing import TYPE_CHECKING, AsyncGenerator, NamedTuple
12
12
 
13
- from .devices import AdvancedCallbackConfiguration, BrickletWithMCU, DeviceIdentifier, Event
13
+ from .devices import (
14
+ AdvancedCallbackConfiguration,
15
+ BrickletWithMCU,
16
+ DeviceIdentifier,
17
+ Event,
18
+ SimpleCallbackConfiguration,
19
+ )
14
20
  from .devices import ThresholdOption as Threshold
15
21
  from .devices import _FunctionID
16
22
  from .ip_connection_helper import pack_payload, unpack_payload
@@ -94,11 +100,6 @@ class GetInputValueCallbackConfiguration(NamedTuple):
94
100
  value_has_to_change: bool
95
101
 
96
102
 
97
- class GetAllInputValueCallbackConfiguration(NamedTuple):
98
- period: int
99
- value_has_to_change: bool
100
-
101
-
102
103
  class GetMonoflop(NamedTuple):
103
104
  value: bool
104
105
  time: int
@@ -329,7 +330,7 @@ class BrickletIO4V2(BrickletWithMCU):
329
330
  response_expected=response_expected,
330
331
  )
331
332
 
332
- async def get_input_value_callback_configuration(self, channel: int) -> GetInputValueCallbackConfiguration:
333
+ async def get_input_value_callback_configuration(self, channel: int) -> SimpleCallbackConfiguration:
333
334
  """
334
335
  Returns the callback configuration for the given channel as set by
335
336
  :func:`Set Input Value Callback Configuration`.
@@ -342,7 +343,7 @@ class BrickletIO4V2(BrickletWithMCU):
342
343
  data=pack_payload((int(channel),), "B"),
343
344
  response_expected=True,
344
345
  )
345
- return GetInputValueCallbackConfiguration(*unpack_payload(payload, "I !"))
346
+ return SimpleCallbackConfiguration(*unpack_payload(payload, "I !"))
346
347
 
347
348
  async def set_all_input_value_callback_configuration(
348
349
  self, period: int = 0, value_has_to_change: bool = False, response_expected: bool = True
@@ -371,7 +372,7 @@ class BrickletIO4V2(BrickletWithMCU):
371
372
  response_expected=response_expected,
372
373
  )
373
374
 
374
- async def get_all_input_value_callback_configuration(self) -> GetAllInputValueCallbackConfiguration:
375
+ async def get_all_input_value_callback_configuration(self) -> SimpleCallbackConfiguration:
375
376
  """
376
377
  Returns the callback configuration as set by
377
378
  :func:`Set All Input Value Callback Configuration`.
@@ -379,7 +380,7 @@ class BrickletIO4V2(BrickletWithMCU):
379
380
  _, payload = await self.ipcon.send_request(
380
381
  device=self, function_id=FunctionID.GET_ALL_INPUT_VALUE_CALLBACK_CONFIGURATION, response_expected=True
381
382
  )
382
- return GetAllInputValueCallbackConfiguration(*unpack_payload(payload, "I !"))
383
+ return SimpleCallbackConfiguration(*unpack_payload(payload, "I !"))
383
384
 
384
385
  async def set_monoflop(self, channel: int, value: bool, time: int, response_expected: bool = True) -> None:
385
386
  """