Null argument error on execute piston with no variable


#1

1) Give a description of the problem
(PUT YOUR INFO HERE)
Getting null error without optional piston variable.

+219ms ║║Ramjet completed Kitchen K: true B: true L: true G: true
+221ms ║║Executed virtual command log (2ms)
+224ms ║║get Variable ‘null’ not found
+226ms ║║Executed virtual command executePiston (4ms)
+228ms ║╚Execution stage complete. (163ms)
+230ms ╚Event processed successfully (229ms)

2) What is the expected behaviour?
(PUT YOUR INFO HERE)
If I put in a variable, there is no error.
3) What is happening/not happening?
(PUT YOUR INFO HERE)
Should not display as error if expected behaviour.

4) Post a Green Snapshot of the pistonimage
First piston is with variable. Behaves correctly. Second piston is without variable. Gives error.


5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)

|+219ms|║║Ramjet completed Kitchen K: true B: true L: true G: true|
|---|---|
|+221ms|║║Executed virtual command log (2ms)|
|+224ms|║║**get Variable 'null' not found|**
|+226ms|║║Executed virtual command executePiston (4ms)|
|+228ms|║╚Execution stage complete. (163ms)|
|+230ms|╚Event processed successfully (229ms)|

#2

you need to post full logs of the error, otherwise too much hunting to see what is going on…

or highlight the line you say there is a problem…


#3

On the execute piston statement with no optional variable, I get the following error with full logging.

+224ms|║║get Variable ‘null’ not found|
|+226ms|║║Executed virtual command executePiston (4ms)|


#4

need full logs for the piston please.


#5

Here are the full logs. I can see my other issue here. I am using this piston as a call back from IFTTT.
+2ms ╔Starting piston… (v0.3.114.20230222_HE)
+69ms ║╔Subscribing to devices…
+106ms ║║subscriptions: no triggers, promoting conditions
+107ms ║║Subscribing to RosieH(new).variable:RamjetInterrupted…
+112ms ║╚Finished subscribing (109ms)

4/4/2023, 12:57:12 PM +287ms
+2ms ╔Received event [RosieH(new)].test = 1680638232287 with a delay of 1ms, canQueue: true, calledMyself: false
+61ms ║RunTime initialize &gt; 61 LockT &gt; 0ms &gt; r9T &gt; 55ms &gt; pistonT &gt; 54ms (first state access 4 m:6 2 59)
+64ms ║Runtime (9802 bytes) initialized in 55ms (v0.3.114.20230222_HE)
+65ms ║╔Execution stage started
+78ms ║║Calculating (string)Kitchen + (string) was cleaned &gt;&gt; (string)Kitchen was cleaned
+79ms ║║Calculating (string)Kitchen was cleaned + (string)false &gt;&gt; (string)Kitchen was cleaned false
+106ms ║║Executed virtual command sendPushNotification (26ms)
+114ms ║║Calculating (string)Ramjet complete + (string)Kitchen &gt;&gt; (string)Ramjet complete Kitchen
+115ms ║║Calculating (string)Ramjet complete Kitchen + (string) is complete &gt;&gt; (string)Ramjet complete Kitchen is complete
+116ms ║║Ramjet complete Kitchen is complete
+118ms ║║Executed virtual command log (2ms)
+126ms ║║Executed virtual command setVariable (1ms)
+128ms ║║Comparison (string) Kitchen is (string) Kitchen = true (1ms)
+129ms ║║Condition #9 evaluated true (1ms)
+129ms ║║Condition group #5 evaluated true (condition did not change) (2ms)
+135ms ║║Executed virtual command setVariable (5ms)
+142ms ║║Comparison (boolean) false is (boolean) false = true (0ms)
+142ms ║║Condition #22 evaluated true (6ms)
+142ms ║║Condition group #21 evaluated true (condition did not change) (6ms)
+166ms ║║Calculating (string)Ramjet completed + (string)Kitchen &gt;&gt; (string)Ramjet completed Kitchen
+167ms ║║Calculating (string)Ramjet completed Kitchen + (string) K: &gt;&gt; (string)Ramjet completed Kitchen K:
+168ms ║║Calculating (string)Ramjet completed Kitchen K: + (string)true &gt;&gt; (string)Ramjet completed Kitchen K: true
+169ms ║║Calculating (string)Ramjet completed Kitchen K: true + (string) B: &gt;&gt; (string)Ramjet completed Kitchen K: true B:
+170ms ║║Calculating (string)Ramjet completed Kitchen K: true B: + (string)true &gt;&gt; (string)Ramjet completed Kitchen K: true B: true
+170ms ║║Calculating (string)Ramjet completed Kitchen K: true B: true + (string) L: &gt;&gt; (string)Ramjet completed Kitchen K: true B: true L:
+172ms ║║Calculating (string)Ramjet completed Kitchen K: true B: true L: + (string)true &gt;&gt; (string)Ramjet completed Kitchen K: true B: true L: true
+172ms ║║Calculating (string)Ramjet completed Kitchen K: true B: true L: true + (string) G: &gt;&gt; (string)Ramjet completed Kitchen K: true B: true L: true G:
+173ms ║║Calculating (string)Ramjet completed Kitchen K: true B: true L: true G: + (string)true &gt;&gt; (string)Ramjet completed Kitchen K: true B: true L: true G: true
+185ms ║║Executed virtual command sendPushNotification (11ms)
+211ms ║║Calculating (string)Ramjet completed + (string)Kitchen &gt;&gt; (string)Ramjet completed Kitchen
+212ms ║║Calculating (string)Ramjet completed Kitchen + (string) K: &gt;&gt; (string)Ramjet completed Kitchen K:
+213ms ║║Calculating (string)Ramjet completed Kitchen K: + (string)true &gt;&gt; (string)Ramjet completed Kitchen K: true
+214ms ║║Calculating (string)Ramjet completed Kitchen K: true + (string) B: &gt;&gt; (string)Ramjet completed Kitchen K: true B:
+215ms ║║Calculating (string)Ramjet completed Kitchen K: true B: + (string)true &gt;&gt; (string)Ramjet completed Kitchen K: true B: true
+215ms ║║Calculating (string)Ramjet completed Kitchen K: true B: true + (string) L: &gt;&gt; (string)Ramjet completed Kitchen K: true B: true L:
+216ms ║║Calculating (string)Ramjet completed Kitchen K: true B: true L: + (string)true &gt;&gt; (string)Ramjet completed Kitchen K: true B: true L: true
+217ms ║║Calculating (string)Ramjet completed Kitchen K: true B: true L: true + (string) G: &gt;&gt; (string)Ramjet completed Kitchen K: true B: true L: true G:
+218ms ║║Calculating (string)Ramjet completed Kitchen K: true B: true L: true G: + (string)true &gt;&gt; (string)Ramjet completed Kitchen K: true B: true L: true G: true
+219ms ║║Ramjet completed Kitchen K: true B: true L: true G: true
+221ms ║║Executed virtual command log (2ms)
+224ms ║║get Variable 'null' not found
+226ms ║║Executed virtual command executePiston (4ms)
+228ms ║╚Execution stage complete. (163ms)
+230ms ╚Event processed successfully (229ms)
4/4/2023, 12:56:55 PM +508ms
+2ms ╔Starting piston... (v0.3.114.20230222_HE)
+69ms ║╔Subscribing to devices...
+106ms ║║subscriptions: no triggers, promoting conditions
+107ms ║║Subscribing to RosieH(new).variable:RamjetInterrupted...
+112ms ║╚Finished subscribing (109ms)

