Skip to content

Commit c6e7b37

Browse files
npentrelJessamyT
andcommitted
Apply suggestions from code review
Co-authored-by: Jessamy Taylor <[email protected]>
1 parent e7fcdfd commit c6e7b37

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

docs/tutorials/control/air-quality-fleet.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cost: 200
2020
# 2. The reader can identify when to use fragments and evaluate when it is worth using fragments.
2121
# The reader can create their own fragments for their projects and knows what to include and exclude from them.
2222
# 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.
2424
---
2525

2626
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:
3434
- Organize your fleet using {{< glossary_tooltip term_id="location" text="locations" >}}
3535
- Collect and sync data from multiple machines
3636
- 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
3838

3939
{{< /alert >}}
4040

@@ -45,7 +45,7 @@ By completing this project, you will learn to:
4545
You can create one or more machines to measure air quality.
4646
For each machine, you need the following hardware:
4747

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)
4949
- 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.
5050
- A single-board computer (SBC) [capable of running `viam-server`](https://docs.viam.com/installation/)
5151
- An appropriate power supply
@@ -197,7 +197,8 @@ You can check that your sensor data is being synced by clicking on the **...** m
197197
{{% /tablestep %}}
198198
{{< /table >}}
199199

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.
201202
Let's create a dashboard for its measurements next.
202203

203204
## Create a dashboard
@@ -280,7 +281,7 @@ npm install
280281
Viam apps provide access to a machine by placing its API key in your local storage.
281282
You can access the data from your browser's local storage with the following code.
282283

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.
284285

285286
{{< table >}}
286287
{{% tablestep number=1 %}}
@@ -334,11 +335,11 @@ document.addEventListener("DOMContentLoaded", async () => {
334335
{{% /tablestep %}}
335336
{{% tablestep number=2 %}}
336337

337-
For developing your app on localhost, **add the same information to your browsers local storage**.
338+
For developing your app on localhost, **add the same information to your browser's local storage**.
338339

339340
Navigate to [Camera Viewer](https://air-quality_naomi.viamapplications.com/) and log in, then select your development machine.
340341

341-
Open Developer tools, go to the console and paste the following JavaScript to obtain the cookies you need:
342+
Open Developer Tools, go to the console and paste the following JavaScript to obtain the cookies you need:
342343

343344
```js {class="line-numbers linkable-line-numbers" data-line=""}
344345
function generateCookieSetterScript() {
@@ -821,6 +822,8 @@ Your dashboard should now load your data.
821822

822823
## Organizing devices for third-party usage
823824

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+
824827
Imagine you create an air quality monitoring company called Pollution Monitoring Made Simple.
825828
Anyone can sign up and order one of your sensing machines.
826829
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
879882
Once a customer receives your machine, they will:
880883

881884
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.
883886
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.
884887
4. The machine can now connect to the internet and complete setup based on the fragment it knows about.
885888

886889
### Create the fragment for air sensing machines
887890

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.
889892

890893
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**.
892895
1. Name the fragment `air-quality-configuration`.
893896
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).
894897

@@ -902,13 +905,13 @@ If not, you can use [fragment overwrite](/manage/fleet/reuse-configuration/#modi
902905

903906
{{< /expand >}}
904907

905-
1. Specify the version for the sds011 module.
908+
1. Specify the version for the `sds011` module.
906909
At the point of writing the version is `0.2.1`.
907910
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.
909912

910913
{{< 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.
912915
{{< /alert >}}
913916

914917
### Provision your machines
@@ -917,7 +920,7 @@ To avoid differences between fragment and development machines, we recommend you
917920
{{% tablestep number=1 %}}
918921

919922
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.
921924

922925
Then run the following commands to download the preinstall script and make the script executable:
923926

@@ -953,7 +956,7 @@ Navigate to one of the locations and create a machine.
953956
Select the part status dropdown to the right of your machine's name on the top of the page.
954957

955958
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>.
957960

958961
{{< alert title="Tip: Fleet management API" color="tip" >}}
959962
You can create locations and machines programmatically, with the [Fleet management API](/dev/reference/apis/fleet/).
@@ -973,9 +976,11 @@ Follow the instructions and provide the <FILE>viam-defaults.json</FILE> file and
973976
{{% /tablestep %}}
974977
{{< /table >}}
975978

976-
That's it! Your device is now provisioned and ready for your end user!
979+
That's it!
980+
Your device is now provisioned and ready for your end user!
977981

978-
Having trouble? See [Provisioning](/manage/fleet/provision/setup/) for more information and troubleshooting.
982+
Having trouble?
983+
See [Provisioning](/manage/fleet/provision/setup/) for more information and troubleshooting.
979984

980985
<div id="emailform"></div>
981986

0 commit comments

Comments
 (0)