Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Token Expansion Failed
#1
I have a couple triggered events that broadcasts an alert if someone pulls up the driveway or rings the doorbell. I keep getting:

CQCKit, CQCKit_ThisFacility.cpp.530, Failed/Data Format, Error: 6257/0/0
Token expansion failed during command processing
Variable LVar:Z01Source was not found


The context is that the first thing it does when the event is triggered is:
Code:
If System::Equals
    P1=$(RussoundCSeries.Z01_Power)
    P2=True

Devices::FieldRead
    P1=RussoundCSeries.Z01_Source
    P2=LVar:Z01Source
    P3=True

Devices::FieldRead
    P1=RussoundCSeries.Z01_Volume
    P2=LVar:Z01Volume
    P3=True

Devices::FieldWrite
    P1=RussoundCSeries.Z01_Source
    P2=6
    P3=True

Devices::FieldWrite
    P1=RussoundCSeries.Z01_Volume
    P2=45
    P3=True

End

Then after using TTS to announce it in the house, I have it try to restore the volume and source using the LVars created above.

Code:
If LocalVars::Exists
    P1=LVar:Z01Source

Devices::FieldWrite
    P1=RussoundCSeries.Z01_Source
    P2=%(LVar:Z01Source)
    P3=True

Devices::FieldWrite
    P1=RussoundCSeries.Z01_Volume
    P2=%(LVar:Z01Volume)
    P3=True

// If the power was on, variable for source was created
// Restore source and volume if the variable exists
//
End

There must be something I'm missing in here. Is it because I didn't do an If/Else statement? My logic (or il-logic) in my head was that if the local variable exists, then it was on before and only then an action needs to take place. But if it was not on, and the variable doesn't exist, then nothing needs to take place.

Thanks in advance!
Reply
#2
Just looking at it by eye, I don't see anything particular wrong with it. One thing you can do it just copy all, go create a button on a dummy template and past it in and run it there with the action trace on and get a better idea of where exactly it's failing.
Dean Roddey
Explorans limites defectum
Reply
#3
Is all this in the one event?

If not then I think you need to use GVar's instead.

Have you checked your O & 0's making sure you have not accidentally got one instead of the other ( I seem to do that a lot lately)?

Mick
Reply
#4
Ok, nevermind, apparently LVar:Z01Source was in the position of Z05Source and it didn't know what to do when it tried to restore it with a variable that didn't exist! I should have tried it with more than just Z05, duh!

Thanks for the help.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Write Failed / ZWave gReatAutomation 22 6,681 03-20-2020, 12:29 PM
Last Post: Dean Roddey
  DIDOrb_ThisFacility.cpp.563 Failed/Not Found simplextech 5 1,685 01-31-2020, 01:22 PM
Last Post: simplextech
  CIDLib_RefVector.hpp.470, Failed/Bad Parms simplextech 1 836 01-12-2020, 06:06 PM
Last Post: Dean Roddey
  Replacement Token Problem MikeW 16 5,587 05-23-2015, 08:55 PM
Last Post: dlmorgan999
  CQC failed to restart after XP restart Mark Stega 15 4,861 12-26-2013, 12:55 PM
Last Post: jkmonroe
  Serial Port read failed, frame errors, can't purge....*sigh* beelzerob 3 2,599 04-23-2013, 10:44 AM
Last Post: Dean Roddey
  Token Substitution for Template Values? rbroders 6 2,358 09-19-2012, 03:12 PM
Last Post: Dean Roddey
  Operation Failed Tried to connect to 127.0.0.1:5000 potts.mike 3 1,788 06-23-2012, 10:00 AM
Last Post: Dean Roddey
  Insert Token Options? ClintonDouglass 1 1,287 08-07-2010, 09:29 PM
Last Post: Dean Roddey
  CommPort Purge Failed...Quatech ThinQ related? beelzerob 6 2,310 10-03-2009, 01:45 PM
Last Post: beelzerob

Forum Jump:


Users browsing this thread: 1 Guest(s)