{"id":553,"date":"2023-03-30T17:49:06","date_gmt":"2023-03-30T09:49:06","guid":{"rendered":"https:\/\/doc.orionstar.com\/en\/?post_type=lsvr_kba&#038;p=553"},"modified":"2026-11-03T11:00:21","modified_gmt":"2026-11-03T03:00:21","slug":"power-control","status":"publish","type":"lsvr_kba","link":"https:\/\/doc.orionstar.com\/en\/knowledge-base\/power-control\/","title":{"rendered":"Power Control"},"content":{"rendered":"\n<p class=\"has-medium-font-size\"><strong>Get the Current Battery Level<\/strong><\/p>\n\n\n\n<p>Method:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">RobotSettingApi.getInstance().getRobotString(Definition.ROBOT_SETTINGS_BATTERY_INFO);<\/pre>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td>GreetingBot<\/td><td>GreetingBot Mini<\/td><td>LuckiBot<\/td><td>DeliverBot Max<\/td><td>BigScreenBot<\/td><\/tr><tr><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Start Auto-Recharge<\/strong><\/p>\n\n\n\n<p>Method name: startNaviToAutoChargeAction<\/p>\n\n\n\n<p>How to call:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">RobotApi.getInstance().startNaviToAutoChargeAction(reqId, timeout, new ActionListener() {\n    @Override\n    public void onResult(int status, String responseString) throws RemoteException {\n        switch (status) {\n            case Definition.RESULT_OK:\n                \/\/Charging succeeded\n                break;\n            case Definition.RESULT_FAILURE:\n                \/\/Charging failed\n                break;\n        }\n    }\n    @Override\n    public void onStatusUpdate(int status, String data) throws RemoteException {\n        switch (status) {\n            case Definition.STATUS_NAVI_GLOBAL_PATH_FAILED:\n                \/\/Global path planning failed\n                break;\n            case Definition.STATUS_NAVI_OUT_MAP:\n                \/\/The target point cannot be reached: the destination is outside the map. The map may not match the map point; please set the map point again\n                break;\n            case Definition.STATUS_NAVI_AVOID:\n                \/\/The route to the charging point is blocked by obstacles\n                break;\n            case Definition.STATUS_NAVI_AVOID_END:\n                \/\/The obstacles have been removed\n                break;\n            default:\n                break;\n        }\n    }\n});<\/pre>\n\n\n\n<p>Parameters<\/p>\n\n\n\n<div class=\"is-layout-flex wp-container-2 wp-block-columns has-small-font-size\">\n<div class=\"is-layout-flow wp-block-column has-small-font-size\" style=\"flex-basis:100%\">\n<blockquote class=\"wp-block-quote has-small-font-size\">\n<ul>\n<li><strong>timeout<\/strong>: navigation timeout. If the robot does not reach the charging pile within this time, auto-recharge is considered to have failed<\/li>\n<\/ul>\n<\/blockquote>\n<\/div>\n<\/div>\n\n\n\n<p>Supported platforms:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td>GreetingBot<\/td><td>GreetingBot Mini<\/td><td>LuckiBot<\/td><td>DeliverBot Max<\/td><td>BigScreenBot<\/td><\/tr><tr><td>Yes<\/td><td>Yes<\/td><td>No<\/td><td>No<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Stop Auto-Recharge<\/strong><\/p>\n\n\n\n<p>Method name: stopAutoChargeAction<\/p>\n\n\n\n<p>How to call:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">RobotApi.getInstance().stopAutoChargeAction(reqId, true);<\/pre>\n\n\n\n<p>Supported platforms:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td>GreetingBot<\/td><td>GreetingBot Mini<\/td><td>LuckiBot<\/td><td>DeliverBot Max<\/td><td>BigScreenBot<\/td><\/tr><tr><td>Yes<\/td><td>Yes<\/td><td>No<\/td><td>No<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Stop Charging and Leave the Charging Pile<\/strong><\/p>\n\n\n\n<p>Method name: leaveChargingPile<\/p>\n\n\n\n<p>How to call:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">RobotApi.getInstance().leaveChargingPile(reqId, speed, distance, new CommandListener() {\n            @Override\n            public void onStatusUpdate(int status, String data, String extraData) {\n                Log.d(TAG, \"leaveChargingPile onStatusUpdate: \" + status + \" data:\" + data + \" extraData:\" + extraData);\n            }\n\n            @Override\n            public void onError(int errorCode, String errorString, String extraData) {\n                Log.d(TAG, \"leaveChargingPile errorCode: \" + errorCode + \" errorString:\" + errorString + \" extraData:\" + extraData);\n                switch (errorCode) {\n                    case Definition.RESULT_FAILURE_MOTION_AVOID_STOP:\/\/Obstacle ahead, failed to leave the pile\n                        break;\n                    case Definition.RESULT_FAILURE_TIMEOUT:\/\/Leaving the pile timed out (15s)\n                        break;\n                    case Definition.STATUS_LEAVE_PILE_OPEN_RADAR_FAILURE:\/\/Failed to start the lidar\n                        break;\n                    default:\n                        break;\n                }\n            }\n\n            @Override\n            public void onResult(int result, String message, String extraData) {\n                Log.d(TAG, \"leaveChargingPile onResult: \" + result + \" message:\" + message);\n                switch (result) {\n                    case Definition.RESULT_OK:\/\/Left the pile successfully\n                        \/\/If you want to check the charging status here, note that the charging status takes some time to update\n                        break;\n                }\n            }\n        });<\/pre>\n\n\n\n<p>Parameters<\/p>\n\n\n\n<div class=\"is-layout-flex wp-container-4 wp-block-columns has-small-font-size\">\n<div class=\"is-layout-flow wp-block-column has-small-font-size\" style=\"flex-basis:100%\">\n<blockquote class=\"wp-block-quote has-small-font-size\">\n<ul>\n<li><strong>speed<\/strong>: forward speed when leaving the pile. Default: 0.7<\/li>\n\n\n\n<li><strong>distance<\/strong>: forward distance when leaving the pile. Default: 0.2, in meters<\/li>\n<\/ul>\n<\/blockquote>\n<\/div>\n<\/div>\n\n\n\n<p>Supported platforms:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td>GreetingBot<\/td><td>GreetingBot Mini<\/td><td>LuckiBot<\/td><td>DeliverBot Max<\/td><td>BigScreenBot<\/td><\/tr><tr><td>Yes<\/td><td>Yes<\/td><td>No<\/td><td>No<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong><em>Note 1: This method cannot be used to stop charging when the robot is charged by cable.<\/em><\/strong><\/p>\n\n\n\n<p><strong><em>Note 2: Before you can use this method, you must first call<\/em><\/strong><strong><em>&nbsp;RobotApi.getInstance().disableBattery(); to disable system charging.<\/em><\/strong><\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Get the Current Battery Level Method: GreetingBot GreetingBot Mini LuckiBot DeliverBot Max BigScreenBot Yes Yes Yes Yes No Start Auto-Recharge Method name: startNaviToAutoChargeAction How to call: Parameters Supported platforms: GreetingBot GreetingBot Mini LuckiBot DeliverBot Max BigScreenBot Yes Yes No No No Stop Auto-Recharge Method name: stopAutoChargeAction How to call: Supported platforms: GreetingBot GreetingBot Mini LuckiBot [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":[],"lsvr_kba_cat":[6],"lsvr_kba_tag":[],"_links":{"self":[{"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/553"}],"collection":[{"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba"}],"about":[{"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/types\/lsvr_kba"}],"author":[{"embeddable":true,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/comments?post=553"}],"version-history":[{"count":3,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/553\/revisions"}],"predecessor-version":[{"id":930,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/553\/revisions\/930"}],"wp:attachment":[{"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/media?parent=553"}],"wp:term":[{"taxonomy":"lsvr_kba_cat","embeddable":true,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba_cat?post=553"},{"taxonomy":"lsvr_kba_tag","embeddable":true,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba_tag?post=553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}