// await sendNotification(fcmTokens, 'Motor Started', `Motor ID: ${motorId} started successfully at ${timestamp}. Current Water Level: ${waterLevel} Ltrs`);
// await sendNotification(fcmTokens, 'Motor Started', `Motor ID: ${motorId} started successfully at ${timestamp}. Current Water Level: ${waterLevel} Ltrs`);
// const message = `MotorId '${motorId}' Water supply from '${blockName}' to '${tankName}' started at ${startTime} by '${motorOnType}' mode and will stop after ${stopCriteria}. Current Water Level: ${waterLevel} Ltrs.`;
constmessage=`MotorId '${motorId}' Water supply from '${blockName}' to '${tankName}' started at ${startTime} by '${motorOnType}' mode and will stop after ${stopCriteria}. Current Water Level: ${waterLevel} Ltrs.`;
constmessage=`Tank Name: '${tankName}', Pump started at '${startTime}' by Initiated by user(s): ${userNames} '${motorOnType}' and will stop after '${stopCriteria}'`;
// Send the notification
awaitsendNotification(fcmTokens,'Arminta Water Management',message);
}catch(error){
console.error('Error in motorStart event:',error);
constmessage=`MotorId '${motorId}' Water supply from '${blockName}' to '${tankName}' stopped at ${stopTime} by '${motorOnType}' mode. Current Water Level: ${waterLevel} Ltrs.`;
// const message = `MotorId '${motorId}' Water supply from '${blockName}' to '${tankName}' stopped at ${stopTime} by '${motorOnType}' mode. Current Water Level: ${waterLevel} Ltrs.`;