Trigger Piston Extermally?


#1

I have a piston that turns off a plug. What I’d like to do is have a script on my 3D printer that makes a curl request to WebCore and triggers the piston

I’m making a POST request to https://graph-eu01-euwest1.api.smartthings.com/api/token/<<token>>/smartapps/installations/<<install>>/execute/<<piston>> however its throwing

{
    "result": "ERROR",
    "timestamp": 1578413375299
}

I’ve tried putting the colons in the Piston ID too and that throws

{
    "error": true,
    "type": "SmartAppException",
    "message": "Not Found"
}

#2

Tried a GET?


#3

It says in the docs:

Data can be passed to webCoRE in the form of a query string, POST FORM data, or POST JSON data. Please set the Content-Type header to application/json if planning on sending JSON data in the POST body.

A GET request yields the same results


#4

The curl command works though? What does the piston you’re calling look like (green snapshot)?


#5

Ah hang on, im testing using Postman and there was a random param in there. Its working now :slight_smile:


#6

lol nice :slight_smile: