Messages app plugin

Plugins that users have built. NOTE: plugins that were developed for Indigo versions older than 2022.1 will have to be updated to work with Indigo 2022.1 (Python 3 - see this blog post for details). If the plugin listed here is not in the Plugin Store (which will show updated plugins) then you will need to ask on the appropriate thread below if it has been updated and where you get get the update.
User avatar
Colorado4Wheeler
Posts: 2794
Joined: Mon Jul 20, 2009 10:48 am
Location: Colorado

Re: Messages app plugin

Post by Colorado4Wheeler »

Try making your props a dictionary rather than a list and do it before the call and simply pass the dict to the executeAction rather than building it there. You used "[]" instead of "{}" for your definition, so list instead of dict.
My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here
User avatar
Colorado4Wheeler
Posts: 2794
Joined: Mon Jul 20, 2009 10:48 am
Location: Colorado

Re: Messages app plugin

Post by Colorado4Wheeler »

rycardo wrote:Could it be your mix of single and double quotes?
You can single and double quote interchangeably in Py, and it comes in handywhen you need to quote strings so these two statements are accurate:

Code: Select all

indigo.server.log ("Hello '{0}', I'm very happy to meet you".format("Joe"))
indigo.server.log ('Hello "{0}", I'm very happy to meet you'.format('Joe'))
rycardo wrote:you might need quotes or double quotes around your JSON data.
That's not JSON data, it's a Py list as he pasted it and a Py dict as defined by the Indigo API.

Of course it's been a long day of coding and everything is blurry so he could have written C++ as far as I know :lol:
My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Messages app plugin

Post by jay (support) »

You're very close: deviceID (the second param) should be deviceId in the executeAction call (notice the lowercase 'd' at the end):

Code: Select all

messagesPlugin.executeAction("sendMessage", deviceId=184726458, props={'message':"Hello Bruce", 'service':"E:*******@gmail.com", 'handle':"+15555551212"})
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
bhough17
Posts: 13
Joined: Thu Jan 04, 2018 6:15 pm

Re: Messages app plugin

Post by bhough17 »

Nailed it.

Thanks
User avatar
rbdubz3
Posts: 232
Joined: Sun Sep 18, 2016 9:33 am
Location: San Diego, CA

Re: Messages app plugin

Post by rbdubz3 »

Thanks for the nifty plugin @gazally - Any chance it can be used to send a jpeg image or wav audio file in addition to text?
I automate because I am lazy :D - My Plugins: viewforum.php?f=309
User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Re: Messages app plugin

Post by Different Computers »

I'm not entirely clear about the structure of this plugin. Does/will Indigo's AppleScript deprecation cause this plugin to stop working?
Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana, Yamaha RX Receiver.
Seeker
Posts: 441
Joined: Mon Aug 05, 2013 5:08 am

Re: Messages app plugin

Post by Seeker »

i've been using this plugin since it was released. yesterday i rebuilt my mini with mojave and I must be missing something. I cannot find the select the Run Indigo Message Plugin Action in the AppleScript handler list. in messages/settings.

any idea what i'm missing now?
###Installing the Messages.app handler AppleScript

In order to receive messages from the Messages application, go to Preferences on the Messages menu, choose the General tab, and change the value of "AppleScript handler" to "Open Scripts Folder". Look where you unpacked the .zip file earlier, and you will find an .applescript file. Copy it into the scripts folder, then close and re-open Messages Preferences, and select the Run Indigo Message Plugin Action in the AppleScript handler list. Due to a bug in Messages, new messages will not always reach Indigo if Messages is in the foreground, so put an Indigo window in front of it.
Attachments
messages settings Screen Shot 2019-01-21 at 6.34.31 AM.png
messages settings Screen Shot 2019-01-21 at 6.34.31 AM.png (139.59 KiB) Viewed 4553 times
User avatar
GlennNZ
Posts: 1873
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Messages app plugin

Post by GlennNZ »

Seeker wrote:i've been using this plugin since it was released. yesterday i rebuilt my mini with mojave and I must be missing something. I cannot find the select the Run Indigo Message Plugin Action in the AppleScript handler list. in messages/settings.

any idea what i'm missing now?
###Installing the Messages.app handler AppleScript

In order to receive messages from the Messages application, go to Preferences on the Messages menu, choose the General tab, and change the value of "AppleScript handler" to "Open Scripts Folder". Look where you unpacked the .zip file earlier, and you will find an .applescript file. Copy it into the scripts folder, then close and re-open Messages Preferences, and select the Run Indigo Message Plugin Action in the AppleScript handler list. Due to a bug in Messages, new messages will not always reach Indigo if Messages is in the foreground, so put an Indigo window in front of it.
It has been removed by Apple!. Had the same issue and was using iMsg a fair amount.

Have written a new plugin for Mojave - iMessage Plugin - in the plugin Store.
Or linked github for latest release - using wit.ai for natural language processing - will be in plugin store soon.

See it’s thread - does everything and more! Slightly different way of operating though - check the instructions, or post if need help.

viewforum.php?f=297



Glenn


Sent from my iPad using Tapatalk
Seeker
Posts: 441
Joined: Mon Aug 05, 2013 5:08 am

Re: Messages app plugin

Post by Seeker »

thanks Glenn, that was easy. up and running again!!
Post Reply

Return to “User Plugins”