SamuKata
João Dias
João Dias

patreon


Sneak Peek - Something Big Is Coming to Tasker!

I've decided to add something to Tasker that could open a lot of new automation possibilities, and you're the first ones to know about it!

Check out

Remote Action Execution!

Check out the video demo above to see how it works.

Remote action execution gives you a new field in some actions that allows you to run that action remotely on one of your other devices!

Remote action execution is totally transparent to you! It looks and behaves just like any other action. The only difference is that it runs on another device!

You can use remote actions anywhere in your tasks and they will behave just like you expect them to!

For example, you could use the Get Location v2 action to get the location of a remote device and then do something with that location on your device, like opening a map with it for example!

There are only a few compatible actions at the moment:

The Command one in particular is super important because you can do just about anything on a remote device with it using the AutoApps Command System! For example, you could have a command like "say=:=hello" and then on the other device take that command and make it use the Say action with it!

I think this has huge potential! 😁

Let me know what you think, and enjoy!

Here are the Patreon exclusive links:

Here are the full instructions on how to set it up: https://tasker.joaoapps.com/userguide/en/fcm.html

Sneak Peek - Something Big Is Coming to Tasker!

Comments

If it's a matter of FOSS notifications without Google, please check out UnifiedPush. I'm not a Dev, but I understand it's only a line or two of code to add support to an app

Strider

Thanks! Can you just clarify how exactly users would be able to use that with no extra work required from me? Wouldn't I have to code something that uses their APIs instead of Firebases?

João Dias

The one I mentioned, Supabase, is on GitHub: https://github.com/supabase/supabase

Krayon

Thanks for the info! Do you have any documentation on that?

João Dias

@João Dias: As stated, there are alternative implementations of Firebase that one can self host. If you allow the user to define the endpoint settings manually, it relieves you from having to resolve this issue yourself in direct way. Users will then be free to use whatever solution they like, and if and when another compatible push service is launched (eg Mozilla), users need only set those details - no extra work from yourself required.

Krayon

Unfortunately there are no good alternatives right now, because this relies on Google FCM (Firebase messaging). Maybe in the future we can find other push services that work reliably, but I doubt it unfortunately.

João Dias

This would be a welcome feature. There's already similar solutions but not built right in to Tasker. Any thoughts on how this will work without a dependence on Google? Is there an advanced manual server/port option for Firebase clones (eg supabase) or would one have to do domain name spoofing and custom CA certs on a rooted device to get around the Google requirement?

Krayon

I'm working on it as we speak. Unfortunately Google takes time to address these issues, sorry!

João Dias

Hi, hope you will have a great holiday. Can you please let us know when you will fix Autosheets/Google Drive error? THanks

Razvan Baban

Nice!

GoldMaster

Ok, fixed it for next release :) I will probably put out a beta with this today. Thanks!

João Dias

Yeah, I was able to recreate it and I fixed it now :) I'll put this out in beta today so everyone can try, thanks!

João Dias

12.24.42/Ew add wait type RemoteAction1 time 2147483647 12.24.42/Ew add wait type RemoteAction1 done 12.24.42/E add wait task 12.24.42/E Error: null 12.24.42/E Error running remote action: Failed to send message: 400 { "error": { "code": 400, "message": "The registration token is not a valid FCM registration token", "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.firebase.fcm.v1.FcmError", "errorCode": "INVALID_ARGUMENT" } ] } }

GoldMaster

What error does it show if you do that? Thanks!

João Dias

Yes, that did work with 1 small glitch. Before doing anything I checked my Google drive Tasker folder and found 2 FCM folders. I deleted both before proceeding with your instructions. After deleting the file paths and the reboot -> When I set the files on my pixel 7 (which was the device that ad the previous issue) It created 2 FCM folders again. Setting the the files on my TAB 7 only placed the Tab 7 into 1 of the folders. All worked as expected and I was able to delete the extra FCM folder without issue. So long story long.... All seems to be working as expected.... This is a truly awesome addition.... I don't suppose this would make any easier to be able to actually directly select a list of actions on one device and be able to directly transfer them to a different device? :) Were you able to recreate the other issue I mention? IE.. if you delete / rename / move the 2 files on your device Tasker seems to lock up and I was unable to open The Tasker UI at all. I needed to replace the files to there original location and reboot before Tasker would respond.

Richard Davis

Sorry for the multiple messages i am sending but i think i have found a problem when trying to put the FCM token inside a variable with "Variable Set" and use it inside the "Remote Device". It returns with an error for some reason.

GoldMaster

It works great! Thank you! When do you plan to publish this feature on reddit? I thought you planned it for today And do you know a way to send to a command or an action to multiple devices in one go?

GoldMaster

Yeah, I need to add a way for people to easily see their tokens :) About the action, you have to set the filter to something like "Action=:=*" since it uses Tasker pattern matching: https://tasker.joaoapps.com/userguide/en/matching.html That should make it work :) Hope this helps!

João Dias

I think this is the root of your issues. :) I should've been clearer. You HAVE to use the same 2 files on all of your devices for it to work, otherwise you'll get errors like the one you got above. To get rid of your issue do this: - Open Tasker on all your devices > Preferences > Misc > Remove the files paths from the 2 fields (make the fields empty) - Reboot your devices - Make sure all your devices have the exact same 2 (service account and Firebase) files and use them in Tasker like you did before This should now make it work for you. Let me know if it does!

