thecowan / wallpanel-android

WallPanel is an Android application for Web Based Dashboards and Home Automation Platforms
https://wallpanel.app
Apache License 2.0
750 stars 103 forks source link

Run shell commands from MQTT #186

Open nagyrobi opened 4 years ago

nagyrobi commented 4 years ago

This request is from users running WallPanel on rooted Android devices. Having SU and BusyBox installed allows to run shell commands. For example turning off or on the screen is possible on most tablets using a shell command. Also many useful things can be done like starting or closing apps(intents), reboots, etc.

The best would be to simply receive these as MQTT payloads and execute them.

Add a button in settings "Chek if root is available" (just run "su") that will trigger SuperSU or whatever manager the user has to add WallPanel to the whitelist.

nagyrobi commented 4 years ago

:-(

thanksmister commented 4 years ago

We can keep this feature open, it can be useful for a later time.

nagyrobi commented 4 years ago

Please consider this feature request to be part of the open source functionality (as it is targeted to devices running openness), and it does not require any more proprietary software modules/libraries to be involved.

thanksmister commented 4 years ago

This has been added to the backlog of feature requests for WallPanel.

nagyrobi commented 4 years ago

Thank you.

thanksmister commented 4 years ago

Add a button in settings "Chek if root is available" (just run "su") that will trigger SuperSU or whatever manager the user has to add WallPanel to the whitelist.

You have to expand on this better, how do you issue the command on a device with root from an Android tablet?

ulno commented 4 years ago

I am seeing @thanksmister being totally swamped with feature requests (yes, it's a great project!), but wouldn't it make sense to revert some of these requests to pointing in the documentation to running ssh or your own mosquitto_sub-based script on termux? I have several tablets and old phones where wallpanel and termux co-exist quite happily. And if your device is rooted with busybox anyways, you already have sshd.

Having a well working web-panel with an option of a screen-saver (guess I am preferring some more "unix-philosophy" here) seems to me quite perfect already. Most other features can easily be run from a script in termux (or natively through ssh in busybox).

Just wondering.

I even wonder if thanksmister producing or gathering central case-based documentation for that and making this (only?) available for potential patreon-supporters would be a good way to some paid contributions to this project?

thanksmister commented 4 years ago

@ulno Yeah, termux is a good solution, you don't even need root to run termux. You can run your own broker or even Node-Red with termux. I think user's want this app to do just about everything, as you can see from the feature list.

Might be nice to have some documentation for this project for power users on how they can achieve some of these features in other ways. I am not worried about money as much as time. I cannot possibly handle all the feature requests.

I am glad you chimed it, it did not occur to me that there are a lot of features that could be handled by this approach. I feel like many people request features that duplicate features they can install with other applications as well.

thanksmister commented 4 years ago

For those interested in running Node-Red on Android, here is a guide https://nodered.org/docs/getting-started/android. The application in the Play store actually handles motion detection and a slew of other interactions with the device.

thanksmister commented 4 years ago

@ulno I think what I will do is start listing things that can be done through other apps or through Termux or rooted options as either "documentation required" instead of feature requests. This way, I can capture these types of requests and hopefully get contributes to update the docs with power feature options. Thanks again for your input.