Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Module maintenance

This module provides a sensor that reports whether the current time falls within a configured time range. It is designed to pair with a viam-server maintenance window, so that configuration changes are only applied during a time range you choose.

Models

This module provides the following model(s):

  • viam:maintenance:time-allowed — a sensor whose Readings return is_allowed: true when the current local time is within a configured start/end window, and false otherwise. Overnight windows (e.g. 22:00–06:00) are supported.

Using with a maintenance window

Configure the sensor on your machine, then point the machine's maintenance block at it:

{
  "components": [
    {
      "name": "allowed-hours",
      "api": "rdk:component:sensor",
      "model": "viam:maintenance:time-allowed",
      "attributes": {
        "start_time": "08:00",
        "end_time": "17:00",
        "timezone": "America/New_York"
      }
    }
  ],
  "maintenance": {
    "sensor_name": "rdk:component:sensor/allowed-hours",
    "maintenance_allowed_key": "is_allowed"
  }
}

With this configuration, viam-server will only apply configuration changes between 08:00 and 17:00 in the America/New_York timezone.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages