Package: iotedgehubdev
Azure IoT EdgeHub Dev ToolAnnouncementThe Azure IoT EdgeHub Dev Tool is in a maintenance mode. Please seethis announcementfor more details. We recommend using VM, Physical devices orEFLOW.IntroductionThe Azure IoT EdgeHub Dev Tool provides a local development experience with a simulator for creating, developing, testing, running, and debugging Azure IoT Edge modules and solutions.The simulator allows you to run, test and debug your own custom IoT Edge modules locally, without the IoT Edge Runtime, and with the following benefits:Your custom Edge module code is thesamewhether running on the simulator or the full IoT Edge Runtime.Your Edge solution can be run locallywithout the needto push new images or create IoT Edge deployment manifests.The only credential required to run your Edge solution on the simulator is theIoT Edge Device Connection String. The IoT Hub Connection String is not needed.It helps you debug your custom Edge modules on the host and not just in the container.The following table compares the requirements to run your solution on the IoT Edge Runtime and iotedgehubdev tool:IoT Edge RuntimeiotedgehubdevDevice Credential NeededYESYESIoT Hub Credential NeededYESNOBuild ImageYESYESPush ImageYESNOCreate DeploymentYESNOSupport native debug scenarioNOYESInstallingInstallDocker CE (18.02.0+)onWindows,macOSorLinuxInstallDocker Compose (1.20.0+)(Linux only.Compose has already been included in Windows/macOS Docker CE installation)InstallPython (3.5/3.6/3.7/3.8/3.9) and PipInstalliotedgehubdevby running the following command in your terminal:pip install --upgrade iotedgehubdevEnsure the user is a member ofdockeruser group (Linux / MacOS only):sudo usermod -aG docker $USERPlease make sure there is no Azure IoT Edge runtime running on the same machine as iotedgehubdev since they require the same ports.Quickstart1. Setupiotedgehubdev setup -c "<edge-device-connection-string>"2. Start/Stop an IoT Edge solution in simulatoriotedgehubdev start -d <path/to/deployment-manifest>
iotedgehubdev stop3. Start and debug a single module nativelyStart the module with specific input(s) and/or environment variable(s)iotedgehubdev start -i "<module-inputs>"

// OR

iotedgehubdev start -i "<module-inputs>" -e "<environment-variable>"For example:iotedgehubdev start -i "input1,input2" -e "TestEnv1=Value1" -e "TestEnv2=Value2"Output the module credential environment variablesiotedgehubdev modulecredStart your module natively with the environment variables from the previous stepSend a message to your module through the RESTful APIFor example:curl --header "Content-Type: application/json" --request POST --data '{"inputName": "input1","data": "hello world"}' http://localhost:53000/api/v1/messagesStop the simulatoriotedgehubdev stopOther resourcesAzure IoT Edge for Visual Studio CodeAzure IoT Edge Dev CLI ToolData/TelemetryThis project collects usage data and sends it to Microsoft to help improve our products and services. Read ourprivacy statementto learn more.
If you don’t wish to send usage data to Microsoft, you can change your telemetry settings by updatingcollect_telemetrytonoin the ini file.ContributingThis project welcomes contributions and suggestions. Most contributions require you to
agree to a Contributor License Agreement (CLA) declaring that you have the right to,
and actually do, grant us the rights to use your contribution. For details, visithttps://cla.microsoft.com.When you submit a pull request, a CLA-bot will automatically determine whether you need
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the
instructions provided by the bot. You will only need to do this once across all repositories using our CLA.This project has adopted theMicrosoft Open Source Code of Conduct.
For more information see theCode of Conduct FAQor contactopencode@microsoft.comwith any additional questions or comments.