From 00eee1f826cd7cd75939c9aab5c7782dcc59879f Mon Sep 17 00:00:00 2001 From: Varun Date: Tue, 29 Oct 2024 13:39:29 +0530 Subject: [PATCH] mqtt --- src/controllers/tanksController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 703650eb..ffbfeb44 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -1519,7 +1519,7 @@ const sendNotification = async (fcmTokens, title, body) => { // } // }; -exports.publishMotorStopStatus = async (motor_id, motor_stop_status) => { +exports. publishMotorStopStatus = async (motor_id, motor_stop_status) => { const payload = { topic: 'operation', object: { @@ -4370,7 +4370,7 @@ exports.getBlockData = async (req, reply) => { const mqtt = require('mqtt'); -const client = mqtt.connect('mqtt://35.207.198.4:1884'); // Connect to MQTT broker +const client = mqtt.connect('mqtt://35.207.198.4:1883'); // Connect to MQTT broker client.on('connect', () => { console.log('Connected to MQTT broker');