# Shelly & API Flow etc

**URL:** <https://discourse.nodered.org/t/shelly-api-flow-etc/43472>\
**Category:** General\
**Created:** [31 March 2021 15:28 UTC](https://discourse.nodered.org/t/shelly-api-flow-etc/43472 "2021-03-31T15:28:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![imile](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@imile](https://discourse.nodered.org/u/imile)\
**Post date:** [31 March 2021 15:28 UTC](https://discourse.nodered.org/t/shelly-api-flow-etc/43472/1 "2021-03-31T15:28:49Z")

</div>

Good day everyone

So if someone can help me with Shelly API etc.

In POSTMAN I can get my results when I follow the SHELLY API Instructions.

How can I translate that into NODERED FLOW.

Where do I put the values?

 ![Screenshot 2021-03-31 at 17.27.18](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/f/9f555f58a1a135f40604068eb783ced54a7f04fe.png)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [31 March 2021 16:34 UTC](https://discourse.nodered.org/t/shelly-api-flow-etc/43472/2 "2021-03-31T16:34:20Z")

</div>

See the [cookbook in the documentation](https://cookbook.nodered.org/http/set-request-header), shows how to set the header and post body.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [31 March 2021 17:17 UTC](https://discourse.nodered.org/t/shelly-api-flow-etc/43472/3 "2021-03-31T17:17:34Z")

</div>

I use the Shelly local MQTT capabilities rather than Shelly cloud.

---

<div class="post-metadata">

**Author:** ![imile](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@imile](https://discourse.nodered.org/u/imile)\
**Post date:** [31 March 2021 19:11 UTC](https://discourse.nodered.org/t/shelly-api-flow-etc/43472/4 "2021-03-31T19:11:34Z")

</div>

Unfortunately I have to use the cloud.

---

<div class="post-metadata">

**Author:** ![imile](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@imile](https://discourse.nodered.org/u/imile)\
**Post date:** [31 March 2021 20:54 UTC](https://discourse.nodered.org/t/shelly-api-flow-etc/43472/5 "2021-03-31T20:54:25Z")

</div>

I just need a place to put in the AUTH KEY & DEVICE ID to get the status of the device?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [31 March 2021 21:18 UTC](https://discourse.nodered.org/t/shelly-api-flow-etc/43472/6 "2021-03-31T21:18:43Z")

</div>

I dont know if i am missing something here, but you can access the state of the shell device using `node-red-contrib-shelly`

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/5/f526355a6d28f4f7308fff53d555c70155d7b539.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/e/1e9851fecdc6fc5c09f2aaadba77cc66ee249835.png)

```auto
[{"id":"53d5e208.3502ac","type":"shelly-switch","z":"5e6c8b.7f38b374","hostname":"192.168.1.58","description":"","x":342,"y":608,"wires":[["9d407f28.db5ad"]]},{"id":"d4c4c1dd.3a07c","type":"inject","z":"5e6c8b.7f38b374","name":"turn on","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{ \"relay\" : 0, \"on\" : true }","payloadType":"json","x":98,"y":544,"wires":[["53d5e208.3502ac"]]},{"id":"22373c66.a0eb74","type":"inject","z":"5e6c8b.7f38b374","name":"turn off","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{ \"relay\" : 0, \"on\" : false }","payloadType":"json","x":98,"y":576,"wires":[["53d5e208.3502ac"]]},{"id":"4bed432d.addeec","type":"inject","z":"5e6c8b.7f38b374","name":"status","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"str","x":98,"y":608,"wires":[["53d5e208.3502ac"]]}]

```

under the hood, this uses http methods direct to the device & yes, mine are cloud connected (not using MQTT)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [30 May 2021 21:18 UTC](https://discourse.nodered.org/t/shelly-api-flow-etc/43472/7 "2021-05-30T21:18:52Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