João Dias

Thankfully Join is more often than not used separately from Tasker. :) Also, this allows for a much more in-depth and transparent integration with Tasker, so I'm all for that. :)

João Dias

Could you give more details on this.... "Repeat this process on all of your Android devices that you want to execute remote tasks on" . Does that mean just install those two files on each device or redo the entire process and make a new project for each device?

Richard Davis

How would I go about deleting the second devices set up so I could start fresh with a new Project?

Richard Davis

17.06.44/Ew add wait type RemoteAction1 time 2147483647 17.06.44/Ew add wait type RemoteAction1 done 17.06.44/E add wait task 17.06.44/E Error: null 17.06.44/E Error running remote action: Failed to send message: 403 { "error": { "code": 403, "message": "SenderId mismatch", "status": "PERMISSION_DENIED", "details": [ { "@type": "type.googleapis.com/google.firebase.fcm.v1.FcmError", "errorCode": "SENDER_ID_MISMATCH" } ] } }

Richard Davis

Oops.. I guess a return will auto post the comments... :) a few issues.... When installing the direct download Tasker lost a few permissions. It first complained that it had no permissions, however after a reboot I just needed to grant the "Files" permission and all was well. That happened on both of my devices. The first device I set up went well, However when I went to move the 2 files to a better location (after setting them up in the 'Preferences' ) the moment I moved the files Tasker locked up and would not open to the UI. I needed to put the files back to there original location and do a reboot, then Tasker recovered just fine... I was then able to copy the files to a new location and then I could change them in Tasker Preferences. The second device did not go as well. I think I tried to use the same "project" . When I made a new project things seemed to recover ok however I now have 2 of the same device names to choose from in the "Remote Device" option within the action edit screen. The second device can send to the original device fine however the original device gets this error when trying to send to the second device.

Richard Davis

Ok.... Very cool stuff here... This will be huge for us, However I fear your beloved Join might take a big hit from this.

Richard Davis

Also i am having a problem with the Command action. Setting up a profile with the command Action=:= it works. But when i want to set a multiple "buttons" like this: Action=:=button1 Action=:=button2 ... it doesn't work. Of course i am using if statement with variable %command_parameter. But i see it doesn't trigger the profile at all. I have tried to test this and execute the command in the same device that receiving the command and still it doesn't work.

GoldMaster

Update: It works! Awesome! 1. What if i want to send to multiple devices, how would i do that with only tokens? 2. Saying anyway although you probably thought or thinking about it but you should probably add this info to your documentation and maybe have a button inside Tasker to share easily the token of the device instead of people needing to go and open the file manually and copy the token. By the way i thought about it now, basically the ntfy service that people use for sending actions to their other devices is now not necessary with this setup. Amazing! less installed apps.

GoldMaster

When I will arrive home I'll try to open the file and check that. Tnx

GoldMaster

Sorry, I meant that you need to open the file to see its contents and then use that content in the "Remote Device" field in Tasker. That content is the direct FCM Token Tasker needs to be able to communicate with the other device. Does this make sense?

João Dias

I think the problem with choosing the files was using the recent files window in file manager. I will test what you told me in about 8-9 hours when I'll be back home. But just to be sure I understand you, you are saying I should copy the file from my FCM folder in my Google drive account to the other Google drive account that is using Tasker and rename it?

GoldMaster

Thank you very much! I have a feeling this particular change could be very impactful indeed! :)

João Dias

What happens when you try to select the file? About the devices only seeing themselves, are you using different Google accounts on them? If so, you should have a file for each of them in their own Google drives in the Tasker/FCM folder. If you use the FCM Token contained in that file in Tasker directly instead of the device name it should work! :) Can you please try that?

João Dias

😁

João Dias

I can’t wait to unlock the endless possibilities in how to use this, especially since I use multiple different devices for different things. Thank you so much for the continued hard work you put into Tasker! The ideas and enhancements you come up with nonstop since you have taken over Tasker’s development are the reason I will never move away from Android!

Quintin Mahan

First on my Galaxy S23 base there is a bug with choosing the json's files (needed to write the path manually). Second, i have imported the files to my two devices and using the the "Remote Device" they only see themselves and not other devices.

GoldMaster

That's huge!

SAM

Amazing!

GoldMaster

It does not! It should work on any network!

João Dias

I should! :) I'll do it on monday, thanks!

João Dias

Another question, does it need to be on local network?

GoldMaster

Ohhh that's actually something you should add to info, very cool!

GoldMaster

Thank you! :) If you try it, let me know if you can get it working!

João Dias

Very cool!

Eric Foecking

Nope! It can actually be any device!

João Dias

It's actually not that tough to setup if you just go through the steps 😁 Give it a try. Just follow everything and it should work. Let me know if something isn't clear and I'll make it clearer. Hope you enjoy it!

João Dias

I hope not 😅 Plugins still have other advanced functionality that this doesn't offer, but this allows a level of easy integration that would be impossible for plugins.

João Dias

Pretty neat. Does all devices need to have the same account?

GoldMaster

What's behind it... how does it work... the technical interface between both devices? EDIT: Ah, you have set up a page. Game changer. But tough to set up. Oh I hate those cloud console things. Getting an API key for Google Maps, it was a nightmare, totally confusing imo.

Tortuosit of Tapiola

Are you killing another one of your plug-ins?

mdediegop


More Creators