Skip to content

Commit 970748f

Browse files
committed
edits
1 parent 1ed640a commit 970748f

File tree

2 files changed

+43
-7
lines changed

2 files changed

+43
-7
lines changed

docs/operate/get-started/other-hardware/_index.md

+40-4
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ If you enabled cloud build, use these steps.
571571
1. Make your reload script executable by running the following command in your module directory:
572572

573573
```sh {id="terminal-prompt" class="command-line" data-prompt="$"}
574-
sudo chmod +x reload.sh
574+
chmod 755 reload.sh
575575
```
576576

577577
1. Edit your <file>meta.json</file>, replacing the `"entrypoint"`, `"build"`, and `"path"` fields as follows:
@@ -685,7 +685,38 @@ If your component works, you're almost ready to share your module by uploading i
685685
If not, you have some debugging to do.
686686

687687
Each time you make changes to your local module, you need to rebuild the module and then restart its instance on your machine.
688-
Run the following command to rebuild it:
688+
689+
Run the following command to rebuild and restart your module:
690+
691+
```sh {id="terminal-prompt" class="command-line" data-prompt="$"}
692+
viam module reload <insert relevant named args>
693+
```
694+
695+
For more information, run the command with the `-h` flag or see the [CLI documentation](/dev/tools/cli/#module).
696+
An example:
697+
698+
```sh {id="terminal-prompt" class="command-line" data-prompt="$"}
699+
viam module reload --part-id 123abc45-1234-432c-aabc-z1y111x23a00 --home /Users/jessamyt/
700+
```
701+
702+
{{< expand "Reload troubleshooting" >}}
703+
704+
`Error: Could not connect to machine part: context deadline exceeded; context deadline exceeded; mDNS query failed to find a candidate`
705+
706+
- Try specifying the `--part-id`, which you can find by clicking the **Live** indicator on your machine's page in the Viam app and clicking **Part ID**.
707+
708+
`Error: Rpc error: code = Unknown desc = stat /root/.viam/packages-local: no such file or directory`
709+
710+
- Try specifying the `--home` directory.
711+
712+
`Error: Error while refreshing token, logging out. Please log in again`
713+
714+
- Run `viam login` to reauthenticate the CLI.
715+
716+
### Try a different command
717+
718+
If you are still having problems with the `reload` command, you can use a different, slower method of rebuilding and then restarting the module.
719+
Run the following command to rebuild your module:
689720

690721
```sh {id="terminal-prompt" class="command-line" data-prompt="$"}
691722
viam module build local
@@ -696,7 +727,9 @@ In upper right corner of the module's card, click the three dot (**...**) icon,
696727

697728
{{<imgproc src="/registry/restart-module.png" resize="x600" declaredimensions=true alt="Module menu." style="max-width:300px" >}}
698729

699-
For help, don't hesitate to reach out on the [Community Discord](https://discord.gg/viam).
730+
For more help, try asking the AI chatbot or reach out on the [Community Discord](https://discord.gg/viam).
731+
732+
{{< /expand >}}
700733

701734
{{% /tablestep %}}
702735
{{< /table >}}
@@ -762,9 +795,10 @@ The following attributes are available for `rdk:sensor:jessamy:weather:meteo_PM`
762795

763796
{{% /tablestep %}}
764797
{{% tablestep %}}
765-
**2. Create a GitHub repo (optional)**
798+
**2. Create a GitHub repo**
766799

767800
Create a GitHub repository with all the source code and the README for your module.
801+
This is required for cloud build to work.
768802

769803
Add the link to that repo as the `url` in the <file>meta.json</file> file.
770804

@@ -880,6 +914,8 @@ It should resemble the following:
880914
}
881915
```
882916

917+
Delete the <file>reload.sh</file> script since it was only meant for testing purposes.
918+
883919
From within the module directory, create a virtual Python environment with the necessary packages and then build an executable by running the setup and build scripts:
884920

885921
```sh {id="terminal-prompt" class="command-line" data-prompt="$"}

docs/operate/get-started/other-hardware/manage-modules.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ At the end of your <file>meta.json</file>, add the build configuration:
154154

155155
{{%expand "Click to view example setup.sh" %}}
156156

157-
```sh { class="command-line"}
157+
```sh {class="command-line" data-prompt="$"}
158158
#!/bin/bash
159159
set -e
160160
UNAME=$(uname -s)
@@ -179,7 +179,7 @@ pip3 install -r requirements.txt
179179

180180
{{%expand "Click to view example build.sh (with setup.sh)" %}}
181181

182-
```sh { class="command-line"}
182+
```sh { class="command-line" data-prompt="$"}
183183
#!/bin/bash
184184
pip3 install -r requirements.txt
185185
python3 -m PyInstaller --onefile --hidden-import="googleapiclient" src/main.py
@@ -190,7 +190,7 @@ tar -czvf dist/archive.tar.gz <PATH-TO-EXECUTABLE>
190190

191191
{{%expand "Click to view example build.sh (without setup.sh)" %}}
192192

193-
```sh { class="command-line"}
193+
```sh { class="command-line" data-prompt="$"}
194194
#!/bin/bash
195195
set -e
196196
UNAME=$(uname -s)

0 commit comments

Comments
 (0)