Skip to main content

Provides REST-server, publisher-interface and serializer for the Unified Device Interface in Python based on the SensOr Interfacing Language (SOIL).

Project description

Build

Python Unified Device Interface

Current stable version: 8.2.5

Installation

  1. Install the WZL-UDI package via pip
pip install wzl-udi

Documentation

A full documentation of the entire library does not exist yet and is currently work in progress.

Usage

For using the PUDI device interface you need to have a SOIL-Model of your device in JSON-Format. 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. Examples of fictional devices using the library can be found here.

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

8.2.5 - 2023-04-17

  • relaxed required versions of dependencies to avoid conflicts

8.2.4 - 2023-04-13

  • updated dependency, so that wzl-udi is also compatible with Python 3.11

8.2.3 - 2023-03-29

  • removed legacy attributes from serialization and streaming

8.2.2 - 2023-03-29

  • fixed a type hint which depended on windows

8.2.1 - 2023-03-25

  • removed utilities dependency, by integrating logger into wzl-udi library

8.2.0 - 2023-03-16

  • improved FAIRness of streaming
    • published data contains metadata now
  • bug fixes
    • serialization of the complete model

8.1.1 - 2023-03-15

  • bug fix
    • resolving the methods of the sensor logic for dynamic components

8.1.0 - 2023-03-15

  • the desired dataformat of the response can be specified with a query parameter now, e.g.,
    • ../MEA-Temperature?format=json
    • ../MEA-Temperature?format=xml

8.0.1 - 2023-03-14

  • bug fixes
    • fixed DELETE endpoint for dynamic components

8.0.0 - 2023-03-11

  • changed initialization routine
    • the mapping via a dictionary of encapsulated sensor logic to HTTP-Endpoints is not needed anymore
    • the mapping is now derived automatically because the names of the attributes from the sensor implementation are assumed to be generated from a SOIL-Model
  • code clean-up
    • removed a lot of deprecated source code
  • bug fixes
    • fixed in error of fixed jobs

7.1.0 - 2023-02-27

  • added legacy flag as server parameter (default: false)
    • if set, datatypes are serialized to the old string representation, i.e. "bool" instead of "boolean", and "double" instead of float

7.0.2 - 2023-02-23

  • fixed a bug in update-streams for non-scalar variables

7.0.1 - 2023-02-23

  • minor bugfix

7.0.0 - 2023-02-23

  • aligned the naming of datatypes with Textual SOIL
    • "bool" is replaced by "boolean"
    • "double" is replaced by "float"
    • old naming is still accepted when starting the server, but responses of the server use the SOIl-conform naming

6.3.1 - 2023-02-21

  • updated from Python 3.9 to Python 3.11

6.3.0 - 2022-06-09

  • added property "label" for measurements as replacement for "nonce"
  • marked usage of keyword "nonce" as deprecated

6.2.0 - 2022-06-02

  • added XML as dataformat for response bodies and published messages
  • dataformat can now be chosen between XML and JSON

6.1.2 - 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 - 2020-10-09

1.2.6 - 2020-08-09

  • bug fix in docstring parsing

1.2.5 - 2020-08-09

  • bug fix in GET handler

1.2.4 - 2020-08-01

  • bug fixes

1.2.3 - 2020-08-01

  • bug fixes

1.2.2 - 2020-08-01

  • bug fixes

1.2.1 - 2020-08-01

  • bug fixes

1.2.0 - 2020-08-01

  • getters and setters are asynchronous now

1.1.2 - 2020-07-31

  • improved error handling

1.1.1 - 2020-07-29

  • bug fixes

1.1.0 - 2020-07-29

  • enabled asynchronous functions
  • bug fixes

1.0.0 - 2020-07-28

  • initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wzl-udi-8.2.5.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

wzl_udi-8.2.5-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file wzl-udi-8.2.5.tar.gz.

File metadata

  • Download URL: wzl-udi-8.2.5.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for wzl-udi-8.2.5.tar.gz
Algorithm Hash digest
SHA256 f6fa5f0fa3a8086695bfe1695451ab71733bc00669b5c7f94489b259222bdf3d
MD5 597ec118ded1ffd80e4183b75ca7aa0f
BLAKE2b-256 e7c49a2c623c042177fc1b95ebf48bfa36389b2f6a96e45c6be0ba4dfe6f090f

See more details on using hashes here.

File details

Details for the file wzl_udi-8.2.5-py3-none-any.whl.

File metadata

  • Download URL: wzl_udi-8.2.5-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for wzl_udi-8.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 67e4e67ad3b9b812c0cee9fb83a1aaf95546cf28f75f6d57377dffec3f3ecb3b
MD5 a0168d7baa16e8b401e4d96689e70ffc
BLAKE2b-256 5b6828943c24dcb09cfefdcb23b23c3d8cd849da6b34444c4a2e555ea8fea0c9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page