|
|
@ -3381,7 +3381,7 @@ exports.IotDevice = async (req, reply) => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log("this is for testing push")
|
|
|
|
|
|
|
|
|
|
|
|
exports.IotDeviceforstandalonedevice = async (req, reply) => {
|
|
|
|
exports.IotDeviceforstandalonedevice = async (req, reply) => {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -4620,6 +4620,9 @@ exports.getBlockData = async (req, reply) => {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const mqtt = require('mqtt');
|
|
|
|
const mqtt = require('mqtt');
|
|
|
|
const client = mqtt.connect('mqtt://35.207.198.4:1883'); // Connect to MQTT broker
|
|
|
|
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
|
|
|
|
// Function to publish motor stop status
|
|
|
|
// exports.publishMotorStopStatus = async (motor_id, motor_stop_status) => {
|
|
|
|
// exports.publishMotorStopStatus = async (motor_id, motor_stop_status) => {
|
|
|
|
// const payload = {
|
|
|
|
// const payload = {
|
|
|
|