One thing has always bothered me about MQTT in practice: devices publish where they want to, for example: tasmota/devices/14835A/...
The device ID is in there, fine. But every time I want to query or subscribe to that sensor, I first have to look up what device 14835A actually is. Is it my living room or is it the kitchen? Is it a temp sensor? Or is it a power meter?
With virtual topics, you can now define views on top of real topics. The sensor above can also be made available as: austria/vogler/office/temperature/..
Same data, two (or more) names. No republishing, no copying, no duplicated messages.
- 👉 Map a single topic, or mount a whole subtree
- 👉 Wildcard subscriptions work on the virtual tree
- 👉 Each node is read-only or read-write
That way you can have a location view, an asset view, or an ISA-95 style view of the same devices, all at the same time.
Now my question to you: is this useful, or should I drop it again? How do you deal with this today? Republishing in Node-RED, a strict UNS naming convention from day one, or just an Excel sheet? 😉
