MountainEars wrote:Would it be possible to leverage iMessage for this instead of using GoogleVoice? IMessage does not use the text services and can work on macs with MountainLion and newer iPhone and iPads. Setup an account on your Mac with indigo on it and then use your mobile devices to send to it.
dmeeker@mac.com wrote:That would be great. The Google Voice/SMS plugin is cool, but it seriously eats up CPU and isn't reliable because of that. I'd love to hear what you come up with!
DVDDave wrote:MountainEars wrote:Would it be possible to leverage iMessage for this instead of using GoogleVoice? IMessage does not use the text services and can work on macs with MountainLion and newer iPhone and iPads. Setup an account on your Mac with indigo on it and then use your mobile devices to send to it.
I just noticed that iMessage has the built-in ability to trigger Applescripts upon receiving a message. I'm going to start playing around with this to trigger Indigo Server via Applescript. Seems too easy a solution so I'm probably missing something.
bschollnick2 wrote:dmeeker@mac.com wrote:That would be great. The Google Voice/SMS plugin is cool, but it seriously eats up CPU and isn't reliable because of that. I'd love to hear what you come up with!
I took a look at it, and it's a relatively easy change to the plugin to reduce the CPU usage.
The main issue, is that it does not wait in-between polls of the Google Voice web site. I took a look, and made a modified version with a self.sleep command. It still works perfectly, but now has a reduced CPU load...
If people are interested, I can make it available....
- Ben
DPattee wrote:Yea, what's the necessary change?
I finally figured out what was making my server run so poorly, and it turned out to be the Google Voice plugin running at 90% cpu
DVDDave wrote:DVDDave wrote:MountainEars wrote:Would it be possible to leverage iMessage for this instead of using GoogleVoice? IMessage does not use the text services and can work on macs with MountainLion and newer iPhone and iPads. Setup an account on your Mac with indigo on it and then use your mobile devices to send to it.
I just noticed that iMessage has the built-in ability to trigger Applescripts upon receiving a message. I'm going to start playing around with this to trigger Indigo Server via Applescript. Seems too easy a solution so I'm probably missing something.
It works! And it really is that easy. Just need to specify an applescript to run when Messages receives a message. The applescript then tells Indigo what to do depending on the text of the message. I put in some simple fixed messages like "turn on family room light" and it worked perfectly by telling Siri "iMessage Indigo turn on family room light". Since I'm not a programmer, I used the existing iTunes control example to guide me on the script.
To set this up, I created a new Apple ID for my server and told Messages to receive on that ID. I then added a contact called Indigo on my iPhone and Macs with the email associated with that Apple ID. My script also checks for my name (name of theBuddy) so random people can't trigger the actions. I will also need to secure it further if possible to prevent name spoofing.
Next step will be to parse the messages so I can handle them in a more generalized manner. I will also clean it up a bit and provide the basic script as an example for others to get started.
Woohoo!!
polycron wrote:Ben,
So far, so good. I'll try to put it through some heavy usage in the next day. It is definitely helping my CPU. I'm seeing about 14 seconds 100% CPU then dropping down to 3-11% CPU for about 10 seconds (repeating cycle). The 14 second spikes are the IndigoPluginHost (roughly 85% of the 100% usage). I'm assuming this is when the google voice part is doing its thing. I'm running a 1.5 ghz G4.
Users browsing this forum: No registered users and 6 guests