diff --git a/docs/appendix/contributing.md b/docs/appendix/contributing.md index 32f69cc2ac..f005250377 100644 --- a/docs/appendix/contributing.md +++ b/docs/appendix/contributing.md @@ -4,6 +4,7 @@ linkTitle: "Contributing to the docs" weight: 99 type: "docs" description: "Learn about our style guide and how to work with hugo to contribute to these docs." +toc_hide: true --- Thank you for wanting to help us make the docs better. diff --git a/docs/appendix/try-viam/reserve-a-rover.md b/docs/appendix/try-viam/reserve-a-rover.md index bb72d93c27..20a88b331b 100644 --- a/docs/appendix/try-viam/reserve-a-rover.md +++ b/docs/appendix/try-viam/reserve-a-rover.md @@ -10,6 +10,7 @@ tags: ["try viam", "app"] aliases: - "/try-viam/reserve-a-rover/" - "/get-started/try-viam/reserve-a-rover/" +toc_hide: true --- _Try Viam_ is a way to try out the Viam platform without setting up any hardware yourself. diff --git a/docs/architecture/machine-to-machine-comms.md b/docs/architecture/machine-to-machine-comms.md index 49b27227e9..5db1661d11 100644 --- a/docs/architecture/machine-to-machine-comms.md +++ b/docs/architecture/machine-to-machine-comms.md @@ -7,6 +7,7 @@ description: "Explanation of how a machine and its parts interact at the communi aliases: - "/internals/robot-to-robot-comms/" - "/internals/machine-to-machine-comms/" +toc_hide: true --- When building a smart machine application in the [Viam app](https://app.viam.com), a user typically begins by configuring their machine which can consist of one or more {{< glossary_tooltip term_id="part" text="parts" >}}. diff --git a/docs/how-tos/_index.md b/docs/how-tos/_index.md index 124549c4f2..a908881a76 100644 --- a/docs/how-tos/_index.md +++ b/docs/how-tos/_index.md @@ -52,11 +52,10 @@ The guides on this page provide solutions for common tasks and workflows. Browse {{< /cards >}} {{< /how-to-expand >}} -{{< how-to-expand "Work with sensor data" "4" "INTERMEDIATE" >}} +{{< how-to-expand "Work with sensor data" "3" "INTERMEDIATE" >}} {{< cards >}} {{% card link="/how-tos/collect-sensor-data/" noimage="true" %}} {{% card link="/how-tos/sensor-data-visualize/" noimage="true" %}} -{{% card link="/how-tos/sensor-data-query-sdk/" noimage="true" %}} {{% card link="/how-tos/sensor-data-query-with-third-party-tools/" noimage="true" %}} {{< /cards >}} {{< /how-to-expand >}} diff --git a/docs/how-tos/collect-sensor-data.md b/docs/how-tos/collect-sensor-data.md index 30a21ea021..f6468cf632 100644 --- a/docs/how-tos/collect-sensor-data.md +++ b/docs/how-tos/collect-sensor-data.md @@ -130,11 +130,11 @@ Click the **Save** button in the top right corner of the page to save your confi ## Next steps -Now that you have collected sensor data, you can [query it](/how-tos/sensor-data-query-with-third-party-tools/), [access it programmatically](/how-tos/sensor-data-query-sdk/) or [visualize it](/how-tos/sensor-data-visualize/) with third-party tools. +Now that you have collected sensor data, you can [query it](/how-tos/sensor-data-query-with-third-party-tools/), [access it programmatically](/appendix/apis/data-client/) or [visualize it](/how-tos/sensor-data-visualize/) with third-party tools. {{< cards >}} {{% card link="/how-tos/sensor-data-query-with-third-party-tools/" %}} -{{% card link="/how-tos/sensor-data-query-sdk/" %}} +{{% card link="/appendix/apis/data-client/" %}} {{% card link="/how-tos/sensor-data-visualize/" %}} {{< /cards >}} diff --git a/docs/how-tos/performance-metrics.md b/docs/how-tos/performance-metrics.md index 20a3bd735b..e318635845 100644 --- a/docs/how-tos/performance-metrics.md +++ b/docs/how-tos/performance-metrics.md @@ -17,6 +17,7 @@ level: "Beginner" date: "2024-08-23" # updated: "" # When the tutorial was last entirely checked cost: "0" +toc_hide: true --- You can use the [`viam-telegraf-sensor`](https://app.viam.com/module/viam/viam-telegraf-sensor) {{< glossary_tooltip term_id="module" text="module" >}} to capture and monitor the following metrics about the performance of individual machines or your entire fleet: diff --git a/docs/how-tos/sensor-data-query-sdk.md b/docs/how-tos/sensor-data-query-sdk.md deleted file mode 100644 index 72f05c814c..0000000000 --- a/docs/how-tos/sensor-data-query-sdk.md +++ /dev/null @@ -1,174 +0,0 @@ ---- -title: "Query sensor data with the Python SDK" -linkTitle: "Query sensor data with an SDK" -type: "docs" -images: ["/services/icons/data-query.svg"] -icon: true -description: "Retrieve and query sensor data that you have synced to the Viam app using Python SDK." -aliases: - - /use-cases/sensor-data-query-sdk/ -languages: ["python"] -viamresources: ["sensor", "data_manager"] -platformarea: ["data", "core"] -level: "Beginner" -date: "2024-08-16" -# updated: "" # When the tutorial was last entirely checked -cost: "0" -# SME: Devin Hilly ---- - -You can use the data management service to [capture sensor data](/how-tos/collect-sensor-data/) from any machine and sync that data to the cloud. -Then, you can use the Python SDK to retrieve and query that data. -For example, you can configure data capture for several sensors on one machine, or for several sensors across multiple machines, to report the ambient operating temperature. -You can then write a script to run queries against that data to search for outliers or edge cases, to analyze how the ambient temperature affects your machines' operation or to take action if the machines are overheating. - -{{< alert title="In this page" color="tip" >}} - -1. [Setting up the Python SDK](#set-up-the-python-sdk). -1. [Querying data with the Python SDK](#query-data-with-the-python-sdk). - -{{< /alert >}} - -## Prerequisites - -{{% expand "A running machine connected to the Viam app. Click to see instructions." %}} - -{{% snippet "setup-both.md" %}} - -{{% /expand%}} - -{{% expand "Captured sensor data. Click to see instructions." %}} - -Follow the guide to [capture sensor data](/how-tos/collect-sensor-data/). - -{{% /expand%}} - -## Set up the Python SDK - -{{< table >}} -{{% tablestep link="/sdks/#installation"%}} -**1. Install the Python SDK** - -For macOS (both Intel x86_64 and Apple Silicon) or Linux (x86, aarch64, armv6l), run the following commands: - -```sh {class="command-line" data-prompt="$"} -python3 -m venv .venv -source .venv/bin/activate -pip install viam-sdk -``` - -{{% /tablestep %}} -{{% tablestep%}} -**2. Install requirements** - -To query data with the Python SDK, you will the `bson` package or the `pymongo` package. -To install `bson`, run the following command: - -```sh {class="command-line" data-prompt="$"} -pip install bson -``` - -{{% /tablestep %}} -{{< /table >}} - -## Query data with the Python SDK - -{{< table >}} -{{% tablestep link="/cloud/organizations/" %}} -**1. Get an API key** - -To access your machines using the Python SDK, you must use an API key. -You can get an organization API key from the organization's **Settings** accessible in the top right of the navigation bar in the [Viam app](https://app.viam.com). - -{{% /tablestep %}} -{{% tablestep link="/appendix/apis/data-client/"%}} -**2. Use the API key with the `data_client`** - -Use the API key and [`TabularDataByFilter()`](/appendix/apis/data-client/#tabulardatabyfilter), [`TabularDataBySQL()`](/appendix/apis/data-client/#tabulardatabysql), [`TabularDataByMQL()`](/appendix/apis/data-client/#tabulardatabymql), and[`DeleteTabularData()`](/appendix/apis/data-client/#deletetabulardata) to query data by creating and running the following Python script: - -{{% alert title="Note" color="note" %}} -Make sure to replace the value in line 30 with your correct sensor name, line 35 with your organization ID which you can get by running `viam organizations list`, and line 37 with your location ID which you can get by running `viam locations list`. -{{% /alert %}} - -```python {class="line-numbers linkable-line-numbers" data-line="29-54, 30, 37, 40"} -import asyncio -import bson - -from viam.rpc.dial import DialOptions, Credentials -from viam.app.viam_client import ViamClient -from viam.proto.app.data import Filter - - -async def connect() -> ViamClient: - dial_options = DialOptions( - credentials=Credentials( - type="api-key", - # Replace "" (including brackets) with your machine's API key - payload='', - ), - # Replace "" (including brackets) with your machine's - # API key ID - auth_entity='' - ) - return await ViamClient.create_from_dial_options(dial_options) - - -async def main(): - # Make a ViamClient - viam_client = await connect() - # Instantiate a DataClient to run data client API methods on - data_client = viam_client.data_client - - # TODO: replace "my-sensor" with your correct sensor name - my_filter = Filter(component_name="my-sensor") - data, count, id = await data_client.tabular_data_by_filter( - filter=my_filter, limit=5) - # This query requests all stored data grouped by hour and calculates the - # average, minimum, and maximum of the memory usage - data = await data_client.tabular_data_by_mql( - # TODO: Replace with your organization ID - organization_id='', - mql_binary=[ - # TODO: Replace with your location ID - bson.dumps({'$match': {'location_id': ''}}), - bson.dumps({ - "$group": { - "_id": { - "year": {"$year": "$time_requested"}, - "dayOfYear": {"$dayOfYear": "$time_requested"}, - "hour": {"$hour": "$time_requested"} - }, - "count": {"$sum": 1}, - "max_mem": {"$max": "$data.readings.mem.used_percent"}, - "min_mem": {"$min": "$data.readings.mem.used_percent"}, - "average_mem": {"$avg": "$data.readings.mem.used_percent"} - } - }) - ]) - print(data) - - viam_client.close() - -if __name__ == '__main__': - asyncio.run(main()) -``` - -{{% /tablestep %}} -{{< /table >}} - -Adjust the Python script to query your data further with the [`data_client` API](/appendix/apis/data-client/#api). - -## Next steps - -On top of querying sensor data with the Python SDK, you can also [query](/how-tos/sensor-data-query-with-third-party-tools/) or [visualize](/how-tos/sensor-data-visualize/) it with third-party tools. - -{{< cards >}} -{{% card link="/how-tos/sensor-data-query-with-third-party-tools/" %}} -{{% card link="/how-tos/sensor-data-visualize/" %}} -{{< /cards >}} - -To see sensor data in action, check out this tutorial: - -{{< cards >}} -{{% card link="/tutorials/control/air-quality-fleet/" %}} -{{< /cards >}} diff --git a/docs/how-tos/sensor-data-query-with-third-party-tools.md b/docs/how-tos/sensor-data-query-with-third-party-tools.md index fc00b4f789..ed62365412 100644 --- a/docs/how-tos/sensor-data-query-with-third-party-tools.md +++ b/docs/how-tos/sensor-data-query-with-third-party-tools.md @@ -281,10 +281,10 @@ db.readings.aggregate( For information on connecting to your Atlas instance from other MQL clients, see the MongoDB Atlas [Connect to your Cluster Tutorial](https://www.mongodb.com/docs/atlas/tutorial/connect-to-your-cluster/). -On top of querying sensor data with third-party tools, you can also [query it with the Python SDK](/how-tos/sensor-data-query-sdk/) or [visualize it](/how-tos/sensor-data-visualize/). +On top of querying sensor data with third-party tools, you can also [query it with the Python SDK](/appendix/apis/data-client/) or [visualize it](/how-tos/sensor-data-visualize/). {{< cards >}} -{{% card link="/how-tos/sensor-data-query-sdk/" %}} +{{% card link="/appendix/apis/data-client/" %}} {{% card link="/how-tos/sensor-data-visualize/" %}} {{< /cards >}} diff --git a/docs/how-tos/sensor-data-visualize.md b/docs/how-tos/sensor-data-visualize.md index 405d52c357..d53b8d55c5 100644 --- a/docs/how-tos/sensor-data-visualize.md +++ b/docs/how-tos/sensor-data-visualize.md @@ -230,10 +230,10 @@ See the [guide on querying sensor data](/how-tos/sensor-data-query-with-third-pa For more detailed instructions on using Grafana, including a full step-by-step configuration walkthrough, see [visualizing data with Grafana](/tutorials/services/visualize-data-grafana/). -On top of visualizing sensor data with third-party tools, you can also [query it with the Python SDK](/how-tos/sensor-data-query-sdk/) or [query it with the Viam app](/how-tos/sensor-data-query-with-third-party-tools/). +On top of visualizing sensor data with third-party tools, you can also [query it with the Python SDK](/appendix/apis/data-client/) or [query it with the Viam app](/how-tos/sensor-data-query-with-third-party-tools/). {{< cards >}} -{{% card link="/how-tos/sensor-data-query-sdk/" %}} +{{% card link="/appendix/apis/data-client/" %}} {{% card link="/how-tos/sensor-data-query-with-third-party-tools/" %}} {{< /cards >}} diff --git a/docs/installation/prepare/_index.md b/docs/installation/prepare/_index.md index 343497a6d2..8271bee053 100644 --- a/docs/installation/prepare/_index.md +++ b/docs/installation/prepare/_index.md @@ -6,4 +6,5 @@ empty_node: true layout: "empty" canonical: "/installation/viam-server-setup/" type: "docs" +toc_hide: true --- diff --git a/docs/registry/configure.md b/docs/registry/configure.md index e2f0f8c5b2..35a83c66f2 100644 --- a/docs/registry/configure.md +++ b/docs/registry/configure.md @@ -21,6 +21,7 @@ aliases: - "/extend/modular-resources/configure/" - "/modular-resources/configure/" modulescript: true +toc_hide: true --- You can extend Viam by adding a module on your machine that provides one or more {{< glossary_tooltip term_id="modular-resource" text="modular resources" >}} ([components](/components/) or [services](/services/)): diff --git a/docs/registry/examples/_index.md b/docs/registry/examples/_index.md index 8c57eaa7f9..7f77c5bda8 100644 --- a/docs/registry/examples/_index.md +++ b/docs/registry/examples/_index.md @@ -21,6 +21,7 @@ aliases: - "/program/extend/modular-resources/examples/" - "/extend/modular-resources/examples/" - "/modular-resources/examples/" +toc_hide: true --- To familiarize yourself with creating and using {{< glossary_tooltip term_id="modular-resource" text="modular resources" >}}, follow one of these example [tutorials](#tutorials) or clone one of these example [repositories](#repositories). diff --git a/docs/registry/examples/custom-arm.md b/docs/registry/examples/custom-arm.md index 04e865250d..8773027c60 100644 --- a/docs/registry/examples/custom-arm.md +++ b/docs/registry/examples/custom-arm.md @@ -21,6 +21,7 @@ images: ["/registry/module-icon.svg"] aliases: - "/extend/modular-resources/examples/custom-arm/" - "/modular-resources/examples/custom-arm/" +toc_hide: true # SMEs: Nicole Jung --- diff --git a/docs/registry/examples/tflite-module.md b/docs/registry/examples/tflite-module.md index 204b0a4bbf..6e3ceb6f84 100644 --- a/docs/registry/examples/tflite-module.md +++ b/docs/registry/examples/tflite-module.md @@ -11,6 +11,7 @@ aliases: - "/extend/modular-resources/examples/tflite-module/" - "/modular-resources/examples/tflite-module/" # SMEs: Andrew Morrow +toc_hide: true --- Viam provides an example {{< glossary_tooltip term_id="modular-resource" text="modular resource" >}} written in C++ that extends the [ML model](/services/ml/) service to run any TensorFlow Lite model. diff --git a/docs/services/data/_index.md b/docs/services/data/_index.md index df836efe06..28f0827cdb 100644 --- a/docs/services/data/_index.md +++ b/docs/services/data/_index.md @@ -93,11 +93,11 @@ Upload data to the Viam cloud from your computer or mobile device using the data ### Query your data Once your data has [synced](/services/data/capture-sync/), you can query it using the [data client API](/appendix/apis/data-client/). -For _tabular_ sensor data, you can also [run {{< glossary_tooltip term_id="sql" text="SQL" >}} or {{< glossary_tooltip term_id="mql" text="MQL" >}} queries](/how-tos/sensor-data-query-sdk/) from the [Query subtab](https://app.viam.com/data/query) of the **Data** tab in the Viam app. +For _tabular_ sensor data, you can also run {{< glossary_tooltip term_id="sql" text="SQL" >}} or {{< glossary_tooltip term_id="mql" text="MQL" >}} queries from the [Query subtab](https://app.viam.com/data/query) of the **Data** tab in the Viam app. {{< cards >}} {{% card link="/how-tos/sensor-data-query-with-third-party-tools/" noimage="True" %}} -{{% card link="/how-tos/sensor-data-query-sdk/" noimage="True" %}} +{{% card link="/appendix/apis/data-client/" noimage="True" %}} {{% card link="/appendix/apis/data-client/" noimage="True" %}} {{< /cards >}} diff --git a/docs/tutorials/configure/build-a-mock-robot.md b/docs/tutorials/configure/build-a-mock-robot.md index c724fd4299..a78a47130e 100644 --- a/docs/tutorials/configure/build-a-mock-robot.md +++ b/docs/tutorials/configure/build-a-mock-robot.md @@ -22,6 +22,7 @@ level: "Beginner" date: "2022-10-11" # updated: "" cost: "0" +toc_hide: true --- {{- end -}} {{- end -}} +{{- end -}}