The Pandoras Box AppleScript, and the PandoraBoy AppleScript before it, will put this weird «constant ****sPAU» into the player state variable. I've been able to work around the issue as far as display purposes go, but now it makes SQL throw this error:
- Code: Select all
SQL Logger Error exception trying to insert row into table variable_history_852852967 ("PandorasBoxPlayerState")
SQL Logger Error 'ascii' codec can't encode character u'\xab' in position 0: ordinal not in range(128)
SQL Logger Error INSERT INTO variable_history_852852967 (value) VALUES (%s);
Also, since changing to the Simple Serial Plugin to control my Vaux matrix audio switch, I now get the Vaux response, which looks like this:
- Code: Select all
Trigger audio_8_source Python
Simple Serial Plugin Response from serial device (text): , of length 0 characters
Trigger Vaux_Response
Simple Serial Plugin Response from serial device (text): !S,1,8,1,1,28,28,4,7
- Code: Select all
set the ActivityLog to do shell script "tail -9 \"/Library/Application Support/Perceptive Automation/Indigo 5/Logs/indigo_log.txt\""
set the TotalNumberOfLines to the count of paragraphs in the ActivityLog
set the CurrentLine to 1
repeat while the CurrentLine is less than or equal to the TotalNumberOfLines
set stringTextOfTheCurrentLine to paragraph CurrentLine of the ActivityLog as string
set TextOfTheCurrentLine to (characters 12 through -1 of stringTextOfTheCurrentLine as string)
set the variableName to ("RecentActivity" & CurrentLine) as string
if not (variable variableName exists) then
make new variable with properties {name:variableName, value:TextOfTheCurrentLine}
else
set the value of the variable variableName to the TextOfTheCurrentLine
end if
set the CurrentLine to (the CurrentLine + 1)
end repeat
And the log file showing the Vaux Response and the error at Recent Activity 4 and 6. I think the " script error: Can’t make characters 12 thru -1 of "" into type string. (-1700)" must be from the Recent Activity Log.
- Code: Select all
10Jun, 2012 10:24:07 AM
Trigger audio_8_source Python
Simple Serial Plugin Response from serial device (text): , of length 0 characters
Trigger Vaux_Response
Simple Serial Plugin Response from serial device (text): !S,1,8,1,2,28,28,4,7
, of length 22 characters
Trigger Vaux_Response
10Jun, 2012 10:24:44 AM
Received INSTEON "Thermostat Main Bedrooms" humidity changed to 36.0
Received INSTEON "Thermostat Main Bedrooms" off (button 1)
Error script error: Can’t make characters 12 thru -1 of "" into type string. (-1700)
Received INSTEON "Thermostat Fam Study" humidity changed to 42.0
10Jun, 2012 10:26:00 AM
Error script error: Can’t make characters 12 thru -1 of "" into type string. (-1700)
10Jun, 2012 10:26:23 AM
Received INSTEON "Thermostat Fam Room" humidity changed to 38.0
10Jun, 2012 10:26:56 AM
Received INSTEON "Thermostat Main Bedrooms" temperature changed to 75.0
Received INSTEON "Thermostat GameRm" humidity changed to 42.0
SQL Logger Error exception trying to insert row into table variable_history_1862497340 ("RecentActivity4")
SQL Logger Error 'ascii' codec can't encode character u'\u2019' in position 32: ordinal not in range(128)
SQL Logger Error INSERT INTO variable_history_1862497340 (value) VALUES (%s);
SQL Logger Error exception trying to insert row into table variable_history_1483307090 ("RecentActivity6")
SQL Logger Error 'ascii' codec can't encode character u'\u2019' in position 32: ordinal not in range(128)
SQL Logger Error INSERT INTO variable_history_1483307090 (value) VALUES (%s);
Not that I know anything about it, but I found a page that discusses the unicode error:
http://stackoverflow.com/questions/3224 ... code-error