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

Tasker integration #44

Open
sik0vny opened this issue Jan 23, 2019 · 8 comments
Open

Tasker integration #44

sik0vny opened this issue Jan 23, 2019 · 8 comments
Labels
question Further information is requested

Comments

@sik0vny
Copy link

sik0vny commented Jan 23, 2019

Tasker is a powerful scripting system with unlimited possibilites. Integrating it with Gotify, will add another dimension to it:)
Tasker would react on Gotify's messages from defined apps or on a keywords/regex found in messages by running a user's defined script.
F.ex:

  • send http request to a server
  • play alarm sound
  • write sms
  • download a file from link in the message

Here is link to the documentation:
https://tasker.joaoapps.com/plugins.html

@eternal-flame-AD
Copy link
Member

eternal-flame-AD commented Jan 23, 2019

Why not simply let tasker match the text in the notification and take corresponding actions?:) I think that is basically the same as writing a dedicated custom Tasker Event

Plus there is another one reason I am not very in favor of implementing a Tasker Plugin. This is relatively personal but I still wanted to share it with you and the project maintainers. It is in some way promoting a paid and closed-source service(Tasker is a paid app). I am very grateful to the maintainers of Tasker for creating such an awesome application that makes automation on Android devices so powerful and easy-to-use, but it is still a closed-source and paid service, Gotify relieved me from expensive paid and hosted services such as Pushbullet. I really wish to keep it simple and open so I am not very in hope of adding this extension.

@jmattheis jmattheis added the question Further information is requested label Jan 23, 2019
@jmattheis
Copy link
Member

Well said @eternal-flame-AD, I agree with you. One key feature of the Gotify project is, that it's independent, so no third party systems are used (like f.ex. FCM). Also, I don't really like having a dependency to tasker.

Are there any good features that aren't supported without implementing the tasker plugin thingy?

@dugite-code
Copy link

dugite-code commented Jan 25, 2019

You don't need to design specifically for Tasker you can set it up for any Locale compatible apps. It's fairly well established and you have Tasker, Locale and Automate all providing support.

That said you could skip all that and just issue an intent to the Broadcast Receiver and Tasker can be set up to intercept that. The advantage is that Tasker Automate and even FOSS automation apps like Easer LibreTasks support basic intent capture out of the box where notification interception usually requires additional plugins.

@sik0vny
Copy link
Author

sik0vny commented Jan 25, 2019

@dugite-code i agree. That sounds like a good compromise and will not be dependent on any particular application (so: no flame wars).

One of the use case for this can be that for notifications from certain app/token, user will turn off visible notifications, and just pass-through Intents. And inside those intents some more structured data can be transmitted, f. ex JSON or XML file. This can be used then to feed some more complicated processes in other applications.

@eternal-flame-AD
Copy link
Member

eternal-flame-AD commented Jan 25, 2019

Thanks for your ideas. I think this would definitely supercharge the power of gotify. I am now voting up for this feature 👍

Firstly, I assume that the feature we are asking in this issue is no longer about simply connecting gotify messages with automation apps, but to enable gotify android client to take customized actions on messages(f.ex. no notification; fire an intent; add a button in the notification;), rather than simply firing a plain notification.

Secondly, the feature would need extra data in the message, which requires API changes such as I proposed in gotify/server#120. I think this issue is dependent on gotify/server#120.

@sik0vny
Copy link
Author

sik0vny commented Jan 25, 2019

Thank you @eternal-flame-AD, I'm happy we found a middle ground:) I've seen your other posts/ideas about passing structured data with Gotify, and I'm fully supporting them.

@buergi
Copy link

buergi commented Mar 27, 2021

There is a very simple solution for Tasker integration (and probably others as well) which has been available ever since (to be precise since 2018, ee1a841) which requires no plugins or other integrations to work. I wonder that nobody mentioned it. The idea is to catch the broadcast intent sent by gotify-android when it receives a message, WebSocketService.java:219.
As I didn't find any documentation about it as well, I like to briefly explain it here for others to find it:

Create a new profile Event > System > Intent Received and set Action to com.github.gotify.service.WebSocketService.NEW_MESSAGE
In the corresponding task you can access the complete message including all extras (as JSON string) in the %message variable. You can parse and filter it using simple string operations or even process it e.g. using AutoTool Json Read

To dismiss the gotify notification either just hide the whole priority level you like to use for "silent messages" in Android's notifications settings, or catch and dismiss it with AutoNotifications Cancel.

@ajl000
Copy link

ajl000 commented May 7, 2021

Is this why people have suggested end-to-end encryption for Gotify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

6 participants