24U Email OSAX crashes XTension?

mfjlaw-xtension5875 at mailblocks.com mfjlaw-xtension5875 at mailblocks.com
Mon May 9 04:14:50 PDT 2005


I am trying to isolate a consistent crash of XTension 5.2.3 (once every 
week or so).  I have a hawkeye motion sensor at my front door that when 
triggered, causes a front door image to be captured using ImageCaster 
and then stored.  The scripts then cause an alert email to be sent to 
my telephone using the 24U Email OSAX, and also sends the captured 
front door image as an attachment.

Every time (and the only time) XTension crashes is somewhere along the 
line of this process.  XTension does not crash every time - the email 
most of the time works.  It crashes whether or not an attachment is 
sent (i.e. just the text messages).  But consistently it crashes during 
this process of the front door trigger - send email process.  Below is 
an excerpt from the XTension log, the on script for the sensor, and the 
email script (which is an XTension Attachment script).

Is there anything here that looks like it may be the culprit causing 
the crash?

Has anyone experienced any crash or other problems with the 24U Email 
OSAX?

Mark Johannessen

===============================

[Here is the XTension log right before a crash]

Fri, May 6, 2005 1:18:25 PM Received ON for Front Door Sensor (w)
Fri, May 6, 2005 1:18:29 PM Alert email sent: HA Alert
Sun, May 8, 2005 8:26:07 PM XTension startup version 5.2.3 (build 426)

(the restart was manual on my part)

===============================

[the following is the “on” script for the Front Door Sensor]

if not (daylight) then
	remove unit events "Front Door Light"
	turnon "Front Door Light" for 2 * minutes
end if
if (time delta of "House Occupied") > 10 * 60 then -- only triggers if 
nobody is home
	block unit "Front Door Sensor" for 30
	suspend event "Hourly Cam Capture" for 60
	capture_video("FRONT DOOR SECURITY", "security", "camimages", 2, 
"Front Door Sensor", 30) — uses ImageCaster
	set theAlert to "Front door sensor: "
	set thisDate to current date
	set thisDay to (day of thisDate as string)
	set thisMonth to (month of thisDate as string)
	set thisYear to (year of thisDate as string)
	set thisTime to (time string of thisDate as string)
	set alertTime to (thisMonth & "/" & thisDay & "/" & thisYear & ": " & 
thisTime)
	set theAlert to theAlert & alertTime
	sendEmail("HA Alert", theAlert, "none", "me at mypopaccount.com")
	—sendEmail("HA Alert", theAlert, "PB HD/path_to_captured_image", 
"me at mypopaccount.com") — enable for attachment
end if
if (status of "Speak Movements") is true then
	say "someone is at the front door"
end if
logdata("Front Door Sensor", 100)

===============================

[the following is an attachments script that uses 24U Email OSAX]

property theSubject : ""
property theMessage : ""
property theAttachment : ""
on sendEmail(theSubject, theMessage, theAttachment, theRecipient)
	set mySMTP to "mail.mailaccount.com"
	set myAuthentication to {kind:cram md5 authentication, user 
name:"myusername", password:"mypassword"}
	set myFrom to {name:"Mark Johannessen", email 
address:"user at mailaccount.com"}
	set myTo to {name:"MFJ", email address:theRecipient}
	set myBody to "HA:" & return & return & theMessage
	if theAttachment is not equal to "none" then
		set theFile to alias theAttachment
		set myAttachments to theFile
		try
			send email myBody ¬
				subject theSubject ¬
				from myFrom ¬
				to myTo ¬
				via host mySMTP ¬
				attaching myAttachments ¬
				encoding with BinHex encoding ¬
			write log "Alert email sent: " & theSubject
		on error errMsg number errNum
			write log "Alert e-mail could not be sent." & return & errMsg & 
return & "(" & errNum & ")"
		end try
	else -- no attachments
		try
			send email myBody ¬
				subject theSubject ¬
				from myFrom ¬
				to myTo ¬
				via host mySMTP ¬
			write log "Alert email sent: " & theSubject
		on error errMsg number errNum
			write log "Alert e-mail could not be sent." & return & errMsg & 
return & "(" & errNum & ")"
		end try
	end if
end sendEmail




More information about the XTensionlist mailing list