you can probably also use Tasker for things like this too just send an intent to tasker from the app and have tasker listen and process the command
This resource is great! Has anyone been able to figure out how to open Google TV > Remote view with intent?
Edit, package name: com.google.android.videos/com.google.android.videos.GoogleTvEntryPoint
Just missing intent_action
I want an automation to copy files off my Android phone to my NAS when I am on my home wifi and I arrive. But I need help with the command_broadcast_intent
- I have the automation working great which sees me arriving.
- I have an app (mixplorer) which can receive intents and copy files to my nas. It has an auto tasker which will happily copy files over at set time and works well. But now am I trying to automate the process such that it copies a certain directory pair when I get home (what can I say — just playing here)
All the app examples given by the app are for tasker, automagic etc but I wanted to see if I could do it with a home assistant ‘command_broadcast_intent’. I am having problems trying to ‘translate’ the tasker action to a home assistant automation.
I have, which doesn’t work (indents aren’t the problem - sorry for the cut and paste)
- service: notify.mobile_app_my_mobile
data:
message: command_broadcast_intent
data:
intent_package_name: com.mixexplorer
intent_action: com.mixexplorer.ACTION_TASK
intent_class_name: com.mixplorer.BroadcastReceiver
intent_extras: task:copy,mode:KEEP_BOTH,regex:false,src:/path2/source,dst:smb://xxx.xxx.xxx.xxx:445/path2/dst
vs the example given
**Tasker**
**Action** :
com.mixplorer.ACTION_TASK
**Extras** :
task: copy or move or archive
src: /path/to/source-file-or-folder
dst: /path/to/destination-folder
mode: OVERWRITE or OVERWRITE_MODIFIED or SKIP or KEEP_BOTH
regex: true/false
**Package** : com.mixplorer
**Class** : com.mixplorer.BroadcastReceiver
**Target** : Broadcast Receiver
I seem to be missing the target? Any suggestions?
I am trying to use Home Assistant Companion App as the “go between” between various apps, rather than load another app ie Tasker, if not neccessary.
Thanks
this extra is not being split properly, you may need to try URL encoding like the docs suggest. The issue is that each extra is split by a comma but the name and value are split by :
and dst:smb://....
is already interfering with that split.
https://companion.home-assistant.io/docs/notifications/notification-commands#broadcast-intent
Duhhh. I should have seen that. Thanks. Will give it a go.
Good day, looking for some guidance.
What would be the equivalent in android to below trigger:
trigger:
- platform: event
event_type: ios.became_active
Thank you
A bit unrelated here however you want to enable the app importance sensor and the state will be foreground when open
Thank you for your prompt response.
This will serve same purpose.
Much appreciated
Good day, can you confirm if this still creates the sms for you?
It’s no longer working in a samsung mobile.
Thank you
No it does not work. I never used it since it wouldn’t send the sms.
There was a change in the commands a few months ago so the format is not up to date.
I tried to make it the new format but I can’t do it. Not sure what to do with the “tag” in the new format.
Notification Commands | Home Assistant Companion Docs (home-assistant.io)
intent_action
@Hellis81 @dshokouhi thank you.
I tried this with no luck
`
service: notify.mobile_app_juan_android
data:
message: "command_activity"
title: "smsto:3009"
data:
channel: "com.google.android.apps.messaging"
intent_action: "android.intent.action.SENDTO"
group: "address:3009,sms_body:DXB H 52784 S 8"
`
Isn’t intent_action title?
I get to this point here:
service: notify.mobile_app_andreas
data:
message: "command_activity"
title: "smsto:0123456789"
data:
intent_package_name: "com.google.android.apps.messaging"
intent_action: "android.intent.action.VIEW"
intent_extras: "address:0123456789,sms_body:TEST"
but I don’t know what title is supposed to be
Nevermind… I see I read at the wrong place in the documents.
service: notify.mobile_app_andreas
data:
message: "command_activity"
data:
intent_uri: "smsto:0123456789"
intent_package_name: "com.google.android.apps.messaging"
intent_action: "android.intent.action.VIEW"
intent_extras: "address:0123456789,sms_body:TEST"
works.
Why isn’t the forum striking as it should? It looks correct in the preview.
Thank you very much. Works !
Where do you find the info for the intent_uri and extras?
intent_uri: "smsto:<??????????????>"
intent_package_name: "com.google.android.apps.messaging"
intent_action: "android.intent.action.SENDTO"
intent_extras: "address:<??????>,sms_body:TEST"
is that the number you want to send the sms to?
if so then what is the format?
I get an “unable to send activity copmmand, please check the command format”.
tried like this (not my real phone number):
service: notify.mobile_app_my_mobile_app
data:
message: "command_activity"
data:
intent_uri: "smsto:2605567896"
intent_package_name: "com.google.android.apps.messaging"
intent_action: "android.intent.action.SENDTO"
intent_extras: "address:2605567896,sms_body:TEST"
Your intent action is not correct.
It should be VIEW
I tried that from your example as well first and it didn’t work.
I then saw the other example above and tried that.
according to googles documentation, this extra I don’t think exists.
I tried again…no luck:
service: notify.mobile_app_my_mobile_app
data:
message: "command_activity"
data:
intent_uri: "smsto:2605567890"
intent_package_name: "com.google.android.apps.messaging"
intent_action: "android.intent.action.VIEW"
intent_extras: "sms_body:TEST"
intent_type: "text/plain"
and:
service: notify.mobile_app_my_mobile_app
data:
message: "command_activity"
data:
intent_uri: "smsto:2605567890"
intent_package_name: "com.google.android.apps.messaging"
intent_action: "android.intent.action.SENDTO"
intent_extras: "sms_body:TEST"
intent_type: "text/plain"
same error.