0.1.1 • Published 8 years ago

concava-adapter-mqtt v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

ConCaVa MQTT storage adapter

ConCaVa adapter for storage through MQTT.

This storage adapter receives data from ConCaVa and publishes the JSON payload on topic concava/<device ID>. Mosca is used as the MQTT broker.

See ConCaVa with MariaDB and MQTT for a working setup.

Requires ConCaVa v0.4+.

Install

npm install concava-adapter-mqtt

Configure

A ConCaVa configuration example:

import { storage } from 'concava-adapter-mqtt'

export default {
	debug: true,

	...

	storage: {
		method: storage,
		config: {
			port: 1883,
			backend: {
				type: 'mongo',
				url: 'mongodb://example.com:27017/mqtt',
				pubsubCollection: 'concava',
				mongo: {},
			},
		},
	},
}