From 27d9066f97ef24a6463ffc86eae785df9a53a9fe Mon Sep 17 00:00:00 2001 From: Varun Date: Wed, 8 Jan 2025 11:39:57 +0530 Subject: [PATCH] reverted mqtt --- src/controllers/tanksController.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 95a20042..794e7455 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -3381,7 +3381,7 @@ exports.IotDevice = async (req, reply) => { } }; - +console.log("this is for testing push") exports.IotDeviceforstandalonedevice = async (req, reply) => { try { @@ -4620,6 +4620,9 @@ exports.getBlockData = async (req, reply) => { }; + + + const mqtt = require('mqtt'); const client = mqtt.connect('mqtt://35.207.198.4:1883'); // Connect to MQTT broker @@ -4786,7 +4789,6 @@ client.on('message', async (topic, message) => { }); - // Function to publish motor stop status // exports.publishMotorStopStatus = async (motor_id, motor_stop_status) => { // const payload = {