Register a device

Completed

Exercise 1: Configure the simulator

In this exercise, you will be configuring the simulator to work with your Field Service Application.

Each exercise consists of a scenario and learning objectives, the scenario describes the purpose of the exercises, while the objectives are listed and have bullet points.

  1. Go to your Azure portal, select Resource Groups, and open the resource group you created when you deployed the Connected Field Service.

    Screenshot of Resource groups and name of resource group created.

  2. Locate and click on the SimulatorFieldServiceIoTXXXX of resource type App Service.

    Screenshot of SimulatorFieldServiceIoTXXXX App service.

  3. Click on the URL.

    Screenshot of the U R L to select from the Overview screen.

  4. Select Connection.

    Screenshot of the Connection menu to select.

  5. Go back to Azure portal, select the Resource Group you created and click on the IoT Hub resource type.

    Screenshot of the IoT hub resource type to select.

  6. Copy the Hostname.

    Screenshot of the Hostame to copy to clipboard.

  7. Go back to the simulator and paste the Hostname into the Host field.

    Screenshot of the Host field to paste the Hostname.

  8. Go back to Azure portal and make sure you still have the IoT Hub selected.

  9. Select Shared Access Policies.

    Screenshot of Shared Access Policies under Settings.

  10. Click on the IoT Hub Owner.

  11. Copy the Primary Key.

    Screenshot of the Primary Key to copy to clipboard.

  12. Go back to the simulator, paste the Primary Key in the Key field, and click Connect.

  13. Click on the Device ID dropdown. You will notice that no device is registered currently, you will register a device in the next exercise. Do not close this browser window.

Exercise 2: Register a device

In this exercise, you will be creating a customer asset, and then you will be registering a device with Azure IoT Hub. You will then manipulate the device to cause the creation of an IoT Alert into Dynamics 365. By completing this, you will verify that your deployment of Connected Field Service is working.

Each exercise consists of a scenario and learning objectives, the scenario describes the purpose of the exercises, while the objectives are listed and have bullet points.

  1. Go to Power Apps and make sure you are in the correct environment.

  2. Select Apps and click to open the Connected Field Service application.

  3. Select Customer Assets and click New.

  4. Enter My Thermostat Simulator for Name, select A. Datum for Account, and click Save.

    Screenshot of My Thermostat Simulator for Name and A. Datum set for Account.

  5. After you saved the record, you should be able to see more sections of the form. Scroll down to the Connected Device Attributes section.

  6. Enter MyThermSim1 for Device ID and click Save. It is okay if the Device ID disappears after saving the data. You will be able to see the expected results after you register the device.

  7. Click Register Devices.

  8. Click OK.

  9. In the Connected Devices section and click Refresh.

  10. You should see the device registration progress. Initially, the Registration Status comes as "In Progress".

  11. Refresh until the device is registered.

  12. Go back to the simulator and click Refresh. You should now be able to see a Device in the dropdown Menu.

    Screenshot of the Refresh button to select.

  13. Click on the dropdown and select the device you registered.

    Screenshot of the dropdown menu for the Device ID.

  14. Change the temperature to 86.

  15. The Message Sent will contain the temperature and humidity.

  16. Go back to your Connected Field Service application and open the customer asset you created.

  17. Click Related and select IoT Alerts.

  18. You should see an alert generated by the simulator regarding exceeded Temperature Threshold.

    Screenshot of Alert for temperature generated by the simulator.