![]() |
How to use a variable's value to create a dynamic MQTT subscription topic? - Printable Version +- Virtuino Forum (https://virtuino.com/forum) +-- Forum: Virtuino (https://virtuino.com/forum/forumdisplay.php?fid=1) +--- Forum: Virtuino IoT (https://virtuino.com/forum/forumdisplay.php?fid=2) +--- Thread: How to use a variable's value to create a dynamic MQTT subscription topic? (/showthread.php?tid=22333) |
How to use a variable's value to create a dynamic MQTT subscription topic? - spidgrou - 09-19-2025 Hello everyone, I'm trying to create a dynamic MQTT subscription topic that is built using the value from another variable, but I can't seem to find the correct syntax. Here is my setup:
Y/$C2_V0.value/AC/CHARGER/Current However, this doesn't work. It seems the app is not replacing $C2_V0.value with the actual serial number ("MySerialNumber123"). It treats it as a literal string. Is it possible to dynamically build a subscription topic using the value of another variable? If so, what is the correct syntax I should use? Thank you for your help |