Presence Count Discrepancy


#1

1) Give a description of the problem
The global variable of presence device count is one less than what it should be (2 when it should be 3, 1 when it should be 2, etc)

2) What is the expected behaviour?
I’d hope the number would be the same as the number of devices listed. I added a local variable to check, which counts correctly.

3) What is happening/not happening?
The local variable count of presence devices is correct, but the global variable count is one less.

**4) Post a Green Snapshot of the piston!


5) Attach logs after turning logging level to Full
|07/04/2020, 11:46:08 +866ms|
|+1ms|╔Received event [Ludlows].test = 1586256368865 with a delay of 1ms|
|+62ms|║RunTime Analysis CS > 23ms > PS > 10ms > PE > 28ms > CE|
|+66ms|║Runtime (39219 bytes) successfully initialized in 10ms (v0.3.110.20191009) (64ms)|
|+68ms|║╔Execution stage started|
|+94ms|║║Comparison (enum) not present is (string) present = false (3ms)|
|+98ms|║║Comparison (enum) present is (string) present = true (2ms)|
|+101ms|║║Comparison (enum) present is (string) present = true (2ms)|
|+104ms|║║Comparison (enum) present is (string) present = true (2ms)|
|+110ms|║║Condition #5 evaluated true (36ms)|
|+112ms|║║Condition group #1 evaluated true (state did not change) (39ms)|
|+115ms|║║Cancelling statement #6’s schedules…|
|+127ms|║║Executed virtual command setVariable (2ms)|
|+134ms|║║Executed virtual command setVariable (3ms)|
|+142ms|║║Executed virtual command setVariable (1ms)|
|+146ms|║╚Execution stage complete. (79ms)|
|+148ms|╚Event processed successfully (148ms)|


#2

You have defined the global @presentDevices as a string. If you define it as a device the count will work as you want it to.


#3

Awesome. Thank you - now works as expected! What I wouldn’t give for a beginners guide to the pitfalls of webcore.