Full piston url with args


#1

1) Give a description of the problem
can’t figure out the url parameters. I want to execute my hue piston and tell it on/off, the color for now. Eventually I want to control all my scenes, fades and effects. Just got my first hue bulbs and their app… well it seems to do basics fine but I thought it was more powerful (the “labs” features which are hard to set up and use IMO)

2) What is the expected behavior?
clicking a url shortcut tile in actiontiles will execute webcore url and pass data

3) What is happening/not happening?
can’t figure out url

4) Post a Green Snapshot of the pistonimage
Here is what I have been trying…
https://graph.api.smartthings.com/api/token/DELETE/smartapps/installations/DELETE/execute/hue?onoff=on&color=blue

5) Attach any logs (From ST IDE and by turning logging level to Full)

In piston console I get
(value) »»» (dynamic) null


#2

What does your hue piston look like?


#3

I added snapshot above but I am really just logging the args until I figure out the URL.


#4

Ahh, ok…

https://graph.api.smartthings.com/api/token/DELETE/smartapps/installations/DELETE/execute/:piston_id:?onoff=on&color=blue

So you can log $args.onoff and $args.color to get the values


#5

Thanks, I thought I could print them all with $args … actually it does work. I was just looking in the console and not the log :man_facepalming:

+205ms ║║args= [color:blue, onoff:on, param1:execute, param2:A_hue, remoteAddr:......]


#6

Yup, you got it… I mainly use the console for manual evaluation of functions and variables