MQTT To Virtual Thing Adapter

Here’s an interesting idea for those who are interested! Sadly I don’t have the time to actually do it :cry: (new job, first daughter coming)

There’s an adapter already created for virtual things, this allows us to play around with, well, virtual things, but what if we could map those virtual things to MQTT topics & messages?

So, an example:

After configuring the MQTT broker settings, a user would be able to map:

  • An OnOffProperty could be mapped to 2 MQTT topics (but usually the same) with a configurable message…
  • Similarly a BrightnessProperty could be mapped to 2 MQTT topics, just as before to read & write the value set.

This approach is what about a 100% of MQTT dashboards for android use, and could be the missing link for wider adoption.

There’s a basic MQTT adapter implementation https://github.com/hobinjk/mqtt-adapter

I’m not sure how current it is and I am also pretty sure that it was built more as a starting point to implement a specific MQTT dialect rather than usage as a generic, configurable MQTT adapter.

(I think the way you use “virtual thing” is how all adapters think of their things)

This adapter is not finished, I started to make mine and it’s still not yet published but meanwhile you can implement webthings to bridge mqtt to rest…

Maybe I should upstream this in webthing-node 1st or any other project ?