New Vera units
James Sentman
james at sentman.com
Wed Sep 16 16:35:18 EDT 2015
Interesting ;) I wonder if the text as sent from the Vera contains something that is throwing it off?
first you can try specifically coercing it by doing something like:
set goodUnitName to (thisUnit) as text
write log “good name is: “ & goodUnitName
if that works then i can do some further checks to make that happen in my code.
After you try that please do one other thing for me. Edit the unit and completely delete and retype the name of the unit in question. After saving that run the script tests again. The only thing different about these units is that they are coming from an external place where the text encoding is potentially unknown since a network stream doesn’t have text encoding. I may not be forcing their types when they come in, I”ll have a look at that too, but please try those 2 experiments.
> On Sep 16, 2015, at 4:22 PM, Hendrik van Eeden <hvaneeden at comcast.net> wrote:
>
> Here is the script:
> write log "A"
> write log "Unit is:" & (thisUnit)
> --DoKeepTimes(thisUnit, "ON")
> change future value to (round ((future value) * 9 / 5 + 32) * 100) / 100
> and this is the response
>
> 9/16/15 4:20:05 PM A
> 9/16/15 4:20:05 PM OSAError -1700: Can’t make «data tdta466F727472657A204C65616B2053656E736F722074656D7065726174757265» into type Unicode text.
> Does that help?
Thanks,
James
James Sentman http://sentman.com http://MacHomeAutomation.com
More information about the XTensionList
mailing list