SSH kodi-send command does not work, the error is this:
x96air1:~ # kodi-send
Traceback (most recent call last):
File "/usr/bin/kodi-send", line 27, in <module>
from kodi.xbmcclient import *
ModuleNotFoundError: No module named 'kodi'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/kodi-send", line 30, in <module>
from xbmcclient import *
ModuleNotFoundError: No module named 'xbmcclient'
(Tested on CoreELEC 19.4-Matrix_rc3 (February 18th, 2022)
x96air1:~ # opkg remove python3 --force-remove
Removing package python3 from root...
x96air1:~ # kodi-send
Traceback (most recent call last):
File "/usr/bin/kodi-send", line 27, in <module>
from kodi.xbmcclient import *
ModuleNotFoundError: No module named 'kodi'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/kodi-send", line 30, in <module>
from xbmcclient import *
ModuleNotFoundError: No module named 'xbmcclient'
Another CE 9.2.8 device with S912 CPU and same configuration Kodi works fine with python3 and kodi-send:
mxq:~ # kodi-send
Usage
kodi-send [OPTION] --action=ACTION
kodi-send [OPTION] --button=BUTTON
Example
kodi-send --host=192.168.0.1 --port=9777 --action="Quit"
Options
-?, --help Will bring up this message
--host=HOST Choose what HOST to connect to (default=localhost)
--port=PORT Choose what PORT to connect to (default=9777)
--keymap=KEYMAP Choose which KEYMAP to use for key presses (default=KB)
--button=BUTTON Sends a key press event to Kodi, this option can be added multiple times to create a macro
-a ACTION, --action=ACTION Sends an action to XBMC, this option can be added multiple times to create a macro
-d T, --delay=T Waits for T ms, this option can be added multiple times to create a macro
x96air1:~ # which kodi-send
/usr/bin/kodi-send
x96air1:~ # export PATH=/usr/bin:/usr/sbin:/storage/.kodi/addons/service.aml-vnc/bin:/storage/.kodi/addons/service.system.doc
ker/bin
x96air1:~ # kodi-send
Usage
kodi-send [OPTION] --action=ACTION
kodi-send [OPTION] --button=BUTTON
Example
kodi-send --host=192.168.0.1 --port=9777 --action="Quit"
Options
-?, --help Will bring up this message
--host=HOST Choose what HOST to connect to (default=localhost)
--port=PORT Choose what PORT to connect to (default=9777)
--keymap=KEYMAP Choose which KEYMAP to use for key presses (default=KB)
--button=BUTTON Sends a key press event to Kodi, this option can be added multiple times to create a macro
-a ACTION, --action=ACTION Sends an action to XBMC, this option can be added multiple times to create a macro
-d T, --delay=T Waits for T ms, this option can be added multiple times to create a macro
The problem is script /opt/etc/profile which set the environment.
Entware integration should be done more smart. But there are only few users with it so …
I have added “/usr/bin:/usr/sbin:” to the beginning of the content of the PATH variable in /opt/etc/profile, now system commands will take precedence Now after a reboot kodi-send works like a charm.