Would this be the correct curl command to send an open command?
$curl -X POST https://api.particle.io/v1/devices/XXXXXXXX/setState -Hcontent-type:application/x-www-form-urlencoded -d access_token=YYYYYYYY&arg=open
where XXXXXXX is deviceid and YYYYYYYY is the token.
Yes, but it also works without content-type header:
curl https://api.particle.io/v1/devices/XXX-DEVICEID-XXX/setState -d arg="open" -d access_token=YYY-ACCESS-TOKEN-YYY
Please find more details and examples in Particle Cloud API. The list of supported functions, variables and events can be found in Garadget’s Firmware at GitHub.
I look forward to seeing more info about your project when finished.
For those who’s still finding this older post: here’s now a native Garadget support in Home Assistant.