{"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":"2023-03-30T17:50:06","modified_gmt":"2023-03-30T09:50:06","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<h3 id=\"api-reference-power-control-start-automatic-recharging\"><strong>Start automatic recharging<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-power-control-start-automatic-recharging\"><\/a><\/h3>\n\n\n\n<p>Method name:&nbsp;<code>startNaviToAutoChargeAction<\/code><\/p>\n\n\n\n<p>Calling 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=\"\">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                \/\/Charged successfully                \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, and the leading destination is outside the map. It is possible that the map does not match the location point. Please reset the location point                \n                break;            \n            case Definition.STATUS_NAVI_AVOID:                \n                \/\/The route to the recharge point has been blocked by obstacles                \n                break;            \n            case Definition.STATUS_NAVI_AVOID_END:                \n                \/\/Obstacles have been removed                \n                break;            \n            default:                \n                break;        \n        }    \n    }\n});<\/pre>\n\n\n\n<p>Parameter Description:<\/p>\n\n\n\n<ul>\n<li><code>timeout<\/code>&nbsp;: Navigation timeout time. If the charging pile is not reached within this time, it is considered that the recharge has failed.<\/li>\n<\/ul>\n\n\n\n<p>Applicable Platform:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>GreetBot<\/th><th>Mini<\/th><th>Lucki<\/th><th>DeliverBot<\/th><th>BigScreenBot<\/th><\/tr><\/thead><tbody><tr><td>Yes<\/td><td>Yes<\/td><td>No<\/td><td>No<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 id=\"api-reference-power-control-end-of-automatic-recharge\"><strong>End of automatic recharge<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-power-control-end-of-automatic-recharge\"><\/a><\/h3>\n\n\n\n<p>Method name:&nbsp;<code>stopAutoChargeAction<\/code><\/p>\n\n\n\n<p>Calling 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=\"\">RobotApi.getInstance().stopAutoChargeAction(reqId, true);<\/pre>\n\n\n\n<p>Applicable Platform:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>GreetBot<\/th><th>Mini<\/th><th>Lucki<\/th><th>DeliverBot<\/th><th>BigScreenBot<\/th><\/tr><\/thead><tbody><tr><td>Yes<\/td><td>Yes<\/td><td>No<\/td><td>No<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 id=\"api-reference-power-control-get-robot-battery-level\"><strong>Get robot battery level<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-power-control-get-robot-battery-level\"><\/a><\/h3>\n\n\n\n<p>Calling 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<p>Applicable Platform:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>Greetbot<\/th><th>Mini<\/th><th>Lucki<\/th><th>Baoxiaodi MAX<\/th><th>Baodaping<\/th><\/tr><\/thead><tbody><tr><td>Yes<\/td><td>Yes<\/td><td>No<\/td><td>No<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 id=\"api-reference-power-control-stop-charging-and-leave-the-charging-pile\"><strong>Stop charging and leave the charging pile<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-power-control-stop-charging-and-leave-the-charging-pile\"><\/a><\/h3>\n\n\n\n<p>Method name:&nbsp;<code>stopChargingByApp<\/code><\/p>\n\n\n\n<p>Calling 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=\"\">RobotApi.getInstance().stopChargingByApp();<\/pre>\n\n\n\n<p>Applicable Platform:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>GreetBot<\/th><th>Mini<\/th><th>Lucki<\/th><th>DeliverBot<\/th><th>BigScreenBot<\/th><\/tr><\/thead><tbody><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><em>Note1: The line charging method cannot be used to disconnect from charging<\/em>&nbsp;<em>Note2: To use this api, you have to call RobotApi.getInstance().disableBattery(); first. To disable system battery control<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Start automatic recharging Method name:&nbsp;startNaviToAutoChargeAction Calling method: Parameter Description: Applicable Platform: GreetBot Mini Lucki DeliverBot BigScreenBot Yes Yes No No No End of automatic recharge Method name:&nbsp;stopAutoChargeAction Calling method: Applicable Platform: GreetBot Mini Lucki DeliverBot BigScreenBot Yes Yes No No No Get robot battery level Calling method: Applicable Platform: Greetbot Mini Lucki Baoxiaodi MAX Baodaping [&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":2,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/553\/revisions"}],"predecessor-version":[{"id":558,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/553\/revisions\/558"}],"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}]}}