{"id":49687022,"url":"https://github.com/thin-edge/tedge-parameter-plugin","last_synced_at":"2026-05-07T10:41:04.687Z","repository":{"id":341917944,"uuid":"1104521820","full_name":"thin-edge/tedge-parameter-plugin","owner":"thin-edge","description":"WIP: thin-edge.io example of a custom operation handler for the upcoming Cumulocity Parameter Update operation","archived":false,"fork":false,"pushed_at":"2026-03-12T19:06:10.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-13T01:16:18.170Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","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/thin-edge.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":"2025-11-26T10:23:53.000Z","updated_at":"2026-03-12T19:04:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/thin-edge/tedge-parameter-plugin","commit_stats":null,"previous_names":["thin-edge/tedge-parameter-plugin"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/thin-edge/tedge-parameter-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thin-edge%2Ftedge-parameter-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thin-edge%2Ftedge-parameter-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thin-edge%2Ftedge-parameter-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thin-edge%2Ftedge-parameter-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thin-edge","download_url":"https://codeload.github.com/thin-edge/tedge-parameter-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thin-edge%2Ftedge-parameter-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32734383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-05-07T10:41:03.779Z","updated_at":"2026-05-07T10:41:04.680Z","avatar_url":"https://github.com/thin-edge.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tedge-parameter-plugin\n\n⚠️ This is a work-in-progress so expect things to break and the Cumulocity feature is still in development\n\nthin-edge.io plugin to add support for the Cumulocity `c8y_ParameterUpdate` operation.\n\n## Pre-requisites\n\nThe Cumulocity device parameter feature has a few dependencies which need to be enabled/configured before you can install this plugin.\n\n* Microservices\n  * dtm\n  * device-parameter\n\n* feature flags\n  * `dtm.asset-api`\n\n    ```sh\n    c8y features enable --key dtm.asset-api\n    ```\n\n    Note: It can take a few minutes before the DTM microservice registers the API.\n\n* User permissions\n  * ROLE_DIGITAL_TWIN_DEFINITIONS_CREATE\n  * ROLE_DIGITAL_TWIN_DEFINITIONS_ADMIN\n\n  You can assign these to one of the groups using the following commands:\n\n  ```sh\n  c8y userroles addRoleToGroup --role ROLE_DIGITAL_TWIN_DEFINITIONS_CREATE --group admins\n  c8y userroles addRoleToGroup --role ROLE_DIGITAL_TWIN_DEFINITIONS_ADMIN --group admins\n  ```\n\n\n## Plugin summary\n\n### What will be deployed to the device?\n\n* thin-edge.io workflow called `parameter_update`\n* Cumulocity command template for mapping the c8y_ParameterUpdate operation to the `parameter_update` thin-edge.io command\n* parameter_set.sh binary used to provide the parameter_update plugin system\n* An example [AutoUpdater](./src/plugins/AutoUpdater) parameter set script. This is only an example and can be used as a reference\n\n**Technical summary**\n\nThe following details the technical aspects of the plugin to get an idea what systems it supports.\n\n|||\n|--|--|\n|**Languages**|`shell` (posix compatible)|\n|**CPU Architectures**|`all/noarch`. Not CPU specific|\n|**Supported init systems**|`N/A`|\n|**Required Dependencies**|-|\n|**Optional Dependencies (feature specific)**|-|\n\n### How to do I get it?\n\nThe following linux package formats are provided on the releases page and also in the [tedge-community](https://cloudsmith.io/~thinedge/repos/community/packages/) repository:\n\n|Operating System|Repository link|\n|--|--|\n|Debian/Raspian (deb)|[![Latest version of 'tedge-parameter-plugin' @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/thinedge/community/deb/tedge-parameter-plugin/latest/a=all;d=any-distro%252Fany-version;t=binary/?render=true\u0026show_latest=true)](https://cloudsmith.io/~thinedge/repos/community/packages/detail/deb/tedge-parameter-plugin/latest/a=all;d=any-distro%252Fany-version;t=binary/)|\n|Alpine Linux (apk)|[![Latest version of 'tedge-parameter-plugin' @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/thinedge/community/alpine/tedge-parameter-plugin/latest/a=noarch;d=alpine%252Fany-version/?render=true\u0026show_latest=true)](https://cloudsmith.io/~thinedge/repos/community/packages/detail/alpine/tedge-parameter-plugin/latest/a=noarch;d=alpine%252Fany-version/)|\n|RHEL/CentOS/Fedora (rpm)|[![Latest version of 'tedge-parameter-plugin' @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/thinedge/community/rpm/tedge-parameter-plugin/latest/a=noarch;d=any-distro%252Fany-version;t=binary/?render=true\u0026show_latest=true)](https://cloudsmith.io/~thinedge/repos/community/packages/detail/rpm/tedge-parameter-plugin/latest/a=noarch;d=any-distro%252Fany-version;t=binary/)|\n\n## Adding your own plugin\n\nAn additional parameter set plugins should be added in the following script:\n\n1. Add your script to the following folder:\n\n    ```sh\n    /usr/share/tedge/parameter-plugins/\n    ```\n\n    For example, if you want a parameter set called \"foo\", then the script would be created at the following location:\n\n    ```sh\n    /usr/share/tedge/parameter-plugins/foo\n    ```\n\n    The script should also be executable, e.g.\n\n    ```sh\n    chmod +x /usr/share/tedge/parameter-plugins/foo\n    ```\n\n1. Set the initial state of the parameter set so that the UI will be able to display the current state\n\n    ```sh\n    tedge mqtt pub -r -q 1 te/device/main///twin/foo '{}'\n    ```\n\n## Advanced\n\n### Cumulocity Digital Twin Data Mapper API\n\n#### Create a property identifier\n\nCreate a new property identifier using the following command. This is required before the UI will be able to display the different parameter sets.\n\n```sh\nc8y api --raw POST /service/dtm/definitions/properties --template '{\n  \"identifier\": \"AutoUpdater\",\n  \"jsonSchema\": {\n    \"title\": \"Auto Updater\",\n    \"description\": \"Auto update configuration to keep your device up to date with the latest software\",\n    \"properties\": {\n      \"enabled\": {\n        \"type\": \"boolean\",\n        \"default\": null,\n        \"title\": \"enabled\",\n        \"order\": 1\n      },\n      \"interval\": {\n        \"type\": \"string\",\n        \"title\": \"interval\",\n        \"enum\": [\"hourly\", \"daily\", \"weekly\"],\n        \"order\": 2\n      }\n    },\n    \"type\": \"object\"\n  },\n  \"contexts\": [\n    \"asset\",\n    \"event\",\n    \"operation\"\n  ]\n}\n'\n```\n\n#### Delete a property identifier\n\nIf you need to delete an existing property identifier use the following command:\n\n```sh\nc8y api DELETE \"/service/dtm/definitions/properties/AutoUpdater?contexts=asset,event,operation\"\n```\n\n#### Update a property identifier\n\n**Note** The following command fails. Maybe not all fields can be updated.\n\n```sh\nc8y api --raw PUT \"/service/dtm/definitions/properties/AutoUpdater?contexts=event,asset,operation\" --template '{\n  \"identifier\": \"AutoUpdater\",\n  \"jsonSchema\": {\n    \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n    \"title\": \"Auto Updater\",\n    \"description\": \"Auto update configuration to keep your device up to date with the latest software\",\n    \"type\": \"object\",\n    \"properties\": {\n      \"enabled\": {\n        \"type\": \"boolean\",\n        \"default\": null,\n        \"title\": \"enabled\",\n        \"order\": 1\n      },\n      \"interval\": {\n        \"type\": \"string\",\n        \"title\": \"interval\",\n        \"enum\": [\"hourly\", \"daily\", \"weekly\"],\n        \"order\": 2\n      }\n    }\n  },\n  \"tags\": [\n    \"thin-edge.io\"\n  ],\n  \"contexts\": [\"event\", \"asset\", \"operation\"]\n}\n'\n```\n\n#### SmartREST 2.0 Templates\n\nThis feature relies on the following Cumulocity SmartREST templates:\n\n* https://cumulocity.com/docs/smartrest/mqtt-static-templates/#532\n* https://cumulocity.com/docs/smartrest/mqtt-static-templates/#408\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthin-edge%2Ftedge-parameter-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthin-edge%2Ftedge-parameter-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthin-edge%2Ftedge-parameter-plugin/lists"}