# Shelly plus uni gen2 device control from nodered

**URL:** <https://discourse.nodered.org/t/shelly-plus-uni-gen2-device-control-from-nodered/90214>\
**Category:** General\
**Created:** [16 August 2024 11:25 UTC](https://discourse.nodered.org/t/shelly-plus-uni-gen2-device-control-from-nodered/90214 "2024-08-16T11:25:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sirhc](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@Sirhc](https://discourse.nodered.org/u/Sirhc)\
**Post date:** [16 August 2024 11:25 UTC](https://discourse.nodered.org/t/shelly-plus-uni-gen2-device-control-from-nodered/90214/1 "2024-08-16T11:25:11Z")

</div>

Hello

I have a Shelly plus uni gen 2 device which accepts MQTT commands to switch the devices output relays.

According to the API, the MQTT commands are as follows:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/0/002cca3af6b15edde98d39e2a973663a7484b9ea.png)

API Documentation: [Switch | Shelly Technical Documentation](https://shelly-api-docs.shelly.cloud/gen2/ComponentsAndServices/Switch)

I have tried sending a "on" string to topic device-id/command/output:1 but I cannot get it to switch on. Has anyone else had any luck with controlling these devices via MQTT?

---

<div class="post-metadata">

**Author:** ![Sirhc](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@Sirhc](https://discourse.nodered.org/u/Sirhc)\
**Post date:** [16 August 2024 11:30 UTC](https://discourse.nodered.org/t/shelly-plus-uni-gen2-device-control-from-nodered/90214/2 "2024-08-16T11:30:09Z")

</div>

Replaced output with switch in the topic and it works fine 🙂

---

<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 August 2024 11:30 UTC](https://discourse.nodered.org/t/shelly-plus-uni-gen2-device-control-from-nodered/90214/3 "2024-08-30T11:30:16Z")

</div>

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