# Automation with curl (Home Assistant)

**URL:** https://community.garadget.com/t/automation-with-curl-home-assistant/506
**Category:** SmartHome Integration
**Tags:** client-apps, home-automation, home-assistant, integration
**Created:** [October 11, 2016, 7:10pm UTC](https://community.garadget.com/t/automation-with-curl-home-assistant/506 "2016-10-11T19:10:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hotdogwater](https://community.garadget.com/letter_avatar_proxy/v4/letter/h/35a633/32.png) [@hotdogwater](https://community.garadget.com/u/hotdogwater)
#### Post date: [October 11, 2016, 7:10pm UTC](https://community.garadget.com/t/automation-with-curl-home-assistant/506/1 "2016-10-11T19:10:47Z")

</div>

Would this be the correct curl command to send an open command?  
$curl -X POST [https://api.particle.io/v1/devices/](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.

> **[Command Line Cover](https://www.home-assistant.io/integrations/cover.command_line)**
>
> How to control a cover with the command line.

---

<div class="post-metadata">

### Author: ![garadget](https://community.garadget.com/user_avatar/community.garadget.com/garadget/32/34_2.png) [@garadget](https://community.garadget.com/u/garadget)
#### Post date: [October 11, 2016, 8:10pm UTC](https://community.garadget.com/t/automation-with-curl-home-assistant/506/2 "2016-10-11T20:10:24Z")

</div>

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](https://docs.particle.io/reference/api/#call-a-function). The list of supported functions, variables and events can be found in [Garadget’s Firmware at GitHub](https://github.com/Garadget/firmware).

I look forward to seeing more info about your project when finished.

---

<div class="post-metadata">

### Author: ![garadget](https://community.garadget.com/user_avatar/community.garadget.com/garadget/32/34_2.png) [@garadget](https://community.garadget.com/u/garadget)
#### Post date: [February 20, 2017, 7:45pm UTC](https://community.garadget.com/t/automation-with-curl-home-assistant/506/4 "2017-02-20T19:45:27Z")

</div>

For those who’s still finding this older post: here’s now a [native Garadget support in Home Assistant](https://home-assistant.io/components/cover.garadget/).
