zacharee / HINTControl

A cross-platform app using JetBrains Compose to view and control various T-Mobile Home Internet gateways.
MIT License
144 stars 7 forks source link

External integration support #56

Open zacharee opened 1 month ago

zacharee commented 1 month ago

I've gotten a few requests for adding automations and condition-based reboots to HINT Control. I don't want to add these directly to the app, but exposing actions and data to other apps is something I'm considering.

HINT Control could become an API middleman for talking to the gateway and performing actions, by providing methods for external apps to request data, change configs, and reboot. The approach for each platform would need to be different, though.

On Android, the most obvious solution is Tasker. HINT Control could expose Tasker states to have HINT Control grab information from the gateway and return it in JSON, which could then be parsed inside the Tasker profile, and Tasker actions to run reboots or set configs.

On iOS, it might be possible to integrate with the Shortcuts framework, but I'm not very familiar with how it works or what Apple would allow.

On desktop, I don't think there's a solution for using HINT Control.

The problem I see with this approach is that it's very generic. If HINT Control is returning and expecting full JSON payloads, it's not much more convenient to use it through Tasker than it would be to perform the network requests manually; HINT Control would really only be providing automatic authentication.

Exposing more specific and granular states and actions would be possible, but require a lot more work that I'm not sure I'm willing to put in.

I'm leaving this issue here as a reference. I know about the demand for automation support, but I don't know if this is the app that should be doing it.

zacharee commented 1 month ago

1.12.0 includes Tasker and Shortcuts integrations to reboot the gateway on Android and iOS.