Still Getting Errors With 924
James Sentman
james at sentman.com
Tue Mar 1 10:33:14 EST 2016
Firstly I’ve duplicated the part of the script that is causing the error and I cannot duplicate it here with a new unit by the same name.
the error is "Bad Communications with Mini #1" doesn’t understand the “turnoff” message.
so it’s an error in controlling the unit “Bad Communications with MIni #1”
The only turnoff commands in your script are in the initializeXTensionFlags() handler
on initializeXTensionFlags()
tell application "XTension"
turnoff "Bad Communications with Mini #1" -- Init this to off
turnoff "Bad Communications with WeatherTracker" -- Init this to off
end tell
end initializeXTensionFlags
if you comment out that turnoff command there does the script then run from the scheduled event? or does the problem then move to the next unit?
These things were originally developed in the script editor and then pasted into XTension? Is that why it has an on run {} handler and all the XTEnsion stuff is wrapped in tell blocks? I don’t THINK that can cause any trouble, it should be OK, but once placed into XTension you can remove the on run{} block as it’s not necessary, and all the tell xtension stuff is extra too.
There are a couple of places where you’ve commented out a log line but left in the tell xtension block like:
tell application "XTension"
--write log "Communication channel open to remote computer" -- For testing
end tell
I have never tried such a thing and tested it and was not able to make that generate any errors, but I would still comment out the tell block as well as it just adds uncertainty to what I’m seeing, I’m not sure if that would cause strange things to happen under some circumstances or not.
Instead of using all those tell app XTension blocks, I would wrap the entire method or handler in a
using terms from application “XTension”
end using terms
block. That will let it continue to compile in the script editor but removes the necessity of all the rest when running inside XTension itself.
The other danger with tell blocks is that they try to find an instance of the app and sometimes can even startup extra instances of XTension if there are other versions laying around.
It IS possible that you’re hitting some other bug in the turnoff handling that I’m not catching. I’ll do a special version with more error logging for you shortly to rule that out. But first please try commenting out the calls to turn off those units and see if the script runs OK or if the error just moves elsewhere.
> On Mar 1, 2016, at 9:51 AM, George Handley <ghandley at kc.rr.com> wrote:
>
> Good morning Rich, and thank you for the idea. This is a different kind of bug to me in that this fairly complicated script works fine manually inside XTension and fine on a previous version of XTension, but will not automatically as a scheduled event in 924. I could better understand better if it didn’t work at all! :-)
>
> Also, as usual, no one else has complained about this, so I’ve again painted myself into what appears to be a corner with a problem that must be unique to me systems.
>
> We’ll get it… we always do, but since this seems to only be something happening with James' newest build, I’m hoping he can easily see what is happening, and point me in the right direction for correction. It’s got to be something small and simple.
>
> I’m going to answer Tom’s question next, and maybe with enough questions, a light bulb will come on here for us to understand what is different.
>
Thanks,
James
James Sentman http://www.PlanetaryGear.org http://MacHomeAutomation.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.machomeautomation.com/pipermail/xtensionlist/attachments/20160301/3309c9a3/attachment.html>
More information about the XTensionList
mailing list