{"id":21196709,"url":"https://github.com/sandervandevelde/iotedgeenvtestsolution","last_synced_at":"2026-05-05T17:31:57.925Z","repository":{"id":141870983,"uuid":"513849890","full_name":"sandervandevelde/IoTEdgeEnvTestSolution","owner":"sandervandevelde","description":"Demonstration of reading custom environment variables by an Azure ioT Edge module.","archived":false,"fork":false,"pushed_at":"2022-07-14T11:08:13.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-29T18:35:46.390Z","etag":null,"topics":["azure","container-create-options","custom-module","docker","environment-variables","iot","iot-edge"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sandervandevelde.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-07-14T10:05:31.000Z","updated_at":"2022-07-14T11:01:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"2ba2180f-6537-43ec-93ea-6a0755abd9f0","html_url":"https://github.com/sandervandevelde/IoTEdgeEnvTestSolution","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sandervandevelde/IoTEdgeEnvTestSolution","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandervandevelde%2FIoTEdgeEnvTestSolution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandervandevelde%2FIoTEdgeEnvTestSolution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandervandevelde%2FIoTEdgeEnvTestSolution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandervandevelde%2FIoTEdgeEnvTestSolution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandervandevelde","download_url":"https://codeload.github.com/sandervandevelde/IoTEdgeEnvTestSolution/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandervandevelde%2FIoTEdgeEnvTestSolution/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32660207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["azure","container-create-options","custom-module","docker","environment-variables","iot","iot-edge"],"created_at":"2024-11-20T19:41:04.329Z","updated_at":"2026-05-05T17:31:57.910Z","avatar_url":"https://github.com/sandervandevelde.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IoTEdgeEnvTestSolution\n\nDemonstration of reading custom environment variables by an Azure ioT Edge module. \n\nWhen the module starts, a number of environment variables are read.\n\n_Note_: This includes the already used Azure IoT Edge module specific variables. Check the example below. \n\n## Docker container\n\nThe current docker container is available at 'svelde/envtestmodule:0.0.1-amd64' (Please check Docker Hub for more recent versions).\n\n## Envrionment variables\n\nThe current implementation looks for these variables:\n\n- variableString\n- variableJSON\n\nif one of these is not available, it will be marked are missing.\n\n### variableString\n\nJust past any string.\n\n### variableJSON\n\nPass a JSON formatted text with these two variables:\n\n```\n{\n    \"someInteger\" : 42,\n    \"someString\" : \"Hello module\"\n}\n```\n\n## Example output\n\nThis is tested with these environment variables:\n\n![image](https://user-images.githubusercontent.com/694737/178969171-a0d46580-9690-4ddd-9c7a-ebff47f01977.png)\n\n\nThe following output is to be expected:\n\n```\nIoT Hub module client initialized.\nStart reading environment variables:\nGetEnvironmentVariables: \n  IOTEDGE_GATEWAYHOSTNAME = edge-device-test-weu-vm\n  IOTEDGE_DEVICEID = MessageTest1-1\n  IOTEDGE_WORKLOADURI = unix:///var/run/iotedge/workload.sock\n  DOTNET_RUNNING_IN_CONTAINER = true\n  IOTEDGE_MODULEGENERATIONID = 637933928617587066\n  IOTEDGE_AUTHSCHEME = sasToken\n  ASPNETCORE_URLS = http://+:80\n  HOME = /home/moduleuser\n  PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n  variableString = HelloVariable\n  IOTEDGE_IOTHUBHOSTNAME = xyz.azure-devices.net\n  variableJSON = { \"someInteger\" : 42, \"someString\" : \"Hello module\" }\n  HOSTNAME = ef033\n  IOTEDGE_MODULEID = envtest\n  IOTEDGE_APIVERSION = 2019-01-30\n  RuntimeLogLevel = Information\n\nFound 'HelloVariable'\nFound '{ \"someInteger\" : 42, \"someString\" : \"Hello module\" }', containing '42' and 'Hello module'\nEnd reading environment variables.\n```\n\nAs you can see, both the Azure IoT Edge module specific variables and our custom environment variables are shown.\n\n## Usage\n\nThis is an alternative to sending Desired properties allthough the impact is there.\n\nThe environment variable can only be updated using the Deployment manifest. Each time a deployment manifest is sent, all (other) modules will reload their desired properties. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandervandevelde%2Fiotedgeenvtestsolution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandervandevelde%2Fiotedgeenvtestsolution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandervandevelde%2Fiotedgeenvtestsolution/lists"}