Linux Kodi Leia kodi-send and external python script err
#1
Hi, friends! Under Krypton this external python script worked well

xml:
import os
os.system("/home/vis1/scripts/kodi1_sleep.sh")

kodi1_sleep.sh (worked from shell with Leia & Krypton)
xml:
#!/bin/bash
sleep 1
kodi-send --host=127.0.0.1 --port=9777 --action="Stop"
sleep 3
kodi-send --host=127.0.0.1 --port=9777 --action="CECStandby"

Under Leia i see these errors, when python script is execute (kodi-send not worked from bash script)
xml:
мая 15 21:59:32 KODI kodi1[22354]: ImportError: No module named xbmcclient
мая 15 21:59:33 KODI kodi1[22354]: Traceback (most recent call last):
мая 15 21:59:33 KODI kodi1[22354]:   File "/usr/bin/kodi-send", line 29, in <module>
мая 15 21:59:33 KODI kodi1[22354]:     from xbmcclient import *
мая 15 21:59:33 KODI kodi1[22354]: ImportError: No module named xbmcclient
мая 15 21:59:36 KODI kodi1[22354]: Traceback (most recent call last):
мая 15 21:59:36 KODI kodi1[22354]:   File "/usr/bin/kodi-send", line 29, in <module>
мая 15 21:59:36 KODI kodi1[22354]:     from xbmcclient import *
мая 15 21:59:36 KODI kodi1[22354]: ImportError: No module named xbmcclient

What is wrong? Thanks! Smile
MediaCenter: Fractal Design Node 605/ASUS Maximus VI Extreme/i3-4170/nVidia GT1030x3@Deepcool V4000 Mod (Passive)/DD Cine v.6.5/Arch Linux Multiseat/Leia x 3/HP Media IR remote/T3-M Remote/Sony PS3 BD remote/PulseEight USB-CEC(AnyNet+)/3 LCDTV over HDMI/SONY MDR-HW700DS ;)
Reply
#2
Problem solved by native internal python handling, but problem persist and must to be fixed. Wink
MediaCenter: Fractal Design Node 605/ASUS Maximus VI Extreme/i3-4170/nVidia GT1030x3@Deepcool V4000 Mod (Passive)/DD Cine v.6.5/Arch Linux Multiseat/Leia x 3/HP Media IR remote/T3-M Remote/Sony PS3 BD remote/PulseEight USB-CEC(AnyNet+)/3 LCDTV over HDMI/SONY MDR-HW700DS ;)
Reply
#3
(2018-05-16, 12:53)BytEvil Wrote: Problem solved by native internal python handling, but problem persist and must to be fixed. Wink

Hi BytEvil,
I use the same kodi-send command in my Pythons script, but it seems that there is a limit on the total of kodi-send commands per time you can send.
See this link : https://forum.kodi.tv/showthread.php?tid=332085 
Do you have any experience with this and how to work around this limit ?
Thanks
Rene
Reply
#4
Tbh, I can't reproduce what you are talking about.

I tested with a LibreELEC VM as a guest system which I control with kodi-send in that case. A Ubuntu machine is the host. So my Ubuntu machine has the IP: 192.168.253.109 and the LibreELEC VM has 192.168.253.107. I tried sending 199 times a kodi-send command (action=Down) from the Ubuntu machine to the LibreELEC VM by using a one-liner:

i=1; while [ "$i" -lt 200 ]; do $(kodi-send --host=192.168.253.107 -a down 1>/dev/null); i=`expr $i + 1`; done

And AFAICT all action have been send.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi Leia kodi-send and external python script err0