WebCore bug or just the way it has always been

I have only noticed this in the last few months and I don't remember it being this way.
Expressions used to evaluate correctly the first time a new var was introduced; pretty sure.
Lately they have not and I finally figured out what to do as it was driving me mmmmmmad. :wink:

If I create the var decRecRoomOffset and then make an expression to add it to RecRoomSetPoint it evalutes to 0. I had this same issue when trying to calculate azimuth values; I would always get wonky answers or 0 with simple math.
I stumbled upon the answer - when you create a var in define you have to Save the piston and re-edit and then do the expression.
Was this always this way?
@nh.schottfam

Would need to see full logs during this editing (for the piston)

Created test piston, edit and add variable.
Create a set variable expression.
At first it says invalid. I save the expression and re-edit and now it evaluates to 0.
Save the piston with the new var and re-edit and now it evaluates properly.
So it looks like new vars have to be saved first before the piston has access to them for evaluation.



image

app:122024-02-12 09:48:39.373tracebroadcastPistonList sent

app:122024-02-12 09:48:29.542traceEvaluating expression (264ms)

app:122024-02-12 09:48:29.196debugDashboard: Request received to evaluate an expression

app:122024-02-12 09:48:23.074debugDashboard: Request received to get piston :aa5259e1c785c1ae404c8d42264ef9ad: Rec Room Heater Test (Paused)

app:122024-02-12 09:48:18.790debugDashboard: Request received to get piston :aa5259e1c785c1ae404c8d42264ef9ad: Rec Room Heater Test

app:122024-02-12 09:48:18.260debugDashboard: Request received to set_save

app:122024-02-12 09:48:18.205debugDashboard: Request received to set a piston (chunked end)

app:122024-02-12 09:48:17.855debugDashboard: Request received to set a piston chunk (#2/2)

app:122024-02-12 09:48:17.545debugDashboard: Request received to set a piston chunk (#1/2)

app:122024-02-12 09:48:17.280debugDashboard: Request received to set a piston (chunked start)

app:122024-02-12 09:46:14.476traceEvaluating expression (283ms)

app:16422024-02-12 09:46:14.470error ║ get Variable decRecRoomOffset [name:decRecRoomOffset, index:null] decRecRoomOffset not found

app:122024-02-12 09:46:14.153debugDashboard: Request received to evaluate an expression

app:122024-02-12 09:45:25.248traceEvaluating expression (258ms)

app:122024-02-12 09:45:24.950debugDashboard: Request received to evaluate an expression

app:122024-02-12 09:45:06.150traceEvaluating expression (398ms)

app:122024-02-12 09:45:05.625debugDashboard: Request received to evaluate an expression

app:122024-02-12 09:44:19.256traceEvaluating expression (284ms)

app:122024-02-12 09:44:18.929debugDashboard: Request received to evaluate an expression

app:122024-02-12 09:44:04.904traceEvaluating expression (308ms)

app:122024-02-12 09:44:04.556debugDashboard: Request received to evaluate an expression

app:122024-02-12 09:42:28.865debugDashboard: Request received to get piston :aa5259e1c785c1ae404c8d42264ef9ad: Rec Room Heater Test (Paused)

app:122024-02-12 09:42:07.858debugDashboard: Received set piston logging level

I have observed this for some time (at least multiple months), because I remember stumbling on the save/re-edit trick. I cannot say for certain whether it was ever different (i.e. evaluate new variables on-the-fly).

If you want to try the latest webcore (if user install) to see if the changes I made helped.

Will test, thanks!

Using the Feb 15 build of WC and the Jan 15 build of WC Piston I get the same results.
Was WC Piston updated but the rev date not changed perhaps?
I did compile that as well and no change.
I "assume" you create a var list to use with Eval and without saving you cannot create a complete list; creating it dynamically is a pain?

any thing in logs

I may need a private note on steps...