RCS Script issues and intermittant errors

Posted on
Mon Aug 02, 2004 11:17 pm
pgershon offline
Posts: 509
Joined: Jul 10, 2004

RCS Script issues and intermittant errors

I am trying to use the supplied RCS thermostat scripts and I am having occasional issues with the attachments. When I check temperature with a "GetTemp", the attachment launches fine and transmits an X10 command of "H5 preset dim val of 0". The thermostat then generates a response (properly of "H15 preset dim val of 12"). The RCS attachment processess the "H15" as follows:

"set deviceCode to (characters 2 through (length of addr) of addr as string) as number"

If I understand the language correctly, devicecode should be set to 15 and sometimes it seems to work fine. Other times, however, the log gets an error "Can't make "1,5" into a number." I am not sure why the comma is added, but the problem is cleared only by restarting Indigo.

Any ideas what the problem may be. For what it is worth, my log is being filled with "undefined byte from w800rf interface" messages, but other than this problem, I have seen no harm and I cannot stop the message without disconnecting my RF receiver.

Posted on
Tue Aug 03, 2004 7:54 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: RCS Script issues and intermittant errors

pgershon wrote:
I am trying to use the supplied RCS thermostat scripts and I am having occasional issues with the attachments. When I check temperature with a "GetTemp", the attachment launches fine and transmits an X10 command of "H5 preset dim val of 0". The thermostat then generates a response (properly of "H15 preset dim val of 12"). The RCS attachment processess the "H15" as follows:

"set deviceCode to (characters 2 through (length of addr) of addr as string) as number"

If I understand the language correctly, devicecode should be set to 15 and sometimes it seems to work fine. Other times, however, the log gets an error "Can't make "1,5" into a number." I am not sure why the comma is added, but the problem is cleared only by restarting Indigo.

Any ideas what the problem may be. For what it is worth, my log is being filled with "undefined byte from w800rf interface" messages, but other than this problem, I have seen no harm and I cannot stop the message without disconnecting my RF receiver.


I believe Greg has also reported a similar problem (same error message), but we were never able to track down steps to make the problem happen. Can you easily reproduce the problem? Hopefully you can, because then we should be able to track down where it is getting confused.

Add these lines before the line that gets the error:

log "length of address is " & (length of addr) as string
log "address as string is " & (addr as string)
set lastDigitsStr to (characters 2 through (length of addr) of addr as string)
log "last digits of address as string are " & lastDigitsStr
set lastDigitsNum to (lastDigitsStr as number)
log "last digits of address as number are " & (lastDigitsNum as string)

Let me know if it happens again and post the results shown in the log window. Thanks!

Regards,
Matt

Posted on
Tue Aug 03, 2004 5:14 pm
pgershon offline
Posts: 509
Joined: Jul 10, 2004

(No subject)

I managed to reproduce the problem and changed my code in the RCS attachment to better handle, although I am not sure what causes the issue. New code is:

set deviceCode to (get text 2 through (length of addr) of addr) as number

replaces line:
set deviceCode to (characters 2 through (length of addr) of addr as string) as number

problem seems to be solved. i will report back if it comes up again.

Posted on
Sun Aug 08, 2004 6:58 am
pgershon offline
Posts: 509
Joined: Jul 10, 2004

(No subject)

Error has come back, and I am totally confused. Error only seems to appear after Indigo has been running for over 24 hours - goes away on reboot. Error seems to come from RCS attachment script (the new one) but I can't be sure 100% (perhaps you can help). A room generates X10 code H15 preset 4 (to indicate the temperature is 72 degrees). Indigo picks this up and processes. The new code is "set deviceCode to (get text 2 through (length of addr) of addr) as number" and this seems to work because the next step is to generate the log entry for temperature, and this appears in the log. The next lines of log messages are the error messages:

Error script error: Can't make "1,5" into a number.
Error error sending apple event to self

The problem is I am not sure what code this is coming from. I do not see any other instructions to make a number - the H15 already been processed and no other X10 seemingly received.

Posted on
Sun Aug 08, 2004 9:54 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

(No subject)

The error message definitely means the error was generated during the execution of an AppleScript, but it could be one of the other attachment scripts causing a problem. Looks like "time stamp attachment" and "templinc attachment" both use the other (bad?) technique to extract out the device code. If you have those attachments in your active attachments folder, then try modifying them to the new technique to see if the problem goes away. I'll modify those scripts in the installed download as well.

I still don't understand why the other technique would work for a while, then all of the sudden return the characters as a list. Very strange.

Regards,
Matt

Posted on
Sat Aug 14, 2004 9:21 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

(No subject)

This bug is now fixed in the RCS attachment, TempLinc attachment, and time stamp attachment scripts. You can download the latest copies of all these scripts on the Indigo Script Library page.

Regards,
Matt

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 23 guests