Florianisme / WakeOnLan

A Wake on Lan Application for Android
https://play.google.com/store/apps/details?id=de.florianisme.wakeonlan
GNU General Public License v2.0
195 stars 17 forks source link

Consider implementing SSH to allow poweroff and reboot commands. #7

Closed ghost closed 10 months ago

ghost commented 1 year ago

The app is beautiful and works well. Thanks for sharing it!

I would appreciate an option to power off and reboot a machine as well. Similar applications achieve this with SSH.

Florianisme commented 1 year ago

I have been wanting to implement this feature for some time aswell. Will be a bigger task for sure as implementing SSH functionality can really be a rabbit hole..

Florianisme commented 1 year ago

I have just sent the first shutdown commands to my local machines and it's working well for me :) I can upload a signed apk here if you want to try it out yourself

ghost commented 1 year ago

Sure! That'd be nice.

Florianisme commented 1 year ago

Alright, give it a try then. I had to zip it as Github would not allow for me to upload the APK directly.

Looking forward to your feedback! app-release.zip

ghost commented 1 year ago

Works well. No issues. Thanks a lot for implementing this!

Perhaps worth adding a button to test the ssh connection (quick way to troubleshoot whether ssh connection is failing or the command itself) if people run into problems.

I would personally find a reboot button useful but obviously that's just personal convenience. Anyways power off works flawlessly, and once again thanks!

Florianisme commented 1 year ago

Thanks a lot for the feedback! One more question: Do you think that the text below the "Command" field is descriptive enough?

Yes the test button is a good idea. I thought about implementing a global "protocol" view which would include logs for SSH shutdown and WOL packages. But I think the test button with a result dialog would suffice for now.

I would keep the issue open until the feature is merged into master :)

ghost commented 1 year ago

One more question: Do you think that the text below the "Command" field is descriptive enough?

Yeah I think it's fine.

Florianisme commented 1 year ago

Moving this to the beta channel tonight. Should be available as version 1.8.1

Florianisme commented 1 year ago

Note for improvement: "Timeout expired" is shown as an unknown error when executing a command, which triggers the sudo password prompt. Add hint in description and possibly contents of the OutputStream of the command?

Florianisme commented 10 months ago

Finally released with 1.9.0