diff --git a/system/controllers/autoload.php b/system/controllers/autoload.php
index e0920b5e..92f7688c 100644
--- a/system/controllers/autoload.php
+++ b/system/controllers/autoload.php
@@ -85,15 +85,56 @@ switch ($action) {
         $ui->display('autoload.tpl');
         break;
     case 'customer_is_active':
-        $d = ORM::for_table('tbl_user_recharges')->where('customer_id', $routes['2'])->findOne();
-        if ($d) {
-            if ($d['status'] == 'on') {
-                die('<span class="label label-success" title="Expired ' . Lang::dateAndTimeFormat($d['expiration'], $d['time']) . '">' . $d['namebp'] . '</span>');
-            } else {
-                die('<span class="label label-danger" title="Expired ' . Lang::dateAndTimeFormat($d['expiration'], $d['time']) . '">' . $d['namebp'] . '</span>');
+        $c = ORM::for_table('tbl_customers')->where('username', $routes['2'])->find_one();
+        $p = ORM::for_table('tbl_plans')->find_one($routes['3']);
+        $dvc = Package::getDevice($p);
+        if ($_app_stage != 'demo') {
+            if (file_exists($dvc)) {
+                require_once $dvc;
+                try {
+                    //don't wait more than 5 seconds for response from device, otherwise we get timeout error.
+                    ini_set('default_socket_timeout', 5);
+                    if ((new $p['device'])->online_customer($c, $p['routers'])) {
+                        echo '<span class="label label-success" title="online">&nbsp;</span>';
+                    }
+                } catch (Exception $e) {
+                    echo '<span class="label label-danger" title="error">&nbsp;</span>';
+                }
             }
+        }
+        break;
+    case 'plan_is_active':
+        $ds = ORM::for_table('tbl_user_recharges')->where('customer_id', $routes['2'])->find_array();
+        if ($ds) {
+            $ps = [];
+            $c = ORM::for_table('tbl_customers')->find_one($routes['2']);
+            foreach ($ds as $d) {
+                if ($d['status'] == 'on') {
+                    $p = ORM::for_table('tbl_plans')->find_one($d['plan_id']);
+                    $dvc = Package::getDevice($p);
+                    $status = "";
+                    if ($_app_stage != 'demo') {
+                        if (file_exists($dvc)) {
+                            require_once $dvc;
+                            try {
+                                //don't wait more than 5 seconds for response from device, otherwise we get timeout error.
+                                ini_set('default_socket_timeout', 5);
+                                if ((new $p['device'])->online_customer($c, $p['routers'])) {
+                                    $status = '<span class="label label-success" title="online">&nbsp;</span>';
+                                }
+                            } catch (Exception $e) {
+                                $status = '<span class="label label-danger" title="error">&nbsp;</span>';
+                            }
+                        }
+                    }
+                    $ps[] = ('<span class="label label-primary m-1" title="Expired ' . Lang::dateAndTimeFormat($d['expiration'], $d['time']) . '">' . $d['namebp'] . ' ' . $status . '</span>');
+                } else {
+                    $ps[] = ('<span class="label label-danger m-1" title="Expired ' . Lang::dateAndTimeFormat($d['expiration'], $d['time']) . '">' . $d['namebp'] . '</span>');
+                }
+            }
+            echo implode("<br>", $ps);
         } else {
-            die('<span class="label label-danger">&bull;</span>');
+            die('');
         }
         break;
     case 'customer_select2':
diff --git a/system/devices/MikrotikHotspot.php b/system/devices/MikrotikHotspot.php
index f3b6226a..84c041f4 100644
--- a/system/devices/MikrotikHotspot.php
+++ b/system/devices/MikrotikHotspot.php
@@ -109,9 +109,10 @@ class MikrotikHotspot
         $client = $this->getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
         $printRequest = new RouterOS\Request(
             '/ip hotspot active print',
-            RouterOS\Query::where('name', $customer['username'])
+            RouterOS\Query::where('user', $customer['username'])
         );
-        return $client->sendSync($printRequest)->getProperty('.id');
+        $id =  $client->sendSync($printRequest)->getProperty('.id');
+        return $id;
     }
 
     function connect_customer($customer, $ip, $mac_address, $router_name)
diff --git a/ui/ui/customers.tpl b/ui/ui/customers.tpl
index 7829ffcd..7bb00743 100644
--- a/ui/ui/customers.tpl
+++ b/ui/ui/customers.tpl
@@ -132,7 +132,7 @@
                                                     class="glyphicon glyphicon-map-marker"></i></a>
                                         {/if}
                                     </td>
-                                    <td align="center" api-get-text="{$_url}autoload/customer_is_active/{$ds['id']}">
+                                    <td align="center" api-get-text="{$_url}autoload/plan_is_active/{$ds['id']}">
                                         <span class="label label-default">&bull;</span>
                                     </td>
                                     <td>{$ds['service_type']}</td>