User Tools

Site Tools


sib:listeners:tellduslistener

TelldusListener

Overview

The TelldusListener connects to the unix-socket created by the Telldus with the telldus-core installed. It parses all incoming events on the 433MHz band and pushes them out to the configured MQTT topic.

Workflow

  • Listen to unix-socket (default /tmp/TelldusEvents)
    • on data
      • custom.inputFormat
      • Publish: custom.topic

Custom configuration

tellduslistener/custom.js
var TelldusListenerCustom = {
	_id: "telldus:1",
	_name: "RIoT Telldus Listener",
	inputFormat: (topic, msg, cb)=>{
		cb( msg );
	},
	loggerCfg: {
		dest: {
			file: false,
			console: true,
			mqtt: true
		}
	},
	mqtt: "mqtt://localhost",
	topic: "SIB/Sample/TelldusListener"
};
 
module.exports = TelldusListenerCustom;
  • _id: The unique ID of this service
  • _name: A plaintext description of this service
  • inputFormat(topic, msg, cb): The method that is run on service activation. The original message is passed as the argument and the return value from this method must be a JSON formatted message conforming to the SIB message standard.
  • loggerCfg: A JSON Object defining what logger actions should be active for this service (see Logger Configuration
  • mqtt: The MQTT connection string for the internal MQTT transport
  • publishInput: If defined overrides the standard publishing to the internal MQTT transfer
  • topic: The MQTT topic to publish to on the internal MQTT transport
sib/listeners/tellduslistener.txt · Last modified: 2019/02/24 16:20 by hubbe