#6

So it looks like the ‘Execute piston’ code is looping through a list of arguments and instead of the list being empty there is a first argument ‘null’. Might be worth showing the settings screen for the failing ‘Execute pistons’ task in case there is something in there that is confusing the issue.


#7

I have asked to updated to latest version as some of the logs don’t match latest code.

It will be easier to debug once we have logs with the latest code.


#8

I have updated to V0.3.114.220220203. Logs below. I am still getting:
|+333ms|║║get Variable null [name:null, index:null] null not found|
|—|---|
|+336ms|║║Executed virtual command executePiston (5ms)|

4/8/2023, 10:14:08 PM +844ms
+3ms ╔Received event [RosieH(new)].test = 1681017248844 with a delay of 0ms, canQueue: true, calledMyself: false
+99ms ║RunTime initialize &gt; 99 LockT &gt; 1ms &gt; r9T &gt; 92ms &gt; pistonT &gt; 90ms (first state access 3 m:6 4 95)
+103ms ║Runtime (9817 bytes) initialized in 92ms (v0.3.114.20230222_HE)
+104ms ║╔Execution stage started
+124ms ║║Calculating (string)Kitchen + (string) was cleaned &gt;&gt; (string)Kitchen was cleaned
+126ms ║║Calculating (string)Kitchen was cleaned + (string)false &gt;&gt; (string)Kitchen was cleaned false
+153ms ║║Executed virtual command sendPushNotification (26ms)
+165ms ║║Calculating (string)Ramjet complete + (string)Kitchen &gt;&gt; (string)Ramjet complete Kitchen
+166ms ║║Calculating (string)Ramjet complete Kitchen + (string) is complete &gt;&gt; (string)Ramjet complete Kitchen is complete
+168ms ║║Ramjet complete Kitchen is complete
+171ms ║║Executed virtual command log (2ms)
+180ms ║║Executed virtual command setVariable (1ms)
+183ms ║║Comparison (string) Kitchen is (string) Kitchen = true (1ms)
+184ms ║║Condition #9 evaluated true (3ms)
+185ms ║║Condition group #5 evaluated true (condition did not change) (3ms)
+195ms ║║Executed virtual command setVariable (8ms)
+205ms ║║Comparison (boolean) false is (boolean) false = true (1ms)
+206ms ║║Condition #22 evaluated true (10ms)
+207ms ║║Condition group #21 evaluated true (condition did not change) (10ms)
+247ms ║║Calculating (string)Ramjet completed + (string)Kitchen &gt;&gt; (string)Ramjet completed Kitchen
+248ms ║║Calculating (string)Ramjet completed Kitchen + (string) K: &gt;&gt; (string)Ramjet completed Kitchen K:
+250ms ║║Calculating (string)Ramjet completed Kitchen K: + (string)true &gt;&gt; (string)Ramjet completed Kitchen K: true
+251ms ║║Calculating (string)Ramjet completed Kitchen K: true + (string) B: &gt;&gt; (string)Ramjet completed Kitchen K: true B:
+252ms ║║Calculating (string)Ramjet completed Kitchen K: true B: + (string)true &gt;&gt; (string)Ramjet completed Kitchen K: true B: true
+253ms ║║Calculating (string)Ramjet completed Kitchen K: true B: true + (string) L: &gt;&gt; (string)Ramjet completed Kitchen K: true B: true L:
+255ms ║║Calculating (string)Ramjet completed Kitchen K: true B: true L: + (string)true &gt;&gt; (string)Ramjet completed Kitchen K: true B: true L: true
+256ms ║║Calculating (string)Ramjet completed Kitchen K: true B: true L: true + (string) G: &gt;&gt; (string)Ramjet completed Kitchen K: true B: true L: true G:
+257ms ║║Calculating (string)Ramjet completed Kitchen K: true B: true L: true G: + (string)true &gt;&gt; (string)Ramjet completed Kitchen K: true B: true L: true G: true
+273ms ║║Executed virtual command sendPushNotification (15ms)
+314ms ║║Calculating (string)Ramjet completed + (string)Kitchen &gt;&gt; (string)Ramjet completed Kitchen
+315ms ║║Calculating (string)Ramjet completed Kitchen + (string) K: &gt;&gt; (string)Ramjet completed Kitchen K:
+317ms ║║Calculating (string)Ramjet completed Kitchen K: + (string)true &gt;&gt; (string)Ramjet completed Kitchen K: true
+318ms ║║Calculating (string)Ramjet completed Kitchen K: true + (string) B: &gt;&gt; (string)Ramjet completed Kitchen K: true B:
+319ms ║║Calculating (string)Ramjet completed Kitchen K: true B: + (string)true &gt;&gt; (string)Ramjet completed Kitchen K: true B: true
+320ms ║║Calculating (string)Ramjet completed Kitchen K: true B: true + (string) L: &gt;&gt; (string)Ramjet completed Kitchen K: true B: true L:
+322ms ║║Calculating (string)Ramjet completed Kitchen K: true B: true L: + (string)true &gt;&gt; (string)Ramjet completed Kitchen K: true B: true L: true
+323ms ║║Calculating (string)Ramjet completed Kitchen K: true B: true L: true + (string) G: &gt;&gt; (string)Ramjet completed Kitchen K: true B: true L: true G:
+325ms ║║Calculating (string)Ramjet completed Kitchen K: true B: true L: true G: + (string)true &gt;&gt; (string)Ramjet completed Kitchen K: true B: true L: true G: true
+327ms ║║Ramjet completed Kitchen K: true B: true L: true G: true
+329ms ║║Executed virtual command log (2ms)
+333ms ║║get Variable null [name:null, index:null] null not found
+336ms ║║Executed virtual command executePiston (5ms)
+340ms ║╚Execution stage complete. (235ms)
+344ms ╚Event processed successfully (341ms)
4/8/2023, 10:13:58 PM +348ms
+4ms ╔Starting piston... (v0.3.114.20230222_HE)
+123ms ║╔Subscribing to devices...
+180ms ║║subscriptions: no triggers, promoting conditions
+182ms ║║Subscribing to RosieH(new).variable:CurrrentRoom...
+194ms ║║Subscribing to RosieH(new).variable:RamjetInterrupted...
+207ms ║╚Finished subscribing (200ms)
+215ms ║Subscribing to RosieH(new).pistonID...(:06ea22376b6e27547a0ebd61b37d628c:)
+319ms ║Comparison (string) Kitchen is (string) Kitchen = true (1ms)
+330ms ║Comparison (string) Kitchen is (string) Bedroom = false (1ms)
+333ms ║Comparison (string) Kitchen is (string) Livingroom = false (1ms)
+344ms ║Comparison (string) Kitchen is (string) Guest = false (0ms)
+357ms ║Comparison (boolean) false is (boolean) false = true (1ms)
+382ms ╚Piston started (379ms)

#9

So post the piston (you have two in this thread) that is having the error).

have you tried deleting and re-creating the execute piston line (that seems to be offending?) ?