Raphiiko/OyasumiVR

[Request] More power automation options

shinenami opened this issue · 12 comments

Would love to have that option if possible:
In hardware automations -> Power Automations, an option to disable controllers/trackers when both conditions met - in sleep mode and controller/tracker battery goes below a certain %.
For example, I want it to disable controllers when sleep mode is active and controller battery goes below 10%
But right now you can't do that if you use automatic sleep detection based on movement
Hope I explained it good enough

Funnily enough, this is how the initial few versions of Oyasumi used to work!

I understand why this is a feature you want as I could see this being useful myself, but right now I'm not certain if I want to add it. Let me explain:

OyasumiVR currently has two "categories" of automations:

  • Automations that turn the sleep mode on or off
  • Automations that do something in response to the sleep mode turning on or off

I try to stick to this pattern for any automations that are added for two reasons:

  1. Prevent automations triggering each other making things too complex.

    For users (me included) it can be quite confusing when automations have unexpected triggers, especially when those triggered automations trigger other automations (and so on). By sticking to these categories, finding out the reason why things happen in OyasumiVR remains simple enough for users to figure out. At most, you have an automation from category A trigger an automation from category B. The length of the chain never goes beyond two automations.

    In this case, the automation you're suggesting does not fall into one of these categories. This automation turning off the controllers directly, could indirectly trigger enabling the sleep mode (Through the "Enable sleep mode when all controllers are turned off" automation), which could then trigger other automations. As an example: Say you set it up to only turn off controllers, but then set up another automation to turn off your trackers when sleep mode is enabled, you now have a situation where both the controllers and trackers turn off, even though the user has only selected their controllers to be turned off. This is complexity I'd like to avoid.

  2. Prevent feature-creep by adding things that are not strictly sleep related

    By making sure that new automations fit either of these two categories, they are sure to be related to VR sleeping in some way or another. There are a lot of things I want to build, but not all of them are a complete fit for Oyasumi, so like this I can keep on track and only spend time adding functionality that is relevant to OyasumiVR itself.

I could still see this feature being somewhat sleep related, so the second point is definitely less of an issue than the first.
If this is something people want maybe we could add it at some point, but I'll have to find a way of implementing this in a way that keeps things simple.

@Raphiiko
Sorry for long silence, forgot about the app for a while, mostly because it hadn't that automation, so i couldn't use it how i wanted. Still love it tho, and especially UI design is beautiful. I appreciate the work you have done.

I can see where you're coming from, the overlap of automations is really somewhat unfortunate in this case and definitely needs some thought, and i guess it is somewhat a reason why i had to request this setting.
For me, however, this feature is absolutely sleep related and i'll try to explain the exact use-case that i have in my mind:
I would turn on:

  1. Automatic sleep detection based on the movement,
  2. Auto-accept invite request when sleep mode is enabled,
  3. Status automations when sleep mode is enabled,
  4. Sleep animations when sleep mode is enabled and all trackers are turned off,
  5. Brightness Automations and
  6. Resolution Automations both depending on when sleep mode is active.

As you can see, I'd have automatic sleep detection with many automations enabled that depend on sleep mode being active, and power automation is not on that list. Why? Because I still want my body to be tracking for as long as possible.
However, when i'll wake up i want to still have some juice in my controllers and trackers, and that is why i need the automation to disable controllers and trackers below certain %.

I'd set it so it disables controllers and trackers when they are below 10%. That would then enable sleep animations because all conditions would be met (number 4 in the list i typed previously). Thats my ideal use-case. Sorry if that wasn't clear enough, i'm not a native speaker so please feel free to ask if you didn't understand something. I would really love that automation.

As a (temporary) solution for overlap my suggestion is, when you enable a function/automation that would cause an overlap, a popup will appear and say that if you enable that function the other one will be automatically disabled (it will say which one).

Gotcha, I see how this could be useful. A generic solution with a warning dialog that informs the user about a possible conflict (with options like "Leave unchanged", "Disable Other", "Keep Both") is probably the clearest way I can think of handling this.

I probably can't get to it very fast since I've got a few other features on my plate atm, but I'll hopefully get to it in some future version.

Would love an option to hibernate my pc or put it to sleep (haha) instead of performing a full shutdown

Gotcha, I see how this could be useful. A generic solution with a warning dialog that informs the user about a possible conflict (with options like "Leave unchanged", "Disable Other", "Keep Both") is probably the clearest way I can think of handling this.

I probably can't get to it very fast since I've got a few other features on my plate atm, but I'll hopefully get to it in some future version.

Thank you! Take your time

@shinenami I've implemented this feature on develop. It should be in the new development build in about half an hour, and will come with the next release!

image
image

@ctrlBIRDdelete I've implemented this on develop, and will also come with the next release.

image

Closing as these features have been implemented.

Thank you^^

@Raphiiko oh though it's usable, its not exactly how i imagined it. Can you please add an option so it only disables them when sleep mode is active? Heres image for reference:
image
The reason is i dont want it to suddenly turn off when my controller goes below threshold and im not about to sleep

Gotcha, I'll take a look at it this week, should be a quick add!

This will be in the new development build in a couple of minutes!

afbeelding