|
|
|
@ -1710,10 +1710,10 @@ eventEmitter.on(
|
|
|
|
const message =
|
|
|
|
const message =
|
|
|
|
`🚰 Motor Name: ${motorName}\n` +
|
|
|
|
`🚰 Motor Name: ${motorName}\n` +
|
|
|
|
`🚰 Tank Name: '${tankName}'\n` +
|
|
|
|
`🚰 Tank Name: '${tankName}'\n` +
|
|
|
|
`🚰 Block Name: '${blockName}'\n` +
|
|
|
|
`🏢 Block Name: '${blockName}'\n` +
|
|
|
|
`👤 Started by: ${userNames}\n` +
|
|
|
|
`👤 Started by: ${userNames}\n` +
|
|
|
|
`📱 Mode: '${startMethod}'\n` +
|
|
|
|
`📱 Mode: '${startMethod}'\n` +
|
|
|
|
`🕒 Pump started at: ${startTime} (Time: ${formattedTime} on ${formattedDate})\n` +
|
|
|
|
`🕒 Pump started at: ${startTime} \n` +
|
|
|
|
`Will stop after: '${manual_threshold_time}' mins`;
|
|
|
|
`Will stop after: '${manual_threshold_time}' mins`;
|
|
|
|
|
|
|
|
|
|
|
|
// Send the notification
|
|
|
|
// Send the notification
|
|
|
|
@ -1746,11 +1746,11 @@ eventEmitter.on(
|
|
|
|
// Prepare the message
|
|
|
|
// Prepare the message
|
|
|
|
const message =
|
|
|
|
const message =
|
|
|
|
`🚰 Motor Name: ${motorName}\n` +
|
|
|
|
`🚰 Motor Name: ${motorName}\n` +
|
|
|
|
`🚰 Tank Name: '${tankName}'\n` +
|
|
|
|
`🛢️ Tank Name: '${tankName}'\n` +
|
|
|
|
`🚰 Block Name: '${blockName}'\n` +
|
|
|
|
`🏢 Block Name: '${blockName}'\n` +
|
|
|
|
`👤 Stopped by: ${userNames}\n` +
|
|
|
|
`👤 Stopped by: ${userNames}\n` +
|
|
|
|
`📱 Mode: '${stopMethod}'\n` +
|
|
|
|
`📱 Mode: '${stopMethod}'\n` +
|
|
|
|
`🕒 Pump stopped at: ${stopTime} (Time: ${formattedTime} on ${formattedDate})\n` +
|
|
|
|
`🕒 Pump stopped at: ${stopTime}\n` +
|
|
|
|
`💧 Total water pumped: ${totalWaterPumped} liters\n`; // Ensure this line is properly terminated
|
|
|
|
`💧 Total water pumped: ${totalWaterPumped} liters\n`; // Ensure this line is properly terminated
|
|
|
|
|
|
|
|
|
|
|
|
// Send the notification
|
|
|
|
// Send the notification
|
|
|
|
@ -1784,11 +1784,11 @@ eventEmitter.on(
|
|
|
|
// Prepare the message
|
|
|
|
// Prepare the message
|
|
|
|
const message =
|
|
|
|
const message =
|
|
|
|
`🚰 Motor Name: ${motorName}\n` +
|
|
|
|
`🚰 Motor Name: ${motorName}\n` +
|
|
|
|
`🚰 Tank Name: '${tankName}'\n` +
|
|
|
|
`🛢️ Tank Name: '${tankName}'\n` +
|
|
|
|
`🚰 Block Name: '${blockName}'\n` +
|
|
|
|
`🏢 Block Name: '${blockName}'\n` +
|
|
|
|
`👤 Started by: '${startMethod}' \n` +
|
|
|
|
`👤 Started by: '${startMethod}' \n` +
|
|
|
|
`📱 Mode: "Atomatic System" \n` +
|
|
|
|
`📱 Mode: "Atomatic System" \n` +
|
|
|
|
`🕒 Pump started at: ${startTime} (Time: ${formattedTime} on ${formattedDate})\n` +
|
|
|
|
`🕒 Pump started at: ${startTime} \n` +
|
|
|
|
`Will stop after: '${threshold}' `;
|
|
|
|
`Will stop after: '${threshold}' `;
|
|
|
|
|
|
|
|
|
|
|
|
// Send the notification
|
|
|
|
// Send the notification
|
|
|
|
@ -1970,11 +1970,11 @@ eventEmitter.on(
|
|
|
|
// Prepare the notification message
|
|
|
|
// Prepare the notification message
|
|
|
|
const message =
|
|
|
|
const message =
|
|
|
|
`🚰 Motor Name: ${motorName}\n` +
|
|
|
|
`🚰 Motor Name: ${motorName}\n` +
|
|
|
|
`🚰 Tank Name: '${tankName}'\n` +
|
|
|
|
`🛢️ Tank Name: '${tankName}'\n` +
|
|
|
|
`🏢 Block Name: '${blockName}'\n` +
|
|
|
|
`🏢 Block Name: '${blockName}'\n` +
|
|
|
|
`👤 Started by: ${userNames}\n` +
|
|
|
|
`👤 Started by: ${userNames}\n` +
|
|
|
|
`📱 Mode: '${startMethod}'\n` +
|
|
|
|
`📱 Mode: '${startMethod}'\n` +
|
|
|
|
`🕒 Pump started at: ${startTime} (Time: ${formattedTime} on ${formattedDate})\n` +
|
|
|
|
`🕒 Pump started at: ${startTime} \n` +
|
|
|
|
stopConditionMessage; // Add only the relevant stop condition
|
|
|
|
stopConditionMessage; // Add only the relevant stop condition
|
|
|
|
|
|
|
|
|
|
|
|
// Send the notification
|
|
|
|
// Send the notification
|
|
|
|
@ -2093,10 +2093,10 @@ eventEmitter.on(
|
|
|
|
// Prepare the notification message
|
|
|
|
// Prepare the notification message
|
|
|
|
const message =
|
|
|
|
const message =
|
|
|
|
`🚰 Motor Name: ${motorName}\n` +
|
|
|
|
`🚰 Motor Name: ${motorName}\n` +
|
|
|
|
`🚰 Tank Name: '${tankName}'\n` +
|
|
|
|
`🛢️ Tank Name: '${tankName}'\n` +
|
|
|
|
`🏢 Block Name: '${blockName}'\n` +
|
|
|
|
`🏢 Block Name: '${blockName}'\n` +
|
|
|
|
`📱 Mode: '${stopMethod}'\n` +
|
|
|
|
`📱 Mode: '${stopMethod}'\n` +
|
|
|
|
`🕒 Pump stopped at: ${stopTime} (Time: ${formattedTime} on ${formattedDate})\n` +
|
|
|
|
`🕒 Pump stopped at: ${stopTime}\n` +
|
|
|
|
stopConditionMessage;
|
|
|
|
stopConditionMessage;
|
|
|
|
|
|
|
|
|
|
|
|
// Send the notification
|
|
|
|
// Send the notification
|
|
|
|
@ -3794,9 +3794,9 @@ const motorActionAuto = async (req, reply) => {
|
|
|
|
|
|
|
|
|
|
|
|
const stopMessage =
|
|
|
|
const stopMessage =
|
|
|
|
`🚰 Motor Name: ${tankName}-${blockName}-${typeOfWater}\n` +
|
|
|
|
`🚰 Motor Name: ${tankName}-${blockName}-${typeOfWater}\n` +
|
|
|
|
`🚰 Tank Name: '${tankName}'\n` +
|
|
|
|
`🛢️ Tank Name: '${tankName}'\n` +
|
|
|
|
`🚰 Block Name: '${blockName}'\n` +
|
|
|
|
`🏢 Block Name: '${blockName}'\n` +
|
|
|
|
`🕒 Pump stopped at: ${stopTime} (Time: ${formattedTime} on ${formattedDate})\n` +
|
|
|
|
`🕒 Pump stopped at: ${stopTime}\n` +
|
|
|
|
`⏳ Operation Duration: ${threshold} `;
|
|
|
|
`⏳ Operation Duration: ${threshold} `;
|
|
|
|
|
|
|
|
|
|
|
|
// Send stop notification
|
|
|
|
// Send stop notification
|
|
|
|
|