I know @skarcha is working on an mqtt plugin to create attributes dynamically, but in the meantime I hacked together a simple mqtt sensor plugin where you have to specify the list of attributes and topics here.
I am not very familiar with the plugin framework and have never used Coffeescript before, so I’m probably doing quite a few things wrong. I called it mqtt-simple becaues it’s very basic. I used @skarcha’s nut plugin as a template to get started.
The plugin creates a new connection to the mqtt server for each device you create. I’m considering moving the connection settings to the plugin configuration rather than the device instances, but that limits you to only using a single mqtt server.
You can specify multiple topics/attributes for a single device and will use a single connection for all of those topics.
(Also see discussion here: http://forum.pimatic.org/topic/344/pimatic-mqtt-would-be-nice/9 )
Update 2015-08-07: This plugin is now on NPM: https://www.npmjs.com/package/pimatic-mqtt-simple
You can install it or update it by going to your pimatic-app directory (the one with config.json and node_modules) and running
npm install pimatic-mqtt-simple