mutmut
April 9, 2025, 11:59am
1
Since Gladys version Gladys 4.24 , you can send text to MQTT and display it on the dashboard.
I would like to be able to retrieve values containing text from a custom topic to then display them on the dashboard and, above all, use them in scenes.
Example 1: retrieve the value of the z2m bridge state and send a Telegram message when it goes offline:
Example 2: retrieve the current electricity tariff value:
{
"value": "HCJB",
"humanName": "[Maison][xxxxxxxx][PTEC]",
"unite": "",
"name": "PTEC",
"type": "info",
"subtype": "string"
}
Is it the same idea as calling a web API in the end, but using Zigbee?
mutmut
April 14, 2025, 8:27pm
3
I was thinking of it as a custom topic in an MQTT feature that retrieves a single value as soon as it changes.
If we go through an HTTP request, you need a scene that has to run all the time, so not necessarily ideal.
1 Like
Hi @mutmut
I was sure it was already possible, but a few lines of code were missing to make it work.
It’s fixed!
If I configure a feature with a custom MQTT topic :
When I send a message on this custom topic :
I can see this text on my dashboard :
The PR :
master ← mqtt-custom-topic-support-text-feature
ouvert 11:01AM - 09 May 25 UTC
### Pull Request check-list
To ensure your Pull Request can be accepted as fa… st as possible, make sure to review and check all of these items:
- [x] If your changes affects code, did your write the tests?
- [x] Are tests passing? (`npm test` on both front/server)
- [x] Is the linter passing? (`npm run eslint` on both front/server)
- [x] Did you run prettier? (`npm run prettier` on both front/server)
- [x] If you are adding a new features/services, did you run integration comparator? (`npm run compare-translations` on front)
- [x] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community ([french forum](https://community.gladysassistant.com/)/[english forum](https://en-community.gladysassistant.com/)) for testing before merging.
### Description of change
https://community.gladysassistant.com/t/recuperer-une-valeur-text-depuis-mqtt/9472
4 Likes
It’s merged and will be included in the next version of Gladys
2 Likes
@pierre-gilles at this rate of PRs merged since the start of the week, you’re going to need 1 full day to write the changelog
1 Like
And we, users, will have several days to discover everything and imagine new scenes or new dashboards… I can’t wait!
1 Like
This new feature is available in Gladys Assistant 4.58 :
Salut la communauté
Je suis très heureux de vous présenter Gladys Assistant 4.58, une nouvelle version majeure qui apporte le support de Matter, ainsi que plein d’autres nouveautés pratiques !
Tous les détails sont sur le blog :
N’hésitez pas à me faire part de vos retours