# Help me use a ShellyPlus1PM with the MQTT integration in Gladys

**URL:** <https://community.gladysassistant.com/t/aidez-moi-a-utiliser-un-shellyplus1pm-avec-lintegration-mqtt-dans-gladys/9330>\
**Category:** Configuration\
**Created:** [January 28, 2025, 1:22am UTC](https://community.gladysassistant.com/t/aidez-moi-a-utiliser-un-shellyplus1pm-avec-lintegration-mqtt-dans-gladys/9330 "2025-01-28T01:22:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![l.dolle](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/l.dolle/32/17380_2.png) [@l.dolle](https://community.gladysassistant.com/u/l.dolle)\
**Post date:** [January 28, 2025, 1:22am UTC](https://community.gladysassistant.com/t/aidez-moi-a-utiliser-un-shellyplus1pm-avec-lintegration-mqtt-dans-gladys/9330/1 "2025-01-28T01:22:23Z")

</div>

Good evening,  
I can’t control my Shelly Plus 1 PM (shellyPlus1PM) module with MQTTX (mqttx).  
From the Shelly documentation:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/d/d/dd1ca5d2b273a0a6aba862580dac4f0bd435e2a4.png)  
I can’t use their instructions to find the right topic and the correct body.  
It must be basic for some pros in the community, but in this area I’m a dunce.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [January 31, 2025, 7:54am UTC](https://community.gladysassistant.com/t/aidez-moi-a-utiliser-un-shellyplus1pm-avec-lintegration-mqtt-dans-gladys/9330/2 "2025-01-31T07:54:09Z")

</div>

Hi @l.dolle 🙂

I suppose you want to control this switch from Gladys.

First you need to go to the «&nbsp;MQTT&nbsp;» integration and create this switch:

 ![Screenshot 2025-01-31 at 08.44.25](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/f/f/ff40187777c23f58ca64a972a16d4fafcfc58bc5.png)

Give it whatever name you want, and add an «&nbsp;outlet - switch&nbsp;» feature:

 ![Screenshot 2025-01-31 at 08.46.42](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/c/6/c641127a60fac9cab38bf6265394d1ba820f05cc.png)

This should give you this:

 ![localhost_1444_dashboard_integration_device_mqtt_edit](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/3/d/3de4768e5ca299fb940fded62161b2cc88888465.jpeg)

(Make sure to reproduce exactly what I did, uncheck «&nbsp;is this a sensor&nbsp;» in particular)

**Scenes**

You’ll need to create 2 scenes, one for turning on, and one for turning off:

**Turn on**

Create a trigger:

 ![Screenshot 2025-01-31 at 08.50.07](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/7/8/7889e4df13a524bfee1f2b27cd74874a70bc8e21.png)

And an action:

 ![Screenshot 2025-01-31 at 08.51.22](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/b/1/b16e399d695779e47607143972200d88d5d62525.png)

Be sure to replace the «&nbsp;topic\_prefix&nbsp;» and «&nbsp;id&nbsp;», I imagine you know them 🙂

**Turn off**

Do the same, but with the off:

 ![Screenshot 2025-01-31 at 08.52.27](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/9/7/9786fa3c8307578dc8731a948f58a09271d91ce4.png)  
 ![Screenshot 2025-01-31 at 08.52.30](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/c/e/ce96174bf872eec27674a294f79e95605a8ad946.png)

**Conclusion**

I understand that it can be a bit long to integrate Shelly devices like this into Gladys.

A more viable solution will come from Matter integration, I hope, this year 🙂

Don’t hesitate if you have any questions.

PS: I don’t have a Shelly, this whole tutorial comes from my interpretation of Shelly’s documentation, I may be wrong.

---

<div class="post-metadata">

**Author:** ![l.dolle](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/l.dolle/32/17380_2.png) [@l.dolle](https://community.gladysassistant.com/u/l.dolle)\
**Post date:** [January 31, 2025, 8:28am UTC](https://community.gladysassistant.com/t/aidez-moi-a-utiliser-un-shellyplus1pm-avec-lintegration-mqtt-dans-gladys/9330/3 "2025-01-31T08:28:59Z")

</div>

Hello @pierre-gilles,  
Thanks for the info. It works very well. I had already created the scenes but I hadn’t linked the scenes to my switch. Also, I kept insisting on trying to test from MQTTX when going through Gladys was much simpler.  
I also made a simpler version (for testing) with the «&nbsp;toggle&nbsp;» command. The problem is that in case of a malfunction, the switch may end up reversed (turning off when it should turn on and turning on when it should turn off).  
What do you think?  
Thanks again for this info.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [January 31, 2025, 8:49am UTC](https://community.gladysassistant.com/t/aidez-moi-a-utiliser-un-shellyplus1pm-avec-lintegration-mqtt-dans-gladys/9330/4 "2025-01-31T08:49:26Z")

</div>

> [@l.dolle](#):
>
> The problem is that in case of a malfunction, the switch may end up reversed. (turning it off with «&nbsp;on&nbsp;» and turning it on with «&nbsp;off&nbsp;»)

Indeed!

Also, I think Shelly handles state feedback; if you want to be properly synchronized (in case of control outside Gladys), you can set up the state feedback by listening on the correct MQTT topic. That can be done via a scene.

But it might be overkill if you only control via Gladys

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [May 26, 2025, 3:12pm UTC](https://community.gladysassistant.com/t/aidez-moi-a-utiliser-un-shellyplus1pm-avec-lintegration-mqtt-dans-gladys/9330/5 "2025-05-26T15:12:50Z")

</div>

For info @l.dolle, we now fully support Shelly modules via the Matter integration 🙂

Tutorial in the documentation :

> **[Intégrer Shelly à Gladys via Matterbridge | Gladys Assistant](https://gladysassistant.com/fr/docs/integrations/shelly/)**
>
> Shelly est une marque populaire dans le domaine de la domotique, connue pour ses modules Wi-Fi compacts, abordables et faciles à intégrer. Ils permettent d'automatiser l’éclairage, les prises ou les volets roulants, sans nécessiter de hub central.

---

<div class="post-metadata">

**Author:** ![l.dolle](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/l.dolle/32/17380_2.png) [@l.dolle](https://community.gladysassistant.com/u/l.dolle)\
**Post date:** [May 26, 2025, 3:49pm UTC](https://community.gladysassistant.com/t/aidez-moi-a-utiliser-un-shellyplus1pm-avec-lintegration-mqtt-dans-gladys/9330/6 "2025-05-26T15:49:30Z")

</div>

Hello @pierre-gilles,

Thanks for thinking of me about the Shelly issue. I’ve already connected my test Shelly to Matterbridge, but I’m having a problem: Gladys has no IPv6 address to connect it to Matterbridge.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [May 26, 2025, 3:50pm UTC](https://community.gladysassistant.com/t/aidez-moi-a-utiliser-un-shellyplus1pm-avec-lintegration-mqtt-dans-gladys/9330/7 "2025-05-26T15:50:43Z")

</div>

Can you tell us more about your setup so we can help you? 🙂

---

<div class="post-metadata">

**Author:** ![l.dolle](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/l.dolle/32/17380_2.png) [@l.dolle](https://community.gladysassistant.com/u/l.dolle)\
**Post date:** [May 26, 2025, 4:19pm UTC](https://community.gladysassistant.com/t/aidez-moi-a-utiliser-un-shellyplus1pm-avec-lintegration-mqtt-dans-gladys/9330/8 "2025-05-26T16:19:32Z")

</div>

The Gladys server was installed using the official docker-compose on a Proxmox VM behind a Freedombox gateway server on a VM as well.  
I refer you to my post with @mutmut  
[https://community.gladysassistant.com/t/matter-erreur-si-ajout-appareil-sans-ipv6/](https://community.gladysassistant.com/t/matter-erreur-si-ajout-appareil-sans-ipv6/)

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [May 27, 2025, 7:16am UTC](https://community.gladysassistant.com/t/aidez-moi-a-utiliser-un-shellyplus1pm-avec-lintegration-mqtt-dans-gladys/9330/9 "2025-05-27T07:16:23Z")

</div>

Ah yes I remember your post.

In my opinion, given the complexity of your setup (multiple VMs), there must be a network problem in all that 🙂

Matterbridge and Gladys really need to be able to communicate directly!

> [@l.dolle](#):
>
> But I think I messed up my install of Matter and Matterbridge. I took inspiration from your first docker-compose files, I think I’ll rebuild all that more cleanly.

Ok, don’t hesitate if you need help once you’ve rebuilt everything 🙂

---

<div class="post-metadata">

**Author:** ![Terdious](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/terdious/32/6316_2.png) [@Terdious](https://community.gladysassistant.com/u/Terdious)\
**Post date:** [May 27, 2025, 8:59am UTC](https://community.gladysassistant.com/t/aidez-moi-a-utiliser-un-shellyplus1pm-avec-lintegration-mqtt-dans-gladys/9330/10 "2025-05-27T08:59:24Z")

</div>

Indeed, during a test, even with a Linux VM on my Windows PC, the Shelly devices are detected but matterbridge and Gladys do not communicate.  
Afterwards I didn’t make many attempts, since I have what I need elsewhere.
