Simple Socket Service

WARNING

This feature will be deprecated soon.

Lebai robots provide two TCP/Socket services for simple task execution and status push. The features provided by these services are relatively simple, and developers need to combine other services to implement more complex control.

Task Control

Port: 5171. Sending a data stream to this service can control task execution.

Run a Task

start_task|<scene_id>|<execute_count>
ParameterTypeDescription
scene_idintScene ID. The corresponding scene ID can be viewed in the scene list.
execute_countintNumber of task executions. 0: loop execution. If not 0, e.g. 3 means execute 3 times.

Request example

start_task|100008|0

Stop a Task

stop_task|<type>
ParameterTypeDescription
typeint0: stop the loop task, it stops after the current loop cycle ends (invalid in version 2.2). 1: stop immediately.

Request example

stop_task|0

Pause a Task

pause_task

Resume a Task

resume_task

Robot Status Notification Interface

Port: 5170. This service pushes the task and robot running status once every second.

<task_status>|<robot_mode>
ParameterTypeDescription
task_statusint0: idle 1: running
robot_modeintRobot status

Push examples

ExampleDescription
0|5No task is running, the robot is idle
1|6A task is running, the robot is paused