зеркало из https://github.com/Azure/iotc-migrator.git
538f4a1003
Bumps [xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) and [@azure/storage-blob](https://github.com/Azure/azure-sdk-for-js). These dependencies needed to be updated together. Updates `xml2js` from 0.4.23 to 0.5.0 - [Release notes](https://github.com/Leonidas-from-XIV/node-xml2js/releases) - [Commits](https://github.com/Leonidas-from-XIV/node-xml2js/commits/0.5.0) Updates `@azure/storage-blob` from 12.12.0 to 12.13.0 - [Release notes](https://github.com/Azure/azure-sdk-for-js/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/Changelog-for-next-generation.md) - [Commits](https://github.com/Azure/azure-sdk-for-js/compare/@azure/storage-blob_12.12.0...@azure/storage-blob_12.13.0) --- updated-dependencies: - dependency-name: xml2js dependency-type: indirect - dependency-name: "@azure/storage-blob" dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> |
||
---|---|---|
.. | ||
dotnet | ||
nodejs | ||
python | ||
.gitignore | ||
README.md |
README.md
Device Migration samples
This folder contains few code samples for devices receiving a new IdScope through the direct method configured in the Migration DTDL component. Each sample has the same functionalities (sends a simple telemetry in a loop and responds to the "DeviceMove" method) coded with a different language.
Run
- Create a ".env" file in this folder (it must be at the root of samples) with the following content:
DPS_ID_SCOPE=<ID_SCOPE>
DPS_DEVICE_ID=<DEVICE_ID>
DPS_DEVICE_KEY=<DEVICE_KEY>
- Run the required sample based on the language:
- NodeJS
Javascript
cd nodejs
npm install
node javascript/device.js
Typescript
cd nodejs
npm install
npm run build
node dist/device.js
- Python
cd python
pip install -r requirements.txt
python device.py
- Dotnet
cd dotnet
dotnet restore
dotnet build
dotnet run