Linux command
kodi-send 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Send an action
kodi-send --action="[PlayPause]"
Send to a specific host
kodi-send --host=[192.168.1.100] --action="[Stop]"
Send a notification
kodi-send --notification="[Backup complete]"
Send multiple actions as a macro with delays
kodi-send --action="[Up]" --delay=[500] --action="[Select]"
Send a key press event
kodi-send --button="[KB_Return]"
Open a media URL
kodi-send --action="PlayMedia([url])"
说明
kodi-send is a command-line tool for remotely controlling a Kodi media center instance over the network. It communicates using the Kodi EventClient UDP protocol on port 9777 by default, sending action commands that simulate remote control button presses, navigation events, and media playback operations. The tool supports a wide range of built-in Kodi actions including playback control (play, pause, stop, skip), volume adjustment, menu navigation (directional movement and selection), and media loading via URLs or file paths. Because it operates entirely from the command line, kodi-send is well suited for scripting automated media workflows, integrating Kodi with home automation systems, or building custom remote control interfaces.
参数
- -a, --action _ACTION_
- Action to send. Can be specified multiple times to create a macro.
- --button _BUTTON_
- Send a key press event. Can be specified multiple times.
- --host _HOST_
- Kodi host address (default localhost).
- --port _PORT_
- Kodi EventClient port (default 9777).
- --notification _MESSAGE_
- Send a notification to Kodi.
- --log _MESSAGE_
- Send a log message to Kodi.
- --loglevel _LEVEL_
- Log level when using --log (default LOGDEBUG).
- --mouse _X,Y_
- Send mouse position to Kodi.
- -d, --delay _T_
- Wait for T milliseconds. Can be used between actions to create macros.
- --keymap _KEYMAP_
- Specify a custom keymap.
- --help
- Display help information.
FAQ
What is the kodi-send command used for?
kodi-send is a command-line tool for remotely controlling a Kodi media center instance over the network. It communicates using the Kodi EventClient UDP protocol on port 9777 by default, sending action commands that simulate remote control button presses, navigation events, and media playback operations. The tool supports a wide range of built-in Kodi actions including playback control (play, pause, stop, skip), volume adjustment, menu navigation (directional movement and selection), and media loading via URLs or file paths. Because it operates entirely from the command line, kodi-send is well suited for scripting automated media workflows, integrating Kodi with home automation systems, or building custom remote control interfaces.
How do I run a basic kodi-send example?
Run `kodi-send --action="[PlayPause]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a, --action _ACTION_ do in kodi-send?
Action to send. Can be specified multiple times to create a macro.