Texting from Python

Posted on
Wed Sep 21, 2016 4:12 pm
dz1rfj offline
Posts: 135
Joined: Mar 13, 2016

Texting from Python

:?:

I found this script that lets me send a text from my mac to whomever. While it seems to work, it does not alert me on my phone, it does send the text, but I would need to manually check my ohone and I would see a text, with no notification popping up on the phone.
Is this because it is sent from my own icloud account on the Mac using iMessages?

Is there a way to force an alert? Is there a better way? I could not understand how to configure pushover, unsure how to register each iPhone as a device, I do not want to have to have pushover running in the background on each iDevice just to get a notification....

I like this method, as I want to send the dog sitter messages, and do not want to use a system that requires prior authentication ahead of time...

While I am not versed at all in python, this would appear to be an applescript, but it actually works as a python script..

I did not see how to configure the Messages plugin to send messages.....Anyone have a better way of sending simple texts? I want something simple like the code below.

Thanks!

:

Code: Select all
import os
cmd = """osascript<<END
tell application "Messages"
send "!!  Upper Gate has been opened !! " to buddy "804-255-6514;804-921-4744" of (service 1 whose service type is iMessage)
end tell
END"""
def send_Message():
     os.system(cmd)
send_Message()


Thanks
-Brian

Posted on
Fri Sep 23, 2016 11:45 pm
mclass offline
Posts: 312
Joined: May 13, 2015
Location: Melbourne, Australia

Re: Texting from Python

Hi! Check out the excellent Twilio plugin. Needs a Twilio account but a free one might suit.
mclass


Sent from my iPhone using Tapatalk

Posted on
Sat Sep 24, 2016 12:52 am
BassMint offline
Posts: 105
Joined: Dec 24, 2013

Re: Texting from Python

I use this:
http://forums.indigodomo.com/viewtopic.php?f=134&t=15532
I set up another iMessage account for the mac running the server.

Posted on
Thu Sep 29, 2016 6:33 am
dz1rfj offline
Posts: 135
Joined: Mar 13, 2016

Re: Texting from Python

Thanks, buying a separate Mac , and I'll setup its own iCloud account. Thanks for sharing your method!


Sent from my iPhone using Tapatalk

Thanks
-Brian

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests

cron