Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCS-3174: Update machine settings #3930

Merged
merged 14 commits into from
Feb 13, 2025
Merged

Conversation

@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label Jan 28, 2025
Copy link

netlify bot commented Jan 28, 2025

Deploy Preview for viam-docs ready!

Name Link
🔨 Latest commit 0288355
🔍 Latest deploy log https://app.netlify.com/sites/viam-docs/deploys/67ae44e7393a690008fdf2ad
😎 Deploy Preview https://deploy-preview-3930--viam-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 37 (🟢 up 13 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (🔴 down 8 from production)
SEO: 92 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@npentrel npentrel force-pushed the DOCS-3174 branch 4 times, most recently from 5360692 to d56362e Compare January 28, 2025 14:28
@npentrel npentrel marked this pull request as draft January 28, 2025 15:05
@npentrel npentrel force-pushed the DOCS-3174 branch 2 times, most recently from 7aba092 to 8417260 Compare January 28, 2025 15:13
@npentrel npentrel requested a review from Otterverse February 3, 2025 12:23
@Otterverse
Copy link
Member

I haven't had time to properly review this yet, as I'm still trying to get the work this is documenting done first. I believe this doesn't need to go live until the actual changes do though, so I should be able to get to it before that.

@npentrel
Copy link
Collaborator Author

npentrel commented Feb 5, 2025

I haven't had time to properly review this yet, as I'm still trying to get the work this is documenting done first. I believe this doesn't need to go live until the actual changes do though, so I should be able to get to it before that.

No problem. The docs are also very close to what we merged into the app so if we end up merging this when the changes go live, we can review afterwards too.

@@ -187,7 +187,7 @@ Create a file called <FILE>viam-provisioning.json</FILE> with the following form
"model": "<NAME>", # the machine's model
"fragment_id": "<ID>", # the fragment id, required for mobile app
"hotspot_prefix": "<PREFIX>", # machine creates a hotspot during setup
"disable_dns_redirect": true, # disable if using a mobile app
"disable_captive_portal_redirect": false, # disable if using a mobile app
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set to true if using a mobile app or something like that

i think explicit makes it easier to understand. someone reading quickly could interpret that is already disabled

| `networks` | array | Optional | Add additional networks the machine can connect to for provisioning. We recommend that you add WiFi settings in the operating system (for example, directly in NetworkManager) rather than in this file, or in the corresponding machine config in the Viam app, if networks aren't needed until after initial provisioning. See [Networks](/manage/reference/viam-agent/#networks). Default: `[]`. |
| `wifi_power_save` | boolean | Optional | If set, will explicitly enable or disable power save for all WiFi connections managed by NetworkManager. |
| `device_reboot_after_offline_minutes` | integer | Optional | If set, `viam-agent` will reboot the device after it has been offline for the specified duration. Default: `0` (disabled). |
| `disable_captive_portal_redirect` | boolean | Optional | By default, ALL DNS lookups using the provisioning hotspot will redirect to the device. This causes most phones/mobile devices to automatically redirect the user to the captive portal as a "sign in" screen. When disabled, only domains ending in .setup (ex: viam.setup) will be redirected. This generally avoids displaying the portal to users and is mainly used in conjunction with a mobile provisioning application workflow. Default: `false`. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder is saying something like this would be a little bit easier to understand

By default (false), all DNS lookups are redirected, which can cause mobile devices to automatically display the portal. When set to true, only DNS requests for domains ending in .setup are redirected, preventing the portal from appearing unexpectedly, specially convenient when using a mobile app for provisioning.

| `wifi_power_save` | boolean | Optional | If set, will explicitly enable or disable power save for all WiFi connections managed by NetworkManager. |
| `device_reboot_after_offline_minutes` | integer | Optional | If set, `viam-agent` will reboot the device after it has been offline for the specified duration. Default: `0` (disabled). |
| `disable_captive_portal_redirect` | boolean | Optional | By default, ALL DNS lookups using the provisioning hotspot will redirect to the device. This causes most phones/mobile devices to automatically redirect the user to the captive portal as a "sign in" screen. When disabled, only domains ending in .setup (ex: viam.setup) will be redirected. This generally avoids displaying the portal to users and is mainly used in conjunction with a mobile provisioning application workflow. Default: `false`. |
| `turn_on_hotspot_if_wifi_has_no_internet` | boolean | Optional | By default, the device will only attempt to connect to a single wifi network (the one with the highest priority), provided during initial provisioning/setup using the provisioning mobile app or captive web portal. Wifi connection alone is enough to consider the device as "online" even if the global internet is not reachable. If the primary network configured during provisioning cannot be connected to and `turn_on_hotspot_if_wifi_has_no_internet` mode is enabled, the device will attempt connections to all configured networks in `networks`, and only consider the device online if the internet is reachable. Default: `false`. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to above and because I feel verbose documentation can lead folks to not read.

By default (false), the device connects to a single prioritized WiFi network (provided during provisioning) and is considered online even if the global internet is not reachable. When turn_on_hotspot_if_wifi_has_no_internet is true and the primary network lacks internet connectivity, the device will try all configured networks and only mark itself as online if it successfully connects to the internet.

### `viam-agent`
## `version_control`: Version management for `viam-agent` and `viam-server`

By default, when a new version of `viam-server` becomes available, `viam-agent` will restart and upgrade `viam-server` immediately.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is not accurate. agent will download the new version when available but it will not be used until agent restarts. This is why we introduce maintenance windows so the agent knows when is safe to do it automatically.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 227 is accurate

Copy link
Collaborator Author

@npentrel npentrel Feb 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but then it would never update until someone eventually power cycles?

Is this accurate?

Suggested change
By default, when a new version of `viam-server` becomes available, `viam-agent` will restart and upgrade `viam-server` immediately.
By default, when a new version of `viam-server` becomes available, it will automatically download.
When `viam-agent` next restarts, it installs and starts using the new version of `viam-server`.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, either restarts viam-server or power cycles

@npentrel npentrel marked this pull request as ready for review February 7, 2025 14:01
Co-authored-by: Naomi Pentrel <[email protected]>
Co-authored-by: Sierra Guequierre <[email protected]>
@Otterverse Otterverse merged commit 3b745a8 into viamrobotics:main Feb 13, 2025
12 checks passed
Copy link

🔎💬 Inkeep AI search and chat service is syncing content for source 'Viam Docs (https://docs.viam.com)'

@npentrel npentrel deleted the DOCS-3174 branch February 13, 2025 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to build This pull request is marked safe to build from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants