Time of last event

Posted on
Fri May 02, 2003 1:45 pm
Guest offline

Time of last event

Does Indigo have the ability to determine the time of the last event? For example, if I receive an X10 A1 on, I may choose to not do anything if the device is already on and it is within one minute from getting the last A1 on.

I think this is similar to the time delta of xtension.

Posted on
Fri May 02, 2003 6:19 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Time of last event

Not currently, but that is a great feature request.

regards,
matt

Anonymous wrote:
Does Indigo have the ability to determine the time of the last event? For example, if I receive an X10 A1 on, I may choose to not do anything if the device is already on and it is within one minute from getting the last A1 on.

Posted on
Mon May 05, 2003 1:43 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Time of last event

support wrote:
Not currently, but that is a great feature request.

The latest beta version 1.1 now has a device property "last changed" that returns the time / date of when the device state last changed. You can get the beta at:

http://www.perceptiveautomation.com/ind ... o_beta.dmg

regards,
matt

Posted on
Tue Oct 21, 2003 1:57 pm
gregjsmith offline
Posts: 946
Joined: Apr 01, 2003
Location: Rio Rancho, NM

(No subject)

Might you post a example here of using this in a applescript?

Posted on
Tue Oct 21, 2003 2:32 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

(No subject)

gregjsmith wrote:
Might you post a example here of using this in a applescript?

Sure. Make sure that the "time stamp attachment.scp" script is inside of your attachments folder. If you installed an older copy of Indigo, then you might have to dig it out of the Indigo package (Indigo isn't smart enough to copy updated scripts out of the package after you've launched the first time):

  Indigo.app/Contents/Resources/First Run/Scripts/Attachments/

Then, from within an AppleScript Action (either embedded or external compiled script file), just call the function GetTimeStampForAddress(). For example,

tell app "Indigo"
  log "office light last mod at " & GetTimeStampForDevice("office light")
  log "A1 last mod at " & GetTimeStampForAddress("A1")
end tell

Note this function gives you the last time that particular X10 address (or device with that address) was received by the interface. It doesn't report time/dates if you modify the device within Indigo, or have Indigo send an X10 command. For that you can use the "last changed" property of the device object.

regards,
matt

Posted on
Thu Oct 30, 2003 1:14 pm
dalenis offline
Posts: 123
Joined: Apr 02, 2003
Location: Lunenburg, MA

(No subject)

I can not get this to work.....

tell app "Indigo"
  log "Last motion in kitchen at " & GetTimeStampForDevice("Motion Kitchen")
end tell

Message written to log....

Last motion in kitchen at unknown

Any ideas.

Dale

Posted on
Thu Oct 30, 2003 1:37 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

(No subject)

dalenis wrote:
Last motion in kitchen at unknown

Did you recently restart Indigo? The time stamps for this script aren't saved anywhere (unlike the device changed states that Indigo does internally save), so if you restart Indigo then everything starts in an "unknown" state.

regards,
Matt

Posted on
Thu Oct 30, 2003 1:50 pm
Guest offline

(No subject)

Bingo.....that's was it!

I thought it read at the log file.

Thanks,

Dale

Posted on
Thu Oct 30, 2003 1:57 pm
dalenis offline
Posts: 123
Joined: Apr 02, 2003
Location: Lunenburg, MA

(No subject)

A little more on this time/date stuff. I use the indigo.acgi web script and for some reason the motion sensor date and time are always 12:00:00 AM, 01/01/1904 on the web page.

Any thoughts on this.

Thanks,

Dale

Posted on
Thu Oct 30, 2003 2:15 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

(No subject)

The web .acgi script uses the device property "last changed." That is the Indigo internal property that shows when a device last changed its state. Since motion detectors don't have an on/off state in Indigo (I need to fix this...), that property always returns a date of 1/1/04 (the earliest mac native date).

The time stamp attachment script stores, and lets you retrieve, the time/date an X10 signal was last received for a specific X10 address. So, you could modify the web .acgi script to check for the 1/1/04 date, and have it call the time stamp attachment script in this case. Search for "last changed of curDevice" inside the web .acgi script for where you should add this additional conditional.

regards,
Matt

Posted on
Tue Jun 15, 2004 6:50 pm
no name offline

(No subject)

I was playing around with the motion detectors and noticed that there still is not an "on state" for them. Do you think that will change in v1 or will we need to wait for v2?

Thanks.

Posted on
Tue Jun 15, 2004 6:58 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

(No subject)

This will probably have to wait for 2.0.

Regards,
Matt

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 22 guests