Messages app plugin

Posted on
Thu Oct 13, 2016 5:19 pm
aldera offline
User avatar
Posts: 188
Joined: Aug 30, 2016
Location: Michigan, USA

Re: Messages app plugin

petematheson wrote:
In that case I'd suggest changing to something like pushover instead. I've just switched over to getting general notifications from pushover now. iMessages are reserved just for sending photos from cctv cameras etc


Sent from my iPhone using Tapatalk


Thanks. I signed up for the 7-day trial and I'll see how it works.

Posted on
Thu Oct 13, 2016 5:26 pm
aldera offline
User avatar
Posts: 188
Joined: Aug 30, 2016
Location: Michigan, USA

Re: Messages app plugin

virgahyatt wrote:
You can be logged into more than one iCloud account within the same user profile. Some features are not available are not available to the secondary account (i.e. iCloud Drive) but messages is available. Then when you setup the device you choose the other account to send it with.


I set up the second iCloud account but it's not showing up as an option in the dropdown when setting up the device. How are you including the 2nd account on your machine? You can't add the account under the iCloud menu in System Preferences. I could only add the 2nd account under the Internet Accounts menu. I'd like to do it this way if I can get it setup. Thanks for any help.

Posted on
Sun Dec 04, 2016 10:08 am
bkmar1192 offline
Posts: 274
Joined: Sep 12, 2015

Re: Messages app plugin

Would you consider adding ability to send a photo by iMessage (link below to a sample). I just created/submitted a security camera plugin and am setting up ability to take camera snap shots. Would like to be able to send them via iMessage. I already use your messaging app so don't want to duplicate functionality.

The snapshots would always be the same file name. Was thinking of a filename field on the device that would include the file with the text message.

http://forums.macrumors.com/threads/send-image-from-messages-app-to-imessage.1471616/

Thanks for considering this.

-Bert

Posted on
Sun Feb 19, 2017 2:15 pm
benish offline
User avatar
Posts: 15
Joined: Jan 22, 2017
Location: Portland, OR

Re: Messages app plugin

I've followed the instructions carefully, but I can't get this plugin to receive messages. AppleScript handler is set to "Run Indigo…", Messages app is open but in the background, and I have sent & received multiple messages with the contact I'm trying to configure. The incoming messages show up in the Messages app, but never make it to Indigo. Debug logging is on, and no messages in the log either. I've tried setting it to receive from all senders, but that had no effect.

I was able to send a test message, with the same device / contact.

OS X 10.11.6 / Indigo 7.0.3

Any ideas?

Posted on
Sat May 20, 2017 1:40 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Messages app plugin

benish wrote:
I've followed the instructions carefully, but I can't get this plugin to receive messages. AppleScript handler is set to "Run Indigo…", Messages app is open but in the background, and I have sent & received multiple messages with the contact I'm trying to configure. The incoming messages show up in the Messages app, but never make it to Indigo. Debug logging is on, and no messages in the log either. I've tried setting it to receive from all senders, but that had no effect.

I was able to send a test message, with the same device / contact.

OS X 10.11.6 / Indigo 7.0.3

Any ideas?

Ditto - did you get anywhere with this?

Posted on
Sat May 20, 2017 1:46 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Messages app plugin

howartp wrote:
benish wrote:
I've followed the instructions carefully, but I can't get this plugin to receive messages. AppleScript handler is set to "Run Indigo…", Messages app is open but in the background, and I have sent & received multiple messages with the contact I'm trying to configure. The incoming messages show up in the Messages app, but never make it to Indigo. Debug logging is on, and no messages in the log either. I've tried setting it to receive from all senders, but that had no effect.

I was able to send a test message, with the same device / contact.

OS X 10.11.6 / Indigo 7.0.3

Any ideas?

