View unanswered posts | View active topics It is currently Sat May 25, 2013 2:25 am



Reply to topic  [ 5 posts ] 
 Email status reports? 
Author Message

Joined: Feb 11, 2006
Posts: 20
Post Email status reports?
I did several searches and didn't find anything like this so forgive me if I missed it.

Has anyone created a script that responds to an email trigger by returning an email with all device statuses? I'd love to be able to check on my home from my blackberry. Web access is tricky, and I don't feel like messing with DynDNS.

Thanks in advance.

Joseph


Tue Feb 14, 2006 8:41 pm
Profile
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 11698
Location: Texas
Post Re: Email status reports?
Hi Joseph,

I haven't seen a script that does this. The script "example - list devices.scpt" would be a good starting place though -- it enumerates through all of the devices and writes them to a log. This could be modified to instead send the device states in an email. You will need to use the Apple Mail program to send the message instead of Indigo's built-in SMTP client, but there is a sample of how to do that on this post.

Regards,
Matt


Wed Feb 15, 2006 9:52 am
Profile WWW

Joined: Jan 10, 2006
Posts: 120
Post I Have One.
I have a script which would be a good starting point.

When Indigo see's an email from a certain address with the subject 'Status' it will enumerate all devices and get their status and return then in an email to me.

The script is on my home computer though, and I am at work right now, so I will try and post it later today or tonight.


Wed Feb 15, 2006 10:58 am
Profile

Joined: Jan 10, 2006
Posts: 120
Post Here is a Good Starting Point
Sorry it took so long. Forgot about my reply that I would post my sample code. I use this, though this could also serve as a good starting point to making an even better script. It uses the default profile in the OS X Mail Application.

Code: Select all
set deviceNames to {}
set deviceStates to {}
set deviceLastChangedList to {}
set deviceDoesDimList to {}
set deviceBrightnessList to {}
set test to ""

tell application "Indigo"
   repeat with curDevice in devices
      if (display in remote ui of curDevice) is true then
         if (on state of curDevice) is true then
            set onOff to "On"
         else
            set onOff to "Off"
         end if
         set test to test & name of curDevice & " - " & onOff & " (" & brightness of curDevice & "%)" & return
      end if
   end repeat
   
end tell

tell application "Mail"
   set addrVar to "destination@yourdomain.com"
   set subjectvar to "House Status at " & (current date)
   set newMessage to (a reference to (make new outgoing message))
   tell newMessage
      make new to recipient at beginning of to recipients with properties {address:addrVar}
      set the subject to subjectvar
      set the content to test
   end tell
   send newMessage
end tell


Fri Mar 03, 2006 11:20 pm
Profile

Joined: Oct 17, 2004
Posts: 1116
Location: Rochester, Ny
Post Re: Email status reports?
support wrote:Hi Joseph,

I haven't seen a script that does this. The script "example - list devices.scpt" would be a good starting place though -- it enumerates through all of the devices and writes them to a log. This could be modified to instead send the device states in an email. You will need to use the Apple Mail program to send the message instead of Indigo's built-in SMTP client, but there is a sample of how to do that on this post.

Regards,
Matt


The External IP plugin *will* support emailing the external IP address, as soon as the Indigo Server supports the indigo.server.sendEmailTo command.

Why am I not using an external email script or applescript to control Apple Mail? It's much more complex, and in my experience Applescript & Apple Mail can be unreliable.

- Benjamin

_________________
------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33


Wed Aug 10, 2011 6:27 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.