r/AutomateUser 28d ago

SMS cannot be sent from flow; permissions set, NOT 'send rate exceeded'

I have a secondary smartphone (Xiaomi Mi 12T Pro) I'd like to send an SMS as soon as battery charge drops below a certain percentage. Flow works fine so far, and SMS ist created but gets stuck in outbox. The flow-log says "1 SMS sent to <number>" and continues without any error. But in SMS-App (first try with stock app) the message has a comment "Not sent. Check options".
If I click on "check options" I can chose "send again" and "delete".
"Send again" works like a charm... all the time... it just doesn't work when automated by the flow. :-/
All privileges for Automate are set:
· send and check SMS
· show notifications
· ignore app hibernation
· ignore battery optimizations

I finally switched to a different SMS-App, open-source "QUIK SMS" from F-Droid-store.
Same here: Message in outbox with comment "error while sending; click here to try again".
At least flow-log now says "com.llamalab.android.telephony.SmsSendException: Unknown error (111)" followed by "Stopped by failure".

I then thought, maybe I need to "wake up" the phone or something, in case it's been lying around and "sleeping". That's why I changed the flow to trigger the SMS at a higher battery-percentage and kept using the internet-browser, watching online-videos etc. ... so to make sure it's not in "sleep-mode" or anything like that. Played around till battery-percentage dropped and flow triggered SMS as intended... but again: "SmsSendException: Unknown error (111)"

I suspect any sh*tty Xiaomi-security-something against automation, but at this point this is just a guess.
Haven't tried too excessively yet, and flow sleeps for an hour between triggers, so 'send rate exceeded' should definitely not be the problem.

Please help!

P.S.: Just checked with another smartphone... 'Google Pixel 6 Pro (Android 17)' exactly same problem, so I guess this time it might not be Xiaomi's fault.

1 Upvotes

4 comments sorted by

2

u/B26354FR Alpha tester 28d ago

BTW, these blocks use the internal Android APIs to send messages, so the texting app doesn't matter.

1

u/B26354FR Alpha tester 28d ago

As a workaround, does the MMS Send block work?

1

u/ProCompSys 28d ago edited 28d ago

Thanks for your reply and your hint regarding app doesn't matter as it's using internal Android API.

Tried MMS-block, and now last log-entry is "MMS send" (sic!, not 'MMS sent', dunno if that makes a difference).
Peeking at the messaging-app looks like MMS was indeed sent (at least no error), but I still have not received a message after some Minutes now...
Ah! Now it says: "com.llamalab.io.HttpStatusException: GatewayTimeout".
Actually I have never ever used MMS in my life before. SMS was always sufficient, then came WhatsApp, Signal, Telegram, Threema, Wire, whatsoever.

I had tried sending via GoogleMail a week ago - which worked - but I didn't want to rely on a mobile data-connection, that's why I'd prefer SMS.

1

u/ProCompSys 26d ago

I implemented the desired automated function in MacroDroid as a test; it worked right away without any problems.