Ditto - did you get anywhere with this?
[
Ah... fixed it!

In the script that you copy to Messages, it has the path to Indigo 6 hardcoded once.

Change the 6 to a 7 and restart Messages.

Peter

Posted on
Sat May 20, 2017 4:52 pm
benish offline
User avatar
Posts: 15
Joined: Jan 22, 2017
Location: Portland, OR

Re: Messages app plugin

howartp wrote:

In the script that you copy to Messages, it has the path to Indigo 6 hardcoded once.

Change the 6 to a 7 and restart Messages.



Yes! This worked for me too. Thank you.

Posted on
Wed May 24, 2017 5:48 am
kwijibo007 offline
Posts: 325
Joined: Sep 27, 2013
Location: Melbourne, Australia

Re: Messages app plugin

Awesome plugin, thanks very much! :D

Posted on
Mon Jun 19, 2017 10:59 pm
jltnol offline
Posts: 989
Joined: Oct 15, 2013

Re: Messages app plugin

Great Work!! :D

Since the GoogleSMS plugin went belly up a few years ago, I've been sending text message via email. It works, but it is a bit slow. I think I had tried this plugin awhile ago, but couldn't get it to work for some reason.

The one thing that is kind of confusing for me was the idea of sending a text message to yourself in Messages. Not sure if that's possible, but I ended up using an aol AOL AIM account in Messages to send SMS's to my iPhone number. Worked for me! No doubt there are better/easier ways to get this to work, but I got it working!
I did run into the 6/7 bug but got that fixed, and LOVE this plugin!

Thanks so much!

Posted on
Sun Dec 24, 2017 11:18 am
dlleon offline
Posts: 113
Joined: Dec 14, 2012

Re: Messages app plugin

I have the script working, such that it send messages on events. I also have it working where it will receive messages, change the status to "New"

The sample action returns the Message "Thanks!" etc

Is there a way to use the content of a Message to trigger an action?

IOW, can I text "kitchen" to Indigo, it then receives the message and turns on a kitchen light?

Posted on
Sun Dec 24, 2017 6:18 pm
dlleon offline
Posts: 113
Joined: Dec 14, 2012

Re: Messages app plugin

Just realized I had this down incorrectly:

1. I can send a Message to Indigo.
2. Indigo will change State of xyzzy@test.com to New
3. Trigger will check this, and Last Message Received can compare the text contents

What I'm trying to do is set the contents of the received text to a Variable.

I haven't figured this out yet.

Posted on
Tue Dec 26, 2017 2:30 pm
rycardo offline
Posts: 53
Joined: Jul 10, 2015

Re: Messages app plugin

What I'm trying to do is set the contents of the received text to a Variable.


In Actions of your Trigger, can't you just do:

Type: Variable Actions > Insert Device State into Variable >
Select your Messages device
Insert State: (pick one: handle, message, name, response, responseStatus, service, status)
Into variable: (pick your variable)

I'm only starting to experiment with this plugin, so don't know it super well, but I believe the above works, or should work.

Rycardo

Posted on
Wed Jan 03, 2018 11:11 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Messages app plugin

Is anyone using this with 10.12.x?

Also, has anyone tried both this plugin and the Pushover plugin, and if so, could you compare their usefulness and ease? I'm particularly interested in people who chose to go with Pushover after trying this, and why.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Mon Jan 08, 2018 5:19 pm
bhough17 offline
Posts: 13
Joined: Jan 04, 2018

Re: Messages app plugin

How would one call an action via Python for this plugin?

I've looked in it's Actions.xml file, and can see the action named "sendMessage"

Inside that action, I see a number of fields - "allSenders", "message", "service", etc.

I've also looked at the iTunes plugin examples at http://wiki.indigodomo.com/doku.php?id=indigo_5_documentation:plugin_scripting_tutorial#scripting_indigo_plugins, and can make those instructions work in Indigo's scripting shell

I'm trying:
Code: Select all
>>> messagesID = "me.gazally.indigoplugin.Messages"
>>> messagesPlugin = indigo.server.getPlugin(messagesID)
>>> messagesPlugin.executeAction("sendMessage", deviceID=184726458, props={'message':"Hello Bruce", 'service':"E:*******@gmail.com", 'handle':"+15555551212"})

I'm getting the values for the last statement from the Custom States window for the device.

This throws an error in the console:
Code: Select all
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ArgumentError: Python argument types in
    PluginInfo.executeAction(PluginInfo, str)
did not match C++ signature:
    executeAction(CPlugin {lvalue}, CCString actionTypeId, unsigned long deviceId=0, boost::python::api::object props=None, bool waitUntilDone=True)

Thanks in advance…

Bruce

Posted on
Mon Jan 08, 2018 7:13 pm
rycardo offline
Posts: 53
Joined: Jul 10, 2015

Re: Messages app plugin

I could be wrong, but you might need quotes or double quotes around your JSON data.

After props= put a double/quote then at the end just before your ) also put the same one.

That’s what I’m used to doing, in the little bit I’v done. Something to try until someone else replies. Actually looking back at the examples you gave, I think I’m wrong. I’ll leave the suggestion as the worst that can happen is it works.

Could it be your mix of single and double quotes?

Rycardo

Who is online

Users browsing this forum: No registered users and 8 guests