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

Enhancement Request: Provide Power Status and Events #39

Open
kay2thebee opened this issue Aug 15, 2023 · 0 comments
Open

Enhancement Request: Provide Power Status and Events #39

kay2thebee opened this issue Aug 15, 2023 · 0 comments

Comments

@kay2thebee
Copy link

This is a great tool and I'm using it in conjunction with TAustin's Smartthings Edge driver with great success. Thank you!

Clients like TAustin's and end users like myself could benefit from having insight into power management on the system. As it stands, I'm only able to control the PC power state (and thus the associated devices in my scheme) when it is fully active (e.g., not suspended or pending user log in). The ability to learn about events and the current power management parameters would greatly increase the utility that's already here.

Here's a potential approach:

  1. Subscribe to Win32 power events: suspend, hibernate, shut down as well as resume from suspend/hibernate, and power up as well as changes to the active power plan (not sure if there's a Win32 event for that last one). There may be more such events of interest, like starting and ending versions of these and even one indicating that the system is up but pending user log in.
  2. As was suggested earlier, provide a setting such that the system can WoL from a suspended state.
  3. Respond to shutdown and other requests with success/failure or, better, a status code.
  4. Support an event subscription model to report PC power events to network clients. Client's like TAustin's PC Control Driver would subscribe to relevant RSM power events.

With these in place, clients like the PC controller can know what’s going on and a) have the ability to reflect that status to their clients in turn as well as b) issue more appropriate power events in more situations.

These changes would obviously increase the scope of your tool beyond the handling shutdown requests and basic monitoring into a more complete solution, yet still in the realm of supporting shutdown and power state monitoring.

Thanks again for this tool and for your consideration of these or even better possibilities.

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

No branches or pull requests

1 participant