Bug 339685

Summary: Add plugin for computer power management
Product: [Applications] kdeconnect Reporter: Daniel Vrátil <dvratil>
Component: android-applicationAssignee: Albert Vaca Cintora <albertvaka>
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: albertvaka, bansal.ashish096, nicolas.fella, simgunz, wolfram
Priority: NOR    
Version First Reported In: 0.7.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Daniel Vrátil 2014-10-04 23:22:33 UTC
I often listen to music before I go to sleep, or watch a movie on my computer from my bed, after it finishes I still have to get up, go to the table and suspend the computer (or turn it off).

It would be nice to have a plugin that would allow me to suspend to disk, suspend to RAM, log out, reboot and turn off my computer remotely.

Another usecase (once KDE Connect works over the internet, not just local network) might be to be able to turn off your computer after you leave your house in the morning and just leave the computer running to finish some download for example (or you just simply forgot to turn it off), and you don't want it to run all day before you return from work/school/...

Reproducible: Always
Comment 1 Daniel Vrátil 2014-10-04 23:24:01 UTC
Side node: I know that now I can do this via the "Touchpad control" screen, but it's really clumsy to navigate, especially when you are further away from the monitor and can't properly read the labels - also it requires you actually seeing the screen, hence it would not work "remotely".
Comment 2 Albert Vaca Cintora 2015-11-12 00:51:35 UTC
Is there a Freedesktop DBus interface to access the battery level? Or any other simple way, without having to use something like Solid. This way we could have bi-directional battery report. In Qt prior to 5.2 there was QtMobility, which provided access to things like the battery, but that's no longer the case :(

About remote powering off the computer, we are going to add a generic "run command" plugin, where you can pre-define any command you want to execute from the phone. That should cover that use case.
Comment 3 Ashish Bansal 2015-11-12 10:46:03 UTC
(In reply to Albert Vaca from comment #2)
> Is there a Freedesktop DBus interface to access the battery level? Or any
> other simple way, without having to use something like Solid. This way we
> could have bi-directional battery report. In Qt prior to 5.2 there was
> QtMobility, which provided access to things like the battery, but that's no
> longer the case :(

upower -> http://upower.freedesktop.org/docs/Device.html

> 
> About remote powering off the computer, we are going to add a generic "run
> command" plugin, where you can pre-define any command you want to execute
> from the phone. That should cover that use case.
Comment 4 Simone Gaiarin 2016-08-20 09:47:20 UTC
*** Bug 357783 has been marked as a duplicate of this bug. ***
Comment 5 Simone Gaiarin 2016-08-20 09:51:30 UTC
Even though the run command plugin allows to create custom commands, and it works fine to suspend the PC. I suggest to populate it with some defaults for normal users, like the power management commands. I think the use case suggested by Daniel Vrátil is a pretty common one.

Creating a script with a dbus command to suspend your pc seems a action for power users.
Comment 6 Wolfram Schlich 2016-08-24 15:08:08 UTC
+1 for this feature!
Comment 7 Nicolas Fella 2018-08-04 17:10:25 UTC
I think this is an excellent use case for the run command plugin. Feel free to reopen if you have an idea that is not covered by it