Pass the name of $currentEventDevice as an argument to another piston


#1

1) Give a description of the problem
When I pass $currentEventDevice to another piston as an argument, it passes I guess what is the address to the other piston and not the name.

2) What is the expected behavior?
I am trying to print the name in the second piston.

3) What is happening/not happening?
Instead of printing something like “Kitchen Door” it prints something like [klaflkj9eiji…kdjflkdjlfkjd]

4) Post a Green Snapshot of the pistonimage


#3

Try changing your variables to device instead of string?


#9

You can’t set a variable of type “device” to args.X


#10

Hmm what about stringing it before passing it on as an argument.

set deviceName = $currentEventDevice

Execute piston “Receiving Piston” with arguments {deviceName}


#11

This is the first thing I tried. I am not sure why it is working now.



#12

@ady624 probably did an inception thing :wink:


#13

I have a similar problem, though I want to pass a $device that will then turn on/off the device in the piston I am executing. I cannot figure it out as the $device variable appears to pass the address of the device and passing a device variable to the piston getting called comes out empty. I am probably doing something very stupid. Any help would be greatly appreciated…


#14

You should start a new thread and post a green snapshot of the piston so people can check it out and offer suggestions.


#15

Thanks @eibyer. I started a new thread here: Passing variables through pistons

If you or anyone else has any ideas, they will be greatly appreciated. I am busting my head and cannot figure out what’s going on.