Skip to content

docs(device-state): document profile-level inactivity timeout#426

Open
zzzeebra wants to merge 1 commit into
mainfrom
docs/device-inactivity-timeout-profile
Open

docs(device-state): document profile-level inactivity timeout#426
zzzeebra wants to merge 1 commit into
mainfrom
docs/device-inactivity-timeout-profile

Conversation

@zzzeebra
Copy link
Copy Markdown

@zzzeebra zzzeebra commented May 26, 2026

Summary

Documents the new Device inactivity timeout field on the Device Profile Details page (introduced by thingsboard/thingsboard#15527) and updates existing inactivity timeout references to reflect the three-tier resolution.

Effective inactivity timeout per device, in priority order:

  1. Per-device inactivityTimeout server-side attribute (milliseconds)
  2. Device inactivity timeout field on the device profile (new)
  3. Global DEFAULT_INACTIVITY_TIMEOUT fallback (seconds, default 600)

Files changed

  • user-guide/device-profiles.mdx — new "Device inactivity timeout" section (unit selector, resolution order, profile-update propagation). Profile Details table row updated with anchor link.
  • user-guide/connectivity-status.mdx — Aside expanded from per-device-only override to the full three-tier hierarchy with link to the new profile section. "Inactivity Detection" paragraph rewritten to mention all three sources. Drive-by bug fix: TB_TRANSPORT_SESSIONS_INACTIVITY_TIMEOUT default 300000600000 to match thingsboard.yml.
  • recipes/device-inactivity-alarm.mdx — "Step 1. Set inactivity timeout" split into Option A (Device profile, recommended) and Option B (per-device override). Replaced state.defaultInactivityTimeoutInSec yml-property with DEFAULT_INACTIVITY_TIMEOUT env name per style guide.
  • edge/reference/configuration/rule-engine-config.mdx — tightened the description of state.defaultInactivityTimeoutInSec; mentions the three-tier resolution.

Test plan

  • `pnpm build:fast` — 3817 pages built, no errors or warnings on edited files
  • Reviewer to verify the new Device Profile section reads correctly at `/docs/user-guide/device-profiles/#device-inactivity-timeout` (CE) and `/docs/pe/user-guide/device-profiles/#device-inactivity-timeout` (PE)
  • Reviewer to confirm the anchor links from `connectivity-status` and `device-inactivity-alarm` resolve in both CE and PE

Pairing

Pair with thingsboard/thingsboard#15527. If the field name or UX changes during code review on that PR, this PR will need to follow.

Adds documentation for the new Device Profile "Device inactivity timeout"
field introduced by thingsboard/thingsboard#15527, and updates existing
inactivity timeout references to reflect the three-tier resolution:
per-device server attribute → device profile → global default.

- user-guide/device-profiles: new "Device inactivity timeout" section
  with unit selector, resolution order, and propagation behavior.
- user-guide/connectivity-status: expand Aside to the three-tier
  hierarchy; rewrite Inactivity Detection paragraph; fix
  TB_TRANSPORT_SESSIONS_INACTIVITY_TIMEOUT default 300000 -> 600000
  to match thingsboard.yml.
- recipes/device-inactivity-alarm: replace yml-property reference with
  env var; split Step 1 into Option A (device profile, recommended) and
  Option B (per-device override).
- edge/reference/configuration/rule-engine-config: tighten the
  defaultInactivityTimeoutInSec description and mention the new
  three-tier resolution.

Note: core-rule-engine-config.mdx (CE+PE) is auto-generated from
application/src/main/resources/thingsboard.yml comments by
scripts/generate_config_pages.py, so it is updated in the platform
yml as part of the matching CE PR rather than edited here.
@zzzeebra zzzeebra force-pushed the docs/device-inactivity-timeout-profile branch from b460ed3 to de7660c Compare May 27, 2026 08:30
@vvlladd28 vvlladd28 requested a review from Copilot June 4, 2026 07:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the ThingsBoard documentation to cover the newly introduced Device inactivity timeout field on Device Profile Details and to consistently explain the three-tier inactivity timeout resolution (per-device attribute → profile field → global default) across user guides, recipes, and Edge configuration reference pages.

Changes:

  • Added a new Device inactivity timeout section to Device Profiles docs and linked it from the Profile Details table.
  • Expanded Connectivity Status docs to describe the full three-tier inactivity timeout hierarchy and updated the transport session inactivity timeout default to 600000.
  • Updated the Device Inactivity Alarm recipe and Edge rule engine configuration reference to reflect the three-tier resolution and env-var naming.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/content/_includes/docs/user-guide/device-profiles.mdx Adds a new profile-level inactivity timeout section and links to it from the Details tab description.
src/content/_includes/docs/user-guide/connectivity-status.mdx Documents the three-tier inactivity timeout resolution and updates the transport session inactivity timeout default value.
src/content/_includes/docs/recipes/device-inactivity-alarm.mdx Refactors “set inactivity timeout” guidance into profile-level (recommended) vs per-device override options.
src/content/_includes/docs/edge/reference/configuration/rule-engine-config.mdx Updates the global inactivity timeout parameter description to include the three-tier resolution order.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


### Device inactivity timeout

Set how long a device may be silent before ThingsBoard marks it inactive. Choose the unit from the dropdown (seconds, minutes, hours, or days). Leave the field empty or set it to 0 to fall back to the global `DEFAULT_INACTIVITY_TIMEOUT` setting.
## Inactivity Detection

A device is marked **inactive** when no activity is received for `DEFAULT_INACTIVITY_TIMEOUT` seconds (default: 600 s / 10 minutes). ThingsBoard checks all devices on a schedule controlled by `DEFAULT_STATE_CHECK_INTERVAL` (default: 60 s).
A device is marked **inactive** when no activity is received within its effective inactivity timeout. ThingsBoard resolves the value per device in this order: per-device `inactivityTimeout` server attribute (milliseconds), then the device profile's **Device inactivity timeout** field, then the global `DEFAULT_INACTIVITY_TIMEOUT` (seconds, default 600 s / 10 minutes). ThingsBoard checks all devices on a schedule controlled by `DEFAULT_STATE_CHECK_INTERVAL` (default: 60 s).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants