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: docs/tutorials/control/air-quality-fleet.md
+22-17Lines changed: 22 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ cost: 200
20
20
# 2. The reader can identify when to use fragments and evaluate when it is worth using fragments.
21
21
# The reader can create their own fragments for their projects and knows what to include and exclude from them.
22
22
# 3. The reader recognizes how permissions enable the management of data for a business across multiple customers while providing each customer access to their own data.
23
-
# 4. The reader can deploy custom frond ends that end users can use to operate their machines.
23
+
# 4. The reader can deploy custom front ends that end users can use to operate their machines.
24
24
---
25
25
26
26
In this tutorial you will learn how to set up a fleet of devices for yourself or third parties to collect air quality data.
@@ -34,7 +34,7 @@ By completing this project, you will learn to:
34
34
- Organize your fleet using {{< glossary_tooltip term_id="location" text="locations" >}}
35
35
- Collect and sync data from multiple machines
36
36
- Use the Viam TypeScript SDK to query sensor data
37
-
- Create a custom dashboard that you and third parties can use to view data for their respective machines.
37
+
- Create a custom dashboard that you and third parties can use to view data for their respective machines
38
38
39
39
{{< /alert >}}
40
40
@@ -45,7 +45,7 @@ By completing this project, you will learn to:
45
45
You can create one or more machines to measure air quality.
46
46
For each machine, you need the following hardware:
47
47
48
-
-one or more[SDS011 Nova PM sensors](https://www.amazon.com/SDS011-Quality-Detection-Conditioning-Monitor/dp/B07FSDMRR5)
48
+
-One[SDS011 Nova PM sensors](https://www.amazon.com/SDS011-Quality-Detection-Conditioning-Monitor/dp/B07FSDMRR5)
49
49
- If you choose to use a different air quality sensor, you may need to [create your own module](/operate/get-started/other-hardware/) implementing the [sensor API](/operate/reference/components/sensor/#api) for your specific hardware.
50
50
- A single-board computer (SBC) [capable of running `viam-server`](https://docs.viam.com/installation/)
51
51
- An appropriate power supply
@@ -197,7 +197,8 @@ You can check that your sensor data is being synced by clicking on the **...** m
197
197
{{% /tablestep %}}
198
198
{{< /table >}}
199
199
200
-
Congratulations, if you made it this far, you now have a functional air sensing machine.
200
+
Congratulations.
201
+
If you made it this far, you now have a functional air sensing machine.
201
202
Let's create a dashboard for its measurements next.
202
203
203
204
## Create a dashboard
@@ -280,7 +281,7 @@ npm install
280
281
Viam apps provide access to a machine by placing its API key in your local storage.
281
282
You can access the data from your browser's local storage with the following code.
282
283
283
-
Currently, Viam apps only provide access to single machines but in future you will be able to access entire locations or organization.
284
+
Currently, Viam apps only provide access to single machines but in future you will be able to access entire locations or organizations.
@@ -821,6 +822,8 @@ Your dashboard should now load your data.
821
822
822
823
## Organizing devices for third-party usage
823
824
825
+
The following example shows how you can use {{< glossary_tooltip term_id="organization" text="organizations" >}} and {{< glossary_tooltip term_id="location" text="locations" >}} to provide users access to the right groups of machines.
826
+
824
827
Imagine you create an air quality monitoring company called Pollution Monitoring Made Simple.
825
828
Anyone can sign up and order one of your sensing machines.
826
829
When a new customer signs up, you assemble a new machine with a sensor, SBC, and power supply.
@@ -879,16 +882,16 @@ Before an air sensing machine leaves your factory, you'd complete the following
879
882
Once a customer receives your machine, they will:
880
883
881
884
1. Plug it in and turn it on.
882
-
2.`viam-agent` will start a WiFi network
885
+
2.`viam-agent` will start a WiFi network.
883
886
3. The customer uses another device to connect to the machine's WiFi network and the user gives the machine the password for their WiFi network.
884
887
4. The machine can now connect to the internet and complete setup based on the fragment it knows about.
885
888
886
889
### Create the fragment for air sensing machines
887
890
888
-
In this section you will create the {{< glossary_tooltip term_id="fragment" text="fragment" >}}, that is the configuration template that all other machines will use.
891
+
In this section you will create the {{< glossary_tooltip term_id="fragment" text="fragment" >}}: the configuration template that all other machines will use.
889
892
890
893
1. Navigate to the **FLEET** page and go to the [**FRAGMENTS** tab](https://app.viam.com/fragments).
891
-
1. Click Create fragment.
894
+
1. Click **Create fragment**.
892
895
1. Name the fragment `air-quality-configuration`.
893
896
1. Add the same components that you added to the development machine when you [set up one device for development](#set-up-one-device-for-development).
894
897
@@ -902,13 +905,13 @@ If not, you can use [fragment overwrite](/manage/fleet/reuse-configuration/#modi
902
905
903
906
{{< /expand >}}
904
907
905
-
1. Specify the version for the sds011 module.
908
+
1. Specify the version for the `sds011` module.
906
909
At the point of writing the version is `0.2.1`.
907
910
Specifying a specific version or a specific minor or major version of a module will ensure that even if the module you use changes, your machines remain functional.
908
-
You can update your fragment at any point, any machines using it will update to use the new configuration.
911
+
You can update your fragment at any point, and any machines using it will update to use the new configuration.
909
912
910
913
{{< alert title="Tip: Use the fragment on your development machine" color="tip" >}}
911
-
To avoid differences between fragment and development machines, we recommend you remove the configured resources from the development machine and add the fragment you just created instead using the **+** button.
914
+
To avoid differences between fragment and development machines, we recommend you remove the configured resources from the development machine, and instead use the **+** button to add the fragment you just created.
912
915
{{< /alert >}}
913
916
914
917
### Provision your machines
@@ -917,7 +920,7 @@ To avoid differences between fragment and development machines, we recommend you
917
920
{{% tablestep number=1 %}}
918
921
919
922
For each machine, flash the operating system to the device's SD card.
920
-
If you are using the Raspberry PI Imager, you **must customize at least the hostname** for the next steps to work.
923
+
If you are using the Raspberry Pi Imager, you **must customize at least the hostname** for the next steps to work.
921
924
922
925
Then run the following commands to download the preinstall script and make the script executable:
923
926
@@ -953,7 +956,7 @@ Navigate to one of the locations and create a machine.
953
956
Select the part status dropdown to the right of your machine's name on the top of the page.
954
957
955
958
Click the copy icon next to **Machine cloud credentials**.
956
-
Paste the machine cloud credentials into a file on your harddrive called FILE>viam.json</FILE>.
959
+
Paste the machine cloud credentials into a file on your hard drive called FILE>viam.json</FILE>.
0 commit comments