{"id":30799434,"url":"https://github.com/rdmorganiser/rdmo-plugins-sensorsearch","last_synced_at":"2026-07-11T03:31:51.845Z","repository":{"id":267483831,"uuid":"887208844","full_name":"rdmorganiser/rdmo-plugins-sensorsearch","owner":"rdmorganiser","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-15T15:24:41.000Z","size":212,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-06-15T17:17:09.868Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rdmorganiser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-12T10:58:44.000Z","updated_at":"2025-12-04T10:55:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"afec43e6-a5b0-42e7-af3b-9e244f9dc366","html_url":"https://github.com/rdmorganiser/rdmo-plugins-sensorsearch","commit_stats":null,"previous_names":["rdmorganiser/rdmo-plugins-sensorsearch"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/rdmorganiser/rdmo-plugins-sensorsearch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdmorganiser%2Frdmo-plugins-sensorsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdmorganiser%2Frdmo-plugins-sensorsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdmorganiser%2Frdmo-plugins-sensorsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdmorganiser%2Frdmo-plugins-sensorsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rdmorganiser","download_url":"https://codeload.github.com/rdmorganiser/rdmo-plugins-sensorsearch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdmorganiser%2Frdmo-plugins-sensorsearch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35350133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-05T19:11:58.688Z","updated_at":"2026-07-11T03:31:51.837Z","avatar_url":"https://github.com/rdmorganiser.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: 2023 - 2024 Hannes Fuchs (GFZ) \u003chfuchs@gfz-potsdam.de\u003e\nSPDX-FileCopyrightText: 2023 - 2024 Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences\nSPDX-FileCopyrightText: 2025 - 2026 RDMO Community and individual contributors\nSPDX-License-Identifier: Apache-2.0\n--\u003e\n\n# RDMO Sensor Search option set plugin\n\nThis option set plugin allows you to query several sensor registries at the\nsame time. Additional questions can be filled in automatically with information\nfrom the sensor registries. To use this feature an attribute mapping must be\nconfigured.\n\nThe following sensor registries are currently implemented:\n- [Geophysical Instrument Pool Potsdam (GIPP)](https://gipp.gfz-potsdam.de/)\n- [O2A Registry](https://registry.o2a-data.de/)\n- [Sensor Management System](https://codebase.helmholtz.cloud/hub-terra/sms/service-desk/-/wikis/home)\n\nFor every integration it is possible to define multiple instances in the\nconfiguration. This is especially necessary for the Sensor Management System\n(SMS), since there are four productive instances.\n\nThis plugin is based on the [RDMO Sensor AWI option set plugin](https://github.com/hafu/rdmo-sensor-awi)\nwith a complete refactoring, to allow configuration and easy extension with\nmore registries if needed.\n\n## Setup\n\nInstall the plugins in your RDMO virtual environment using pip (directly from\nGitHub):\n\n```bash\npip install git+https://github.com/rdmorganiser/rdmo-plugins-sensorsearch\n```\n\nOr when editing the code you can put the code a folder beneath your RDMO\ninstallation and install it with:\n\n```bash\npip install -e ../rdmo-plugins-sensorsearch\n```\n\nAdd the plugin to the `OPTIONSET_PROVIDERS` in `config/settings/local.py`:\n\n```python\nOPTIONSET_PROVIDERS = [\n    ('sensorssearch', _('Sensor Search'), 'rdmo_sensorsearch.providers.SensorsProvider'),\n    ('sensorssearch_configurations', _('Configuration Search'), 'rdmo_sensorsearch.providers.ConfigurationsProvider'),\n    ('sensorssearch_project_sensors', _('Project Configuration Sensors'), 'rdmo_sensorsearch.providers.ProjectConfigurationSensorsProvider'),\n    ('sensorssearch_project_data_collection_devices', _('Project Data Collection Devices'), 'rdmo_sensorsearch.providers.ProjectDataCollectionDevicesProvider'),\n]\n```\n\nAdd the plugin to the `INSTALLED_APPS` in `config/settings/local.py`:\n\n```python\nINSTALLED_APPS = ['rdmo_sensorsearch'] + INSTALLED_APPS\n```\n\nAfter restarting RDMO, the `Sensor Search` should be selectable as a provider\noption for option sets. If you enable the additional provider entries, a\nseparate `Configuration Search` provider, a project-local reuse provider for\nmounted sensors, and a data collection devices provider are available as well.\nThe data collection devices provider uses the same project-local value source\nfor data collection instrument selection questions.\n\n## Configuration\n\nWith `config.toml` the providers which should be used can be configured. The\n`SensorsProvider` aggregates the results of the configured providers.\n`ConfigurationsProvider` works the same way for configuration backends.\n\nTo automatically fill out questions with results of the matching sensor,\nattribute mapping for the specific catalog(s) must be configured in the\nconfiguration file.\n\nThe configuration file default location is inside the directory of the plugin.\nThe location can be overwritten with `SENSORS_SEARCH_PROVIDER_CONFIG_FILE_PATH`\nin the in `config/settings/local.py` or as environment variable with the same\nname.\n\n### Configuration: Providers\n\n```toml\n[SensorsProvider]\nmin_search_len = 3\n\n[SensorsProvider.provider_defaults.SensorManagementSystemProvider]\nmax_hits = 20\n\n[ConfigurationsProvider]\nmin_search_len = 3\n\n[ProjectConfigurationSensorsProvider]\n[[ProjectConfigurationSensorsProvider.catalogs]]\ncatalog_uri = \"http://example.com/terms/questions/example-configurations-earth-sensor\"\nsource_attribute_uri = \"http://example.com/terms/domain/configuration-set/member-sensor\"\n\n[ProjectDataCollectionDevicesProvider]\n[[ProjectDataCollectionDevicesProvider.catalogs]]\ncatalog_uri = \"https://rdmo.nfdi4earth.de/terms/questions/earth-sensor\"\nsource_attribute_uri = \"https://rdmo.nfdi4earth.de/terms/domain/configuration-set/selected-devices\"\n\n[[SensorsProvider.providers.O2ARegistrySearchProvider]]\n\n[[SensorsProvider.providers.SensorManagementSystemProvider]]\nid_prefix = \"gfzsms\"\ntext_prefix = \"GFZ Sensors:\"\nbase_url = \"https://sensors.gfz-potsdam.de/backend/api/v1/devices\"\n\n[[SensorsProvider.providers.SensorManagementSystemProvider]]\nid_prefix = \"kitsms\"\ntext_prefix = \"KIT Sensors:\"\nbase_url = \"https://sms.atmohub.kit.edu/backend/api/v1/devices\"\n\n[[SensorsProvider.providers.SensorManagementSystemProvider]]\nid_prefix = \"ufzsms\"\ntext_prefix = \"UFZ Sensors:\"\nbase_url = \"https://web.app.ufz.de/sms/backend/api/v1/devices\"\n\n[[SensorsProvider.providers.GeophysicalInstrumentPoolPotsdamProvider]]\n\n[[ConfigurationsProvider.providers.SensorManagementSystemConfigurationsProvider]]\nid_prefix = \"gfzcfg\"\ntext_prefix = \"GFZ Configurations:\"\nbase_url = \"https://sensors.gfz.de/backend/api/v1/configurations\"\n\n[[ConfigurationsProvider.providers.O2ARegistryMissionsProvider]]\nid_prefix = \"o2amission\"\ntext_prefix = \"O2A Mission\"\nbase_url = \"https://registry.o2a-data.de/rest/v2/missions\"\nwhere_template = \"name=ILIKE=\\\"*{query}*\\\"\"\n\n[handlers.SensorManagementSystemConfigurationsHandler]\n[[handlers.SensorManagementSystemConfigurationsHandler.backends]]\nid_prefix = \"gfzcfg\"\nbase_url = \"https://sensors.gfz.de/backend/api/v1\"\nsensor_id_prefix = \"gfzsms\"\n[handlers.SensorManagementSystemConfigurationsHandler.defaults]\nauto_complete_field_uri = \"http://example.com/terms/domain/configuration-set/configuration-search\"\nmember_sensors_attribute_uri = \"http://example.com/terms/domain/configuration-set/member-sensor\"\nfrontend_link_attribute_uri = \"https://rdmorganiser.github.io/terms/domain/project/dataset/uri\"\napi_link_attribute_uri = \"https://rdmorganiser.github.io/terms/domain/project/dataset/source\"\nlocation_attribute_uri = \"https://rdmorganiser.github.io/terms/domain/project/dataset/spatial\"\n[handlers.SensorManagementSystemConfigurationsHandler.defaults.attribute_mapping]\n\"data.id\" = \"https://rdmorganiser.github.io/terms/domain/project/dataset/identifier\"\n\"data.attributes.label\" = \"https://rdmorganiser.github.io/terms/domain/project/dataset/description\"\n\"data.attributes.project\" = \"https://rdmorganiser.github.io/terms/domain/project/dataset/documentation\"\n\"data.attributes.persistent_identifier\" = \"https://rdmorganiser.github.io/terms/domain/project/dataset/id\"\n\"data.attributes.description\" = \"https://rdmorganiser.github.io/terms/domain/project/dataset/annotation\"\n\"data.links.self\" = \"https://rdmorganiser.github.io/terms/domain/project/dataset/source\"\n[[handlers.SensorManagementSystemConfigurationsHandler.catalogs]]\ncatalog_uri = \"http://example.com/terms/questions/example-configurations-earth-sensor\"\n\n[handlers.O2ARegistryMissionsHandler]\n[handlers.O2ARegistryMissionsHandler.defaults]\nauto_complete_field_uri = \"http://example.com/terms/domain/configuration-set/configuration-search\"\nmember_sensors_attribute_uri = \"http://example.com/terms/domain/configuration-set/member-sensor\"\ndevice_collection_attribute_uri = \"http://example.com/terms/domain/instruments/id\"\nitem_id_prefix = \"o2aregistry\"\nitem_text_template = \"{prefix}({item_id}) Mission({mission_id}): {name}{serial}\"\n[handlers.O2ARegistryMissionsHandler.defaults.attribute_mapping]\n\"description\" = \"http://example.com/terms/domain/configuration-set/description\"\n\"startDate\" = \"http://example.com/terms/domain/configuration-set/start\"\n\"endDate\" = \"http://example.com/terms/domain/configuration-set/end\"\n[[handlers.O2ARegistryMissionsHandler.catalogs]]\ncatalog_uri = \"http://example.com/terms/questions/example-configurations-earth-sensor\"\n```\n\nThis configures all available providers with three SMS instances to query. The\n`SensorsProvider` will only query the configured providers if at least three\ncharacters are entered.\n\nThe `O2ARegistrySearchProvider` and `GeophysicalInstrumentPoolPotsdamProvider`\nuses their default values for `id_prefix`, `text_prefix`, `base_url` and\n`max_hits`.\n\nThere is no default `base_url` for `SensorManagementSystemProvider` defined,\ntherefore the `base_url` for every instance must be set. In addition the\n`text_prefix` and `id_prefix` is configured. The `text_prefix` is displayed\nbefore the result, so that the user can identify the correct registry and\nsensor. The `id_prefix` is used internally, to prefix the id which is saved\nalong the value in `external_id`. This is used by the handler to query the\ncorrect registry when filling out questions with attribute mapping\nautomatically.\n\nIn conclusion, every remote provider has the following options:\n- `id_prefix` to identify the instance internally and used by the handler\n- `text_prefix` is displayed next to the queried result to identify the used\n  registry\n- `max_hits` defaults to `10` and limits the results to display\n- `base_url` the API URL of the used instance, must be set for the\n  `SensorManagementSystemProvider` and\n  `SensorManagementSystemConfigurationsProvider`\n\nTo avoid repeating shared provider settings, provider defaults can be declared\nonce per meta-provider and provider class:\n\n```toml\n[SensorsProvider.provider_defaults.SensorManagementSystemProvider]\nmax_hits = 20\n```\n\nThese defaults are merged into every\n`[[SensorsProvider.providers.SensorManagementSystemProvider]]` entry. Any value\ndeclared on the concrete provider entry still overrides the default.\n\nThe `ProjectConfigurationSensorsProvider` and\n`ProjectDataCollectionDevicesProvider` are different. They do not query a\nremote backend, but read project-local values which were materialized by a\nconfiguration handler after a configuration was selected. For the Earth-Sensor\ncatalog, `ProjectDataCollectionDevicesProvider` reads the selected devices from\n`https://rdmo.nfdi4earth.de/terms/domain/configuration-set/selected-devices`.\n\nFor the Earth-Sensor catalog, selected data collection devices also drive the\nparameter list of the following data collection question. When a device is\nselected in\n`https://rdmorganiser.github.io/terms/domain/project/dataset/collaboration_tools`,\nthe plugin looks up the device detail values already materialized in section 2\nand appends missing parameter name/unit pairs to:\n\n- `https://rdmo.nfdi4earth.de/terms/domain/project/dataset/metadata/dc-variable`\n- `https://rdmo.nfdi4earth.de/terms/domain/project/dataset/metadata/dc-unit`\n\nExisting identical parameter name/unit pairs are not added again. Rows generated\nby this synchronization are marked with a `sensorsearch:dc-variable:` external\nID. When a device is removed from the data collection device list, generated\nparameter rows are removed again if no remaining selected device still provides\nthat parameter name/unit pair. Manually entered rows and older unmarked rows are\nleft untouched.\n\nO2A Registry missions are exposed through `O2ARegistryMissionsProvider`. They\nfollow the same configuration flow as SMS configurations: selecting a mission\ncan materialize its items into the configured project-local sensor collection.\nThe default search query uses the O2A RSQL form `name=ILIKE=\"*{query}*\"`.\n\n### Configuration: Handlers\n\nHandlers can be used to fill out questions automatically with the use of a\nconfigured attribute mapping. For every provider a handler is implemented,\nwhich can request additional information from the registry to answer questions.\n\nHandler defaults can also be configured once and then reused by multiple\ncatalogs or even applied as a wildcard mapping for any catalog which uses the\nsame autocomplete field.\n\n```toml\n[handlers.O2ARegistrySearchHandler]\n#[[handlers.O2ARegistrySearchHandler.backends]]\n#id_prefix = \"o2aregistry\"\n[handlers.O2ARegistrySearchHandler.defaults]\nauto_complete_field_uri = \"http://rdmo-dev.local/terms/domain/sensor/awi/search\"\nsync_device_detail_blocks = true\ndevice_link_attribute_uri = \"http://rdmo-dev.local/terms/domain/sensor/device-link\"\n[handlers.O2ARegistrySearchHandler.defaults.attribute_mapping]\n\"longName\" = \"http://rdmo-dev.local/terms/domain/sensor/awi/type-name\"\n\"shortName\" = \"http://rdmo-dev.local/terms/domain/sensor/awi/name\"\n\"serialNumber\" = \"http://rdmo-dev.local/terms/domain/sensor/awi/serial\"\n\n[[handlers.O2ARegistrySearchHandler.catalogs]]\ncatalog_uri = \"http://rdmo-dev.local/terms/questions/sensor-awi-test\"\n# optional per-catalog overrides can be added here\n\n[handlers.SensorManagementSystemHandler]\n[[handlers.SensorManagementSystemHandler.backends]]\nid_prefix = \"gfzsms\"\nbase_url = \"https://sensors.gfz-potsdam.de/backend/api/v1\"\n[[handlers.SensorManagementSystemHandler.backends]]\nid_prefix = \"kitsms\"\nbase_url = \"https://sms.atmohub.kit.edu/backend/api/v1\"\n[[handlers.SensorManagementSystemHandler.backends]]\nid_prefix = \"ufzsms\"\nbase_url = \"https://web.app.ufz.de/sms/backend/api/v1\"\n[handlers.SensorManagementSystemHandler.defaults]\nauto_complete_field_uri = \"http://rdmo-dev.local/terms/domain/sensor/awi/search\"\n[handlers.SensorManagementSystemHandler.defaults.attribute_mapping]\n\"data.attributes.long_name\" = \"http://rdmo-dev.local/terms/domain/sensor/awi/type-name\"\n\"data.attributes.short_name\" = \"http://rdmo-dev.local/terms/domain/sensor/awi/name\"\n\"data.attributes.serial_number\" = \"http://rdmo-dev.local/terms/domain/sensor/awi/serial\"\n\n[[handlers.SensorManagementSystemHandler.catalogs]]\ncatalog_uri = \"http://rdmo-dev.local/terms/questions/sensor-awi-test\"\n\n[handlers.GeophysicalInstrumentPoolPotsdamHandler]\n[handlers.GeophysicalInstrumentPoolPotsdamHandler.defaults]\nauto_complete_field_uri = \"http://rdmo-dev.local/terms/domain/sensor/awi/search\"\n[handlers.GeophysicalInstrumentPoolPotsdamHandler.defaults.attribute_mapping]\n\"Instrument.code\" = \"http://rdmo-dev.local/terms/domain/sensor/awi/type-name\"\n\"Instrumentcategory.name\" = \"http://rdmo-dev.local/terms/domain/sensor/awi/name\"\n\"Instrument.serialNo\" = \"http://rdmo-dev.local/terms/domain/sensor/awi/serial\"\n\n[[handlers.GeophysicalInstrumentPoolPotsdamHandler.catalogs]]\ncatalog_uri = \"http://rdmo-dev.local/terms/questions/sensor-awi-test\"\n```\n\nA `backends` configuration must be defined in the case of\n`SensorManagementSystemHandler` or if more than one instance of one provider is\nused. Here the `id_prefix` and the `base_url` is critical and must be the same\nas in the `providers` configuration, so that additional requests can be made\nto the correct endpoint.\n\nThe `catalogs` configuration is used to identify the catalog(s) where the\nattribute mapping should be used to map values from the API response to\nattributes of the catalog. It is possible to configure more than one catalog.\n- `catalog_uri` is the uri of the catalog where the handler should map values\n  to attributes\n- `auto_complete_field_uri` is the uri of the question with the option set\n  provider used in the catalog\n- `reset_attribute_uris` can be used to clear additional attributes when the\n  selection changes or the search field is erased. This is useful for\n  sensor-related fields which are not filled by every backend but must still\n  be reset when replacing a sensor.\n- `sync_device_detail_blocks = true` marks an item/sensor handler as eligible\n  for configuration or mission based detail-block synchronization.\n- `supports_mount_action_period_lookup = true` enables the SMS-specific\n  fallback that resolves instrument start/end from device mount actions.\n\nThe new `defaults` table is merged into every `catalogs` entry for the same\nhandler. If `defaults` define `auto_complete_field_uri`, they also act as a\nwildcard handler configuration for any catalog using that field, even when no\nexplicit `[[handlers.\u003cHandler\u003e.catalogs]]` entry exists. Explicit catalog\nentries take precedence over the wildcard defaults.\n\nWith `catalogs.attribute_mapping` the mapping from the APIs JSON response is\nmapped to attributes of the specified catalog. On the left a\n[JMESPath](https://jmespath.org/) for the value from the API and on the right\nthe uri to the attribute in the catalog.\n\n# Acknowledgements\n\nAs of 2026, this plugin has been further developed and maintained through the [DMP4NFDI](https://dmp.services.base4nfdi.de/) project, as an Incubator for the NFDI4Earth consortium.\n\nDMP4NFDI is a Basic Service of Base4NFDI, funded by the German Research Foundation (DFG) under project [521453681](https://gepris.dfg.de/gepris/projekt/521453681). NFDI4Earth is funded by the DFG under project [460036893](https://gepris.dfg.de/gepris/projekt/460036893). Both projects are part of the German National Research Data Infrastructure (NFDI).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdmorganiser%2Frdmo-plugins-sensorsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frdmorganiser%2Frdmo-plugins-sensorsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdmorganiser%2Frdmo-plugins-sensorsearch/lists"}