Problem retrieving a Text value stored in MQTT

Hello,
I’ve been trying for several days to understand why I can’t retrieve text values that I stored in MQTT.

I have 2 simple examples to illustrate my case.

1. Retrieving a value coming from Jeedom
From Jeedom I publish values from la téléinfo that I retrieve. I can retrieve the numeric values (from object 579 for example), but it’s impossible to retrieve the value of object 578 to display it on my dashboard (OPTARIF) :


I tested as an object Text or Mode and neither works.

2. Retrieving a text to send it to another MQTT object
For my heating, I send a text value to MQTT (Confort for example) :


When I retrieve it, I get a null value… which I send back to MQTT instead of being able to resend the original text.

And tonight I finally understood why I couldn’t retrieve this text: I was using the « Get last state » block and that block doesn’t retrieve text but only numeric values :frowning:
Of course, I would also like to retrieve this text value to make conditions in scenes and for now I’m leaving it aside since it doesn’t work as I wish.

I found this post Permettre la recuperation de data de type text ou alpha! but the final solution doesn’t mention retrieval via scenes, only the dashboard.
I’m probably confusing a lot of things, I’m a beginner :wink:

Would anyone have a solution (simple if possible) to retrieve text values stored in MQTT?

Hi @mutmut :slight_smile:

Indeed, it is not possible to do what you want to do, except by using integers instead of text.

What exactly do you want to do (functionally), what is the final use?

Hi @pierre-gilles ,

**

Precisely, I’d like to know the final use! Text is abstract — what text?

In Gladys, we always adopt a specific rather than a generic approach :slight_smile: This allows us to create an « all-in-one » ecosystem where device features are fully exploited by Gladys, whether via AI, scenes or the interface.

I have the impression you’re starting from Jeedom to try to do the same thing on Gladys; I think you should do the opposite: start from Gladys and then try to interface that with Jeedom :slight_smile:

In Gladys, heating is a full-fledged feature, with native « heating » feature types — why not use them and then hook Jeedom up to this native heating?

In particular a piece of info from my TIC frame which is OPTARIF. The frame is currently not correct and sends me OPTARIF=BASE whereas I’m in TEMPO. So I want to monitor this info from Gladys to then work on TEMPO-oriented graphs (HCHP/BleuRouge/Blanc) with the correct indices from the frame.
I admit it, nothing generic about my request, but it’s only for me for a short period of time (I hope) :sweat_smile:

Well, I don’t know that part and I’d welcome any info!
I’ve seen things related to heating modules in z2m but nothing generic directly in Gladys :frowning:

oh yes, you’re not wrong :rofl:

Consumption graphs? In kWh?

In the MQTT integration, you create a device.

You add a capability « Heating - Mode »:

Which you can then display on the dashboard:

And control it :slight_smile:

If you want Jeedom to react to MQTT events, you can subscribe to the MQTT topic in Jeedom provided by Gladys.

And then you’ll receive 6 events with 6 possible values:

Off → 0
Frost protection → 1
Eco → 2
Comfort -1°C → 3
Comfort -2°C → 4
Comfort → 5

You don’t have to use all these modes of course :slight_smile:

Then, for the setpoint temperature, you can add a new capability:

Which brings us to this:

And on the dashboard:

In Jeedom, you can subscribe to the MQTT topic, and you’ll receive the temperature on the topic at each change :slight_smile:

Feel free to ask if you have any questions

Yes, among other things.
I want to set up complete tracking for total consumption, daily, etc., and the associated costs (without including taxes for now).
Energy consumption monitoring (electric/gas/water/etc.) could be a Gladys module. Personally I don’t have the knowledge to do it but I use on Jeedom a plugin Suivi Conso that does that and if we had something in Gladys, that would be great.

a big THANK YOU @pierre-gilles for this tutorial which is just awesome :raised_hands:

Un module comme celui là par exemple ? :joy:

Je suis d’accord que cette intégration n’est pas totalement complète, je ne gère pas pour l’instant la production électrique (que la consommation), et je ne fais pour l’instant qu’un suivi en kWh, pas en euro. Mais c’est déjà un bon début :slight_smile:

Pour le calcul de la consommation en euro, il y a une demande : Widget consommation électrique avec prix

Avec plaisir !

Non, je te l’ai fais en 2 minutes ce matin :stuck_out_tongue:

[quote="

and well there you go, since that day my TIC frame has been sending me TEMPO info and no longer BASE, one problem less!!
I’ll be able to start on the graphs for each index (it’s going to be a bit long given my skill level!).

Yes, but nothing prevents you from using the same feature and leveraging all the work that has been done on Enedis :slight_smile: You’ll benefit from the same improvements if one day we add consumption in euros, for example

This topic can be closed, resolved with Gladys 4.58