How to use the mqtt.value function in mqtt

To help you get started, we’ve selected a few mqtt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github thirug010 / Virtual-Tasmota-for-Tuya-api-devices / tuya_api_mqtt.js View on Github external
var teleCallback = function(args)
		{
			var d = n$.LinqIt(cTad(),true).Where([{PropertyName : 'nodeId', PropertyValue : args.nodeId}]).FirstOrDefault();
			var topic = mqtt_cmnds.tel.format(d.nodeId);
			var msg = JSON.stringify(d.getData());
			if(n$.isNull(d.setOption19, false))
			{
					msg = JSON.stringify(d.getData()).toLowerCase();
			}
			console.log('Publish topic('+topic+')', mqtt.value);
			client.publish(topic, msg);
		}
		vl.teleTimeoutcb =  setInterval(teleCallback,t, {nodeId : v.nodeId});