Open sik0vny opened 5 years ago
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.
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?
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.
@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.
Thanks for your ideas. I think this would definitely supercharge the power of gotify. I am now voting up for this feature :+1:
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 https://github.com/gotify/server/issues/120. I think this issue is dependent on https://github.com/gotify/server/issues/120.
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.
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.
Is this why people have suggested end-to-end encryption for Gotify.
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:
Here is link to the documentation: https://tasker.joaoapps.com/plugins.html