Skip to content

Integrate with OyasumiVR? #40

Description

@ComfyChloe

Goal

Detect when OyasumiVR enters/exits sleep mode and use that signal to drive ARC's existing AutoStatus flow, applying/reverting VRChat status presets the same way the current schedule and location triggers already do.

Why

OyasumiVR already flips the user's VRChat status when they sleep. ARC's AutoStatus currently has no awareness of sleep state, so the two can fight each other (ARC says "join me", Oyasumi says "offline", ping-pong). Adding OyasumiVR as a third trigger source plugs into the preexisting LocationRule / ScheduleEntry plumbing so all three sources share one priority, echo-ignore, and revert path.

Proposed

  • New SleepTracker container alongside LocationTracker (main/containers/autostatus/sleepTracker.ts) that probes OyasumiVR's local HTTP API (default http://127.0.0.1:8123) and reports sleep state.
  • Extend AutoStatusConfig with a sleepRules array, same shape as the preexisting LocationRule ({ id, name, enabled, presetId, matchStates, fallbackStatusType }).
  • Add 'sleep' (and combos) to AutoStatusSettings.prioritySource.
  • Sleep Rules card in AutoStatusPage.vue next to Location Rules, reusing the existing preset picker + delete-confirm flow.
  • useAutoStatus composable picks up sleepRules CRUD with the same Promise shape as the existing location-rule helpers.
  • All integration stays opt-in (autostatus.oyasumi.enabled = false by default); if OyasumiVR isn't reachable, AutoStatus keeps working unchanged.

Acceptance

  • Sleep ON in OyasumiVR → matching ARC preset applied.
  • Sleep OFF → ARC reverts per existing returnToInitial / avatar-guard rules, no loop.
  • Schedule + location + sleep rules share one priority/preset path; no regressions in current location-rule behaviour.
  • Feature silently no-ops when OyasumiVR isn't running.

References

  • main/containers/autostatus/autostatus.ts (extend LocationRule-style config + prioritySource)
  • main/containers/autostatus/locationTracker.ts (structural template for new SleepTracker)
  • renderer/src/pages/AutoStatusPage.vue + renderer/src/composables/useAutoStatus.ts (UI + composable to mirror)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions