You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/digital-twins/tutorial-facilities-analyze.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ You can use the [Event Hubs](../event-hubs/event-hubs-about.md) service to creat
56
56
57
57
1. Enter a **Name** for your event hub, and select **Create**.
58
58
59
-
After the event hub is deployed, it will appear in the **Event Hubs** pane of the Event Hubs namespace with an **Active** status. Select this event hub to open its **Overview** pane.
59
+
After the event hub is deployed, it appears in the **Event Hubs** pane of the Event Hubs namespace with an **Active** status. Select this event hub to open its **Overview** pane.
60
60
61
61
1. Select the **Consumer group** button at the top, and enter a name such as **tsievents** for the consumer group. Select **Create**.
Copy file name to clipboardExpand all lines: articles/digital-twins/tutorial-facilities-events.md
+14-12Lines changed: 14 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,9 @@ ms.author: dkshir
14
14
15
15
After you deploy your Azure Digital Twins instance, provision your spaces, and implement custom functions to monitor specific conditions, you can notify your office admin via email when the monitored conditions occur.
16
16
17
-
In [the first tutorial](tutorial-facilities-setup.md), you configured the spatial graph of an imaginary building. A room in the building contains sensors for motion, carbon dioxide, and temperature. In [the second tutorial](tutorial-facilities-udf.md), you provisioned your graph and a user-defined function to monitor these sensor values and trigger notifications when the room is empty, and the temperature and carbon dioxide are in a comfortable range. This tutorial shows how you can integrate these notifications with Azure Logic Apps to send emails when such a room is available. An office administrator can use this information to help the employees book the most productive meeting room.
17
+
In [the first tutorial](tutorial-facilities-setup.md), you configured the spatial graph of an imaginary building. A room in the building contains sensors for motion, carbon dioxide, and temperature. In [the second tutorial](tutorial-facilities-udf.md), you provisioned your graph and a user-defined function to monitor these sensor values and trigger notifications when the room is empty, and the temperature and carbon dioxide are in a comfortable range.
18
+
19
+
This tutorial shows how you can integrate these notifications with Azure Logic Apps to send emails when such a room is available. An office administrator can use this information to help the employees book the most productive meeting room.
18
20
19
21
In this tutorial, you learn how to:
20
22
@@ -32,10 +34,10 @@ This tutorial assumes that you have [configured](tutorial-facilities-setup.md) a
32
34
- An Office 365 account to send notification e-mails.
33
35
34
36
## Integrate events with Event Grid
35
-
In this section, you set up [Event Grid](../event-grid/overview.md) to collect events from your Digital Twins instance, and redirect them to an [event handler](../event-grid/event-handlers.md) such as Logic Apps.
37
+
In this section, you set up [Event Grid](../event-grid/overview.md) to collect events from your Azure Digital Twins instance, and redirect them to an [event handler](../event-grid/event-handlers.md) such as Logic Apps.
36
38
37
-
### Create an Event Grid topic
38
-
An [Event Grid topic](../event-grid/concepts.md#topics) provides an interface to route the events generated by the user-defined function.
39
+
### Create an event grid topic
40
+
An [event grid topic](../event-grid/concepts.md#topics) provides an interface to route the events generated by the user-defined function.
39
41
40
42
1. Sign in to the [Azure portal](https://portal.azure.com).
41
43
@@ -45,15 +47,15 @@ An [Event Grid topic](../event-grid/concepts.md#topics) provides an interface to
45
47
46
48
1. Enter a **Name** for your event grid topic, and choose the **Subscription**. Select the **Resource group** that you used or created for your Digital Twins instance, and the **Location**. Select **Create**.
47
49
48
-

50
+

49
51
50
-
1. Browse to the Event Grid topic from your resource group, select **Overview**, and copy the value for **Topic Endpoint** to a temporary file. You'll need this URL in the next section.
52
+
1. Browse to the event grid topic from your resource group, select **Overview**, and copy the value for **Topic Endpoint** to a temporary file. You'll need this URL in the next section.
51
53
52
54
1. Select **Access keys**, and copy **Key 1** and **Key 2** to a temporary file. You'll need these values to create the endpoint in the next section.
1. In the command window, make sure you're in the **occupancy-quickstart\src** folder of the Digital Twins sample.
59
61
@@ -75,7 +77,7 @@ An [Event Grid topic](../event-grid/concepts.md#topics) provides an interface to
75
77
76
78
1. Replace the placeholder `Secondary_connection_string_for_your_Event_Grid` with the value of **Key2**.
77
79
78
-
1. Replace the placeholder `Event_Grid_Topic_Path` with the path of the Event Grid topic. Get this path by removing **https://** and the trailing resource paths from the **Topic Endpoint** URL. It should look similar to this format: *yourEventGridName.yourLocation.eventgrid.azure.net*.
80
+
1. Replace the placeholder `Event_Grid_Topic_Path` with the path of the event grid topic. Get this path by removing **https://** and the trailing resource paths from the **Topic Endpoint** URL. It should look similar to this format: *yourEventGridName.yourLocation.eventgrid.azure.net*.
79
81
80
82
> [!IMPORTANT]
81
83
> Enter all values without any quotes. Make sure there's at least one space character after the colons in the YAML file. You can also validate your YAML file contents by using any online YAML validator such as [this tool](https://onlineyamltools.com/validate-yaml).
@@ -92,7 +94,7 @@ An [Event Grid topic](../event-grid/concepts.md#topics) provides an interface to
92
94
93
95
94
96
## Notify events with Logic Apps
95
-
You can use the [Azure Logic Apps](../logic-apps/logic-apps-overview.md) service to create automated tasks for events received from other services. In this section, you set up Logic Apps to create email notifications for events routed from your spatial sensors, with the help of an [Event Grid topic](../event-grid/overview.md).
97
+
You can use the [Azure Logic Apps](../logic-apps/logic-apps-overview.md) service to create automated tasks for events received from other services. In this section, you set up Logic Apps to create email notifications for events routed from your spatial sensors, with the help of an [event grid topic](../event-grid/overview.md).
96
98
97
99
1. In the left pane of the [Azure portal](https://portal.azure.com), select **Create a resource**.
98
100
@@ -104,11 +106,11 @@ You can use the [Azure Logic Apps](../logic-apps/logic-apps-overview.md) service
104
106
105
107
1. Open your Logic Apps resource when it's deployed, and then open the **Logic App Designer** pane.
106
108
107
-
1. Select the **When an Event Grid event occurs** trigger. Sign in to your tenant with your Azure account when prompted. Select **Allow access** to your Event Grid when prompted. Select **Continue**.
109
+
1. Select the **When an Event Grid event occurs** trigger. Sign in to your tenant with your Azure account when prompted. Select **Allow access** for your Event Grid resource when prompted. Select **Continue**.
108
110
109
111
1. In the **When a resource event occurs (Preview)** window:
110
112
111
-
a. Select the **Subscription** that you used to create the Event Grid topic.
113
+
a. Select the **Subscription** that you used to create the event grid topic.
112
114
113
115
b. Select **Microsoft.EventGrid.Topics** for **Resource Type**.
114
116
@@ -193,7 +195,7 @@ If you want to stop exploring Azure Digital Twins at this point, feel free to de
193
195
194
196
## Next steps
195
197
196
-
To learn how to visualize your sensor data, analyze trends, and spot anomalies, proceed to the next tutorial:
198
+
To learn how to visualize your sensor data, analyze trends, and spot anomalies, go to the next tutorial:
197
199
> [!div class="nextstepaction"]
198
200
> [Tutorial: Visualize and analyze events from your Azure Digital Twins spaces using Time Series Insights](tutorial-facilities-analyze.md)
Copy file name to clipboardExpand all lines: articles/digital-twins/tutorial-facilities-setup.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ These tutorials will walk you through a .NET console application to build a scen
19
19
20
20
You'll learn how to replicate the physical areas and entities in the building as digital objects by using the Azure Digital Twins service. You'll simulate device events by using another console application. Then, you'll learn how to monitor the events that come from these physical areas and entities in near real time.
21
21
22
-
An office administrator can use this information to help an employee working in this building to book meeting rooms with optimal conditions. An office facilities manager can use your setup to find out usage trends of the rooms, as well as monitor working conditions for maintenance purposes.
22
+
An office administrator can use this information to help an employee working in this building to book meeting rooms with optimal conditions. An office facilities manager can use your setup to get usage trends of the rooms, and to monitor working conditions for maintenance purposes.
23
23
24
24
In the first tutorial of this series, you learn how to:
25
25
@@ -37,7 +37,7 @@ These tutorials use and modify the same samples that the [quickstart to find ava
37
37
38
38
- An Azure subscription. If you don’t have an Azure account, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
39
39
40
-
- The right SDK. The Azure Digital Twins samples used in these tutorials are written in C#. Make sure to install [.NET Core SDK version 2.1.403 or later](https://www.microsoft.com/net/download) on your development machine to build and run the sample. Check if the right version is installed on your machine by running `dotnet --version` in a command window.
40
+
- The right SDK. The Azure Digital Twins samples used in these tutorials are written in C#. Make sure to install [.NET Core SDK version 2.1.403 or later](https://www.microsoft.com/net/download) on your development machine to build and run the sample. Check that the right version is installed on your machine by running `dotnet --version` in a command window.
41
41
42
42
-[Visual Studio Code](https://code.visualstudio.com/) to explore the sample code.
43
43
@@ -76,13 +76,13 @@ In the extracted sample folder, open the file **digital-twins-samples-csharp\dig
76
76
77
77
* You can use the provisioning sample **occupancy-quickstart** to configure and provision a [spatial intelligence graph](concepts-objectmodel-spatialgraph.md#graph). This graph is the digitized image of your physical spaces and the resources in them. It uses an [object model](concepts-objectmodel-spatialgraph.md#model), which defines objects for a smart building. For a complete list of Digital Twins objects and REST APIs, visit [this REST API documentation](https://docs.westcentralus.azuresmartspaces.net/management/swagger) or the Management API URL that was created for [your instance](#deploy).
78
78
79
-
To explore the sample to see how it communicates with your Digital Twins instance, you can start with the **src\actions** folder. The files in this folder implement the commands that you will use in these tutorials:
79
+
To explore the sample to see how it communicates with your Digital Twins instance, you can start with the **src\actions** folder. The files in this folder implement the commands that you'll use in these tutorials:
80
80
- The **provisionSample.cs** file shows how to provision your spatial graph.
81
81
- The **getSpaces.cs** file gets information about the provisioned spaces.
82
82
- The **getAvailableAndFreshSpaces.cs** file gets the results of a custom function called a user-defined function.
83
83
- The **createEndpoints.cs** file creates endpoints to interact with other services.
84
84
85
-
* The simulation sample **device-connectivity** simulates sensor data and sends it to the IoT hub that's provisioned for your Digital Twins instance. You'll use this sample in [the next tutorial after you have provisioned your spatial graph](tutorial-facilities-udf.md#simulate). The sensor and device identifiers that you use to configure this sample should be the same as what you'll use to provision your graph.
85
+
* The simulation sample **device-connectivity** simulates sensor data and sends it to the IoT hub that's provisioned for your Digital Twins instance. You'll use this sample in [the next tutorial after you provision your spatial graph](tutorial-facilities-udf.md#simulate). The sensor and device identifiers that you use to configure this sample should be the same as what you'll use to provision your graph.
86
86
87
87
### Configure the provisioning sample
88
88
1. Open a command window and go to the downloaded sample. Run the following command:
@@ -100,7 +100,7 @@ In the extracted sample folder, open the file **digital-twins-samples-csharp\dig
100
100
1. In Visual Studio Code, open the **appSettings.json** file in the **occupancy-quickstart** project. Update the following values:
101
101
* **ClientId**: Enter the application ID of your Azure AD app registration. You noted this ID in the section where you [set app permissions](#permissions).
102
102
* **Tenant**: Enter the directory ID of your [Azure AD tenant](https://docs.microsoft.com/azure/active-directory/develop/quickstart-create-new-tenant). You also noted this ID in the section where you [set app permissions](#permissions).
103
-
* **BaseUrl**: Enter the URL of your Digital Twins instance. To get this URL, replace the placeholders in this URL with values for your instance: **_https://yourDigitalTwinsName.yourLocation.azuresmartspaces.net/management/api/v1.0/_**. You can also get this URL by modifying the Management API URL from [the deployment section](#deploy). Replace **swagger/** with **api/v1.0/**.
103
+
* **BaseUrl**: Enter the URL of your Digital Twins instance. To get this URL, replace the placeholders in this URL with values for your instance: _https://yourDigitalTwinsName.yourLocation.azuresmartspaces.net/management/api/v1.0/_. You can also get this URL by modifying the Management API URL from [the deployment section](#deploy). Replace **swagger/** with **api/v1.0/**.
104
104
105
105
1. See a list of Digital Twins features that you can explore by using the sample. Run the following command:
106
106
@@ -150,14 +150,14 @@ The **provisionSample.yaml** file contains the following nodes:
150
150
151
151
-**devices**: Spaces can contain `devices`, which are physical or virtual entities that manage a number of sensors. For example, a device might be a user’s phone, a Raspberry Pi sensor pod, or a gateway. In the imaginary building in your sample, note how the room named **Focus Room** contains a **Raspberry Pi 3 A1** device. Each device node is identified by a unique `hardwareId`, which is hardcoded in the sample. To configure this sample for an actual production, replace these with values from your setup.
152
152
153
-
-**sensors**: A device can contain multiple `sensors`. They can detect and record physical changes like temperature, motion, and battery level. Each sensor node is uniquely identified by a `hardwareId`, hardcoded here. For an actual application, replace these by using the unique identifiers of the sensors in your setup. The provisionSample.yaml file has two sensors to record *Motion* and *CarbonDioxide*. Add another sensor to record *Temperature*, by adding the following lines, below the lines for the CarbonDioxide sensor. Note that these are provided in provisionSample.yaml as commented-out lines. You can simply uncomment them by removing the `#` character in the front of each line.
153
+
-**sensors**: A device can contain multiple `sensors`. They can detect and record physical changes like temperature, motion, and battery level. Each sensor node is uniquely identified by a `hardwareId`, hardcoded here. For an actual application, replace these by using the unique identifiers of the sensors in your setup. The provisionSample.yaml file has two sensors to record *Motion* and *CarbonDioxide*. Add another sensor to record *Temperature*, by adding the following lines, below the lines for the CarbonDioxide sensor. Note that these are provided in provisionSample.yaml as commented-out lines. You can uncomment them by removing the `#` character in the front of each line.
154
154
155
155
```yaml
156
156
- dataType: Temperature
157
157
hardwareId: SAMPLE_SENSOR_TEMPERATURE
158
158
```
159
159
> [!NOTE]
160
-
> Make sure the alignment of the `dataType` and `hardwareId` keys align with the statements above this snippet. Also make sure that your editor does not replace spaces with tabs.
160
+
> Make sure the `dataType` and `hardwareId` keys align with the statements above this snippet. Also make sure that your editor does not replace spaces with tabs.
161
161
162
162
Save and close the provisionSample.yaml file. In the next tutorial, you'll add more information to this file, and then provision your Azure Digital Twins sample building.
163
163
@@ -172,7 +172,7 @@ If you want to stop exploring Azure Digital Twins at this point, feel free to de
172
172
173
173
## Next steps
174
174
175
-
To learn how to implement a custom logic to monitor conditions in your sample building, proceed to the next tutorial in the series:
175
+
To learn how to implement a custom logic to monitor conditions in your sample building, go to the next tutorial in the series:
176
176
> [!div class="nextstepaction"]
177
177
> [Tutorial: Provision your building and monitor working conditions](tutorial-facilities-udf.md)
0 commit comments