Python Unified Device Interface
Current stable version: 6.1.2
Stable legacy version: 5.2.7
Installation
- Install the WZL-Utilities dependency via pip
pip install --extra-index-url https://package-read:_UtxUoKFjoHGs9XJusBq@git-ce.rwth-aachen.de/api/v4/projects/2815/packages/pypi/simple wzl-utilities
- Install the WZL-MQTT dependency via pip
pip install --extra-index-url https://package-read:gkYP4xrm2PxicUbW1wra@git-ce.rwth-aachen.de/api/v4/projects/1708/packages/pypi/simple wzl-mqtt
- Install the WZL-UDI package via pip
pip install --extra-index-url https://package-read:sTkDQPiyBqkUyYVXZfeK@git-ce.rwth-aachen.de/api/v4/projects/1527/packages/pypi/simple wzl-udi
Usage
For using the PUDI device interface you need to have a SOIL-Model of your device in JSON-Format. See the Wiki for more information. You can design the model by hand our use the SOIL-Web-Editor, to generate the source code and get a ready-to-run python script for your device server. Please keep in mind, that creating a service with the SOIL-Editor gives your more features you can use.
Manual setup
If you do not use the SOIL-Editor, create a JSON-Model of your device and a mapping dictionary by hand. Please refer to the Servetize section of the repository's Wiki. Additionally, you can check the example directory for exemplary implementation(s).
Citation & References
Scientific background and publications related to the (Python) Unified Device Interface are:
Bodenbenner, M.; Sanders, M. P.; Montavon, B.; Schmitt, R. H. (2021): Domain-Specific Language for Sensors in the Internet of Production. In: Bernd-Arno Behrens, Alexander Brosius, Wolfgang Hintze, Steffen Ihlenfeldt und Jens Peter Wulfsberg (Hg.): Production at the leading edge of technology. Proceedings of the 10th Congress of the German Academic Association for Production Technology (WGP), Dresden, 23-24 September 2020. Berlin, Heidelberg, 2021. 1st ed. 2021. Berlin, Heidelberg: Springer (Lecture Notes in Production Engineering), S. 448–456, http://dx.doi.org/10.1007/978-3-662-62138-7_45
Bodenbenner, M.; Montavon, B.; Schmitt, R.H. (2021): FAIR sensor services - Towards sustainable sensor data management. In: Measurement: Sensors 18, S. 100206, https://doi.org/10.1016/j.measen.2021.100206
Montavon, B.(2021): Virtual Reference Frame Based on Distributed Large-Scale Metrology Providing Coordinates as a Service. Aachen: Apprimus Verlag, https://doi.org/10.18154/RWTH-2021-10238
Montavon, B.; Peterek, M.; Schmitt, R. H. (2019): Model-based interfacing of large-scale metrology instruments. In: Ettore Stella (Hg.): Multimodal Sensing: Technologies and Applications. 26-27 June 2019, Munich, Germany. Multimodal Sensing and Artificial Intelligence: Technologies and Applications. Munich, Germany, 6/24/2019 - 6/27/2019. Bellingham, Washington: SPIE (Proceedings of SPIE. 5200-, volume 11059), S. 11, https://doi.org/10.1117/12.2527461
Acknowledgements
The authors acknowledge funding from the LaVA project (Large Volume Applications, contract 17IND03 of the European Metrology Programme for Innovation and Research EMPIR). The EMPIR initiative is co-funded by the European Union’s Horizon 2020 research and innovation programme and the EMPIR Participating States.
Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany's Excellence Strategy – EXC-2023 Internet of Production – 390621612.
Recent changes
6.1.2 | 5.2.7 - 2022-04-14
- bug fix of loop handling of aiohttp web application
6.1.1 | 5.2.7 - 2021-05-19
- improved error output for developers
6.1.0 - 2021-05-18
- refactoring of streaming implementation
- scheduler classes are reduced to only one for all job types instead of three distinct schedulers
6.0.3 | 5.2.6 - 2021-05-10
- bug fix
- fixed serialization to RFC3339 time string
6.0.2 | 5.2.5 - 2021-05-04
- bug fix
- fixed parsing of parameters and variables/ measurements of type "time" for higher dimensions
6.0.1
- bug fix
- fixed parsing of parameters and measurements of type "time" for higher dimensions
6.0.0 - 2021-05-04
- renamed Object to Component and Variable to Measurement. UUID now starts with COM MEA respectively
- marked Object and Variable as deprecated
- marked docstring parsing as deprecated due to its error-prone behaviour
5.2.4 - 2021-04-15
- bug fix
- variables and parameters of type 'enum' and 'time' are now returned correctly
5.2.3 - 2021-04-07
- minor bug fixes
5.2.2 - 2021-01-22
- bug fixes of event handling and publishing, caused event handler to crash on the first event to be checked
5.2.1 - 2021-01-19
- bug fix
5.2.0 - 2020-11-27
- measurements can now be published automatically on value change
5.1.2
- bug fixes
5.1.1 - 2020-07-13
- bug fixes
5.1.0 - 2020-06-17
- added method for customizing logging-level
- unprotected the utils-module
5.0.3 - 2020-06-17
- bug fix
5.0.2 - 2020-06-17
- bug fix of asynchronous devices
5.0.1 - 2020-06-10
- fixed erroneous import
5.0.0 - 2020-06-09
- added events
- changed way of how MQTTPublisher are handled
4.2.2 - 2020-05-29
- bug fix of MQTT related docstring parsin
4.2.1 - 2020-05-28
- fixed a bug causing Objects could not be added during runtime
4.2.0 - 2020-05-26
- improved flexibility of docstring-parsing
4.1.1 - 2020-05-26
- bug fix
4.1.0 - 2020-05-25
- From now, the mqtt-callback of Functions accepts only one positional parameter, which is the message data. Thus, it is not required to specify the topic anymore.
4.0.0 - 2020-05-19
- renamed packages
- changed initialization routine
- bug fixes
3.1.3 - 2020-04-16
- bug fixes
3.1.2
- bug fixes
3.1.1
- bug fixes
3.1
- moved ScheduledMQTTPublisher into the wzl-mqtt package to avoid ambiguity
3.0 - 2020-04-14
- renamed and restructured packages for the sake of consistency with the C++ UDI
2.3.1 - 2020-03-26
- bug fix of ScheduledMQTTPublisher
2.3.0 - 2020-02-26
- instead of using Python-Docstrings one can provide an explicitly defined dictionary for configuration of the scheduled MQTTPublisher
- the publish method of the MQTTPublisher can passed to a function of the device to explicitly publish values within this function
- bug fixes
2.2.1 - 2020-02-03
- bug fixes
2.2.0 - 2020-01-27
- instead of using Python-Docstrings one can provide an explicitly defined dictionary with mappings from the model to the implementation
2.1.0 - 2020-01-21
- the leading objects part of all urls is optional now.
- bug fixes
2.0 - 2020-01-20
- renamed library into wzl-udi
- replaced MQTT-part with new wzl-mqtt package
1.5.2 - 2020-01-20
- bug fixes
1.5.1 - 2020-01-20
- bug fixes
1.5.0 - 2020-01-20
- changed request for setting parameter values from PUT to PATCH
1.4.1 - 2020-01-20
- bug fix
1.4.0 - 2020-01-20
- added optional ontology field to all elements
- bug fixes
1.3.0 - 2019-10-09
1.2.6 - 2019-08-09
- bug fix in docstring parsing
1.2.5 - 2019-08-09
- bug fix in GET handler
1.2.4 - 2019-08-01
- bug fixes
1.2.3 - 2019-08-01
- bug fixes
1.2.2 - 2019-08-01
- bug fixes
1.2.1 - 2019-08-01
- bug fixes
1.2.0 - 2019-08-01
- getters and setters are asynchronous now
1.1.2 - 2019-07-31
- improved error handling
1.1.1 - 2019-07-29
- bug fixes
1.1.0 - 2019-07-29
- enabled asynchronous functions
- bug fixes
1.0.0 - 2019-07-28
- initial release