Make Gladys communicate with an external MQTT module?

Hello, I got a module to communicate with my Intex spa via MQTT. I created my MQTT commands on Gladys to control my spa and I therefore have these topics.
gladys/device/mqtt:Spa/feature/mqtt:Spa/state
gladys/device/mqtt:Bulle Spa/feature/mqtt:Bulle Spa/state
gladys/device/mqtt:Filtre Spa/feature/mqtt:Filtre Spa/state
gladys/device/mqtt:Chauffage Spa/feature/mqtt:Chauffage Spa/state
gladys/device/mqtt:Température désirée/feature/mqtt:Température désirée/state
gladys/master/device/mqtt:Température actuelle/feature/mqtt:Température actuelle/state
I need Gladys to subscribe to or publish to the module’s topics. I asked the module designer who gave me this answer.
« My system probably doesn’t work with ESPHome, it was coded in Visual Studio Code.
Why would you need to modify it?
Normally Gladys should listen to these topics and be able to converse with it!?!
The 2 topics are Pool/# and Wifi/# »



Can someone tell me how to make Gladys communicate with these topics?

The only solution for you is to use Node-RED to convert the topics.
Or create a specific integration…

1 Like

Thanks for your reply — I had that idea too in the meantime. I’m trying it on Node-RED. So there’s no simple solution to do it directly :pensive:.

Unfortunately…
The MQTT integration is really inflexible due to the lack of support for custom topics!

Hello @elfedagger

You can go through Node-RED and draw inspiration from the following tutorials to adapt them to your needs

as well as

https://community.glad

Hi @elfedagger :slight_smile:

You can absolutely communicate with custom MQTT topics in Gladys without using Node-RED!

We have scene actions that allow receiving MQTT messages / and sending them.

Example of a trigger:

Example of an action:

I have the impression this feature is little-known :smiley:

2 Likes


I tinkered with this last night and it works very well. I get the temperature of my spa, all the commands work. The only thing that’s a bit off is adjusting the desired temperature with the + and -

1 Like

That’s true! I had completely forgotten it existed. I think it was added later to the feature set and I had given up on using my temperamental devices.
The instinct is to create a device to integrate it into Gladys. Going through scenes is not intuitive because the received message can change the state of a virtual device and, forgive me if I’m wrong, you need two scenes for a simple switch: one scene to receive the state and one to control it :exploding_head:
Well, I’ll have to take a closer look at that!

1 Like

Indeed, since it’s custom we really have to do it that way — it’s the same on the Node-RED side, you need different triggers :slight_smile:

Even though I’ll admit that in Node-RED it feels like less work since you can have several scenes on the same ‹ flow ›.

2 Likes

I managed to send my on/off commands for all functions of my spa. But I wasn’t able to retrieve the current temperature or send the desired temperature by sending and receiving an MQTT message.

To retrieve the current temperature, I’m not sure that’s possible via Gladys alone (it’s possible via Node-RED)

However, to send the desired temperature, you create a virtual MQTT device in Gladys, then you make a scene where you send the value of that device over MQTT every time its state changes

Do you see what I mean?

Yes that’s what I did, I created an MQTT device « desired temperature » which corresponds to the desired temperature widget.
![Capture d’écran (49)|690x387](upload

[quote="elfedagger, post:

As a trigger, I’d use the current temperature of your spa! Right?

Since version 4.41 I’ve solved my problem. The ability to listen to a custom MQTT topic allowed me to retrieve the current temperature of the water in my spa. For two days Gladys has been controlling my spa without going through Node-RED. The only remaining problem is that my scenes that turn the spa and the filtration on and off in the morning and evening send the MQTT on and off messages directly to the module’s topics in my spa, and so on my dashboard I don’t see the on/off buttons change state. I don’t know if my spa is on or off remotely.

@elfedagger Awesome :slight_smile: Glad that fixes your issue.

In your scene, you can control these devices so that it’s also reflected in Gladys :slight_smile: