Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Teodelas authored Sep 5, 2020
1 parent ff26672 commit 15285b4
Showing 1 changed file with 33 additions and 17 deletions.
50 changes: 33 additions & 17 deletions WorkplaceHealthAndSafetyDemo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,33 @@ Follow the steps to deploy the required Azure resources:<br>

Some resources require some extra configuration.

#### IoT Hub

Here we will create cosumer groups for Time Series Insights (TSI) and Azure Stream Analytics (ASA)
1. In the [Azure portal](https://portal.azure.com/) select the `Resource Group` you created earlier.
1. Select the `IoT Hub` resource.
1. Click on `Built-in endpoints` in the left menu
1. In the blade that opens, find the `Consumer Groups' section
1. Create new consumer group for TSI
1. Create a new consumer group for ASA
1. Press `Tab` to navigate off the consumer group (this saves the configuration)


Here we will setup the event for the IoT Hub that will send the data to the Logic App to handle the alerts.

1. In the [Azure portal](https://portal.azure.com/) select the `Resource Group` you created earlier.
1. Select the `IoT Hub` resource.
1. Click the `Events` option in the left menu.
1. Click the `+ Event subscription` button in the top of the panel.
1. Enter the name `iothubalerts` to the `Name` input field.
1. Leave `Event Schema` as `Event Grid Schema`
1. Ensure ONLY `Device Telemetry` is selected from the `Filter to Event Types` dropdown.
1. For the `Endpoint Type` select the `Web Hook` option.
1. Click the `Select an endpoint` link.
1. In the new panel update the `Subscriber Endpoint` field with the value from the deploy output `device Alerts Logic App Endpoint`.
1. Click the `Confirm Selection` button.
1. Click the `Create` button.

#### SQL Database schema

Here we will run the script for the creation of the tables required by the solution.
Expand Down Expand Up @@ -134,6 +161,11 @@ Follow the next steps to setup the metrics stream job.

1. In the [Azure portal](https://portal.azure.com/) select the `Resource Group` you created earlier.
1. Select the `Stream Analytics job` resource with the name ending with `metricscloud`.
1. Click on `Inputs` option in the left menu.
1. Click on `edgemetricsimput` in the blade that opens
1. Change the options at the top to `Select IoT Hub from your subscriptions`
1. Accept the defaults and under `Consumer group` choose: ASA
1. Click `Save` at the bottom
1. Click the `Overview` option in the left menu.
1. Click the `Start` button to start the job.
1. Click the `Start` button in the right panel and wait for the job to start.
Expand Down Expand Up @@ -173,23 +205,6 @@ Here we will setup an event subscription for the Azure Maps account in order to
1. Click the `Confirm Selection` button.
1. Click the `Create` button.

#### IoT Hub

Here we will setup the event for the IoT Hub that will send the data to the Logic App to handle the alerts.

1. In the [Azure portal](https://portal.azure.com/) select the `Resource Group` you created earlier.
1. Select the `IoT Hub` resource.
1. Click the `Events` option in the left menu.
1. Click the `+ Event subscription` button in the top of the panel.
1. Enter the name `iothubalerts` to the `Name` input field.
1. Leave `Event Schema` as `Event Grid Schema`
1. Ensure ONLY `Device Telemetry` is selected from the `Filter to Event Types` dropdown.
1. For the `Endpoint Type` select the `Web Hook` option.
1. Click the `Select an endpoint` link.
1. In the new panel update the `Subscriber Endpoint` field with the value from the deploy output `device Alerts Logic App Endpoint`.
1. Click the `Confirm Selection` button.
1. Click the `Create` button.

#### Time Series Insights event source

Follow the next steps to setup the event source for the Time Series Insights environment.
Expand All @@ -203,6 +218,7 @@ Follow the next steps to setup the event source for the Time Series Insights env
* Source: Select `IoT Hub`.
* IoT Hub name: `<name of your IoT Hub>`
* IoT Hub Policy name: `Take the default`
* IoT Hub consumer group: `TSI` (DO NOT use $Default)
* Timestamp property name: `timestamp`.
Note: If values dont appear, give it a minute for the system to populate.
1. Click the `Create` button.
Expand Down

0 comments on commit 15285b4

Please sign in to comment.