Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
app-hotes:wwan-statistics [2025/11/25 08:08] – [5. Additional information] grayapp-hotes:wwan-statistics [2025/11/25 11:40] (current) – [Goal] gray
Line 3: Line 3:
 ===== Goal ===== ===== Goal =====
  
-This SDK script queries the WWAN data volume from Download. It collects the value for one month and resets the value for the next month. This provides information on how much free data volume the SIM card still has for that month. The customer is informed after the data has been used up. When ''50 percent'' of the data has been used, an email is sent every day. When ''75 percent'' of the data has been used, an email is sent every 12 hours. When 90 percent of the data has been used, you receive an email every 6 hours. If ''100 percent'' of the data volume has already been used within the month, you receive an email every ''20 minutes'' and an additional text message informing you that ''only 64 kBits/s'' are now available in the mobile network. The subject line contains additional information such as the ''serial number'' and ''router name'', so you can better identify which router is affected.+This SDK script queries the WWAN data volume from Download. It collects the value for one month and resets the value for the next month. This provides information on how much free data volume the SIM card still has for that month. The customer is informed after the data has been used up. When ''50 percent'' of the data has been used, an email is sent every ''day''. When ''75 percent'' of the data has been used, an email is sent every ''12 hours''. When ''90 percent'' of the data has been used, you receive an email every ''6 hours''. If ''100 percent'' of the data volume has already been used within the month, you receive an email every ''20 minutes'' and an additional text message informing you that ''only 64 kBits/s'' are now available in the mobile network. The subject line contains additional information such as the ''serial number'' and ''router name'', so you can better identify which router is affected.
  
 ===== Prerequisites ===== ===== Prerequisites =====
Line 141: Line 141:
 ###################################################################################################### ######################################################################################################
  
 +current_date =strftime("%Y-%m-%d_%H:%M:%S",localtime(time()));
 printf("The SDK script is started\n"); printf("The SDK script is started\n");
 +printf("Current date: %s\n",current_date);
 while (true) { while (true) {
  year = strftime("%Y",localtime(time()));  year = strftime("%Y",localtime(time()));
Line 298: Line 300:
  sleep(interval);  # 20 minutes  sleep(interval);  # 20 minutes
  printf("\nNext run\n");  printf("\nNext run\n");
 + current_date =strftime("%Y-%m-%d_%H:%M:%S",localtime(time()));
 + printf("Current date: %s\n",current_date);
  release_point_alert_email = 1;  release_point_alert_email = 1;
  if (alert2_value >= alert2_value_time){  if (alert2_value >= alert2_value_time){
Line 576: Line 580:
            }            }
  sleep(interval);  # 20 minutes  sleep(interval);  # 20 minutes
- printf("Current date: %s\n",current_date); 
  printf("\nNext run\n");  printf("\nNext run\n");
 + current_date =strftime("%Y-%m-%d_%H:%M:%S",localtime(time()));
 + printf("Current date: %s\n",current_date);
  release_point_alert_email = 1;  release_point_alert_email = 1;
  if (alert2_value >= alert2_value_time){  if (alert2_value >= alert2_value_time){