Posts by gbi
-
-
the hardcoded time doesn't matter in my case. To check if pvr is ready would be smarter, agree.
what is the curl cmd to do a channelswitch ?
-
Hi,
now it works.
I had 2 problems:
1. the sleep time had to be at least around 30 seconds. Libreelec and tvheadend are running on a raspiv2
2. strange enough it does not work with channelid 1088 (I have rechecked the output of curl, 1088 is listed), but it does work with another channelid I found in the list :
It also does not work when I run tvheadend on the raspi and stream it's output to my PC which also runs kodi.
So this solution is may be the wrong approch (as you said) but at least it works
Thanks a lot for your kind support
-
Hi all,
just for the records: this solution does not work ! I'm sorry.
The time.sleep() at line 7 has no effect, it does not delay further execution of autoexec.py.
I'm too less a python specialist to track down why it does not work.
Suggestions for doing an 'autostart tv' or to get the above script to work are welcome
Thanks in advance.
-
ok, I have injected an error at the end of the autoexec.py script, with a time.sleep(xx). Simply to get an error popup onscreen when the error occurs. Guess what, this popup comes immidiately, before the startup of tvheadend has happend, it does not matter if the time.sleep is 30 or 90 or whatsoever.
Sigh
-
well, I also have noticed/suspected this, that tvheadend starts later than autoexec.py is exec'd. I have even increased the time.sleep() to 30 or even 90 seconds, but no success, nothing happens
-
yeah, I've got the channelid, it was the first step I did.
Code40818},{"channelid":1265,"label":"arte HD","uniqueid":1963091052},{"channelid":1088,"label":"3sat HD","uniqueid":1026189214},{"channelid":1004,"label":"tagesschau24 HD","uniqueid":640869133},{"channelid":1141,"label":"ZDFinfo HD","uniqueid"
It is the {"channelid":1088,"label":"3sat HD","uniqueid":1026189214}, so channelid -> 1088
Have activated the kodi debug log, a lot of info is generated. The last occurence of 'autoexec' in the log is as follows:
Code19:24:36.149 T:139715384309504 INFO: CPythonInvoker(3, /home/gb/.kodi/userdata/autoexec.py): script successfully run 19:24:36.149 T:139715384309504 INFO: Python script stopped 19:24:36.149 T:139715384309504 DEBUG: Thread LanguageInvoker 139715384309504 terminating
The other occurences of 'autoexec' also do not indicate errors, but it does not work.
-
ok, understand regarding the fixed code. My bad.
Now nothing at all happens. It does not switch to the channel I like it to switch, and there are no messages in the kodi.log, at least no messages that seem to be related to the autoexec.py.
How can I make a debug NOTICE in the autoexec.py ? Can this be done with printf ?
-
can you tell me the correct syntax, please
-
thanks a lot
The first one works when I change the port to 80, there is nothing listening on port 8080:
Codetcp 0 0 0.0.0.0:1524 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:9981 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:9982 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:4713 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
I have seen that the channelid I want to use is 1088.
The python script throws an error:
Code11:31:58.090 T:1612706720 ERROR: EXCEPTION Thrown (PythonToCppException) : --> Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.Syntax Error'> Error Contents: ('invalid syntax', ('/storage/.kodi/userdata/autoexec.py', 12, 132, 'jsonCmd = \'Content-Type: application/json\' -d \'{"jsonrpc":"2.0","id":1,"method":"Player.Open","params":{"item":{"channelid":1088}}}\'\n')) SyntaxError: ('invalid syntax', ('/storage/.kodi/userdata/autoexec.py', 12, 132, 'jsonCmd = \'Content-Type: application/json\' -d \'{"jsonrpc":"2.0","id":1,"method":"Player.Open","params":{"item":{"channelid":1088}}}\'\n')) -->End of Python script error report<--
I see that it is a syntax error, but I can't identify itOr can it be caused that tvheadend is not running at the time the autoexec.py is executed ?
-
Hi folks,
I'd like to autostart a specific tv program automatically when libreelec starts. By chance I stumbled over the autoexec.py scripting facility, which seems to be well suited for doing this.
But as I'm not a real programmer I'm not able to write such a script. Maybe one of you folks already has such a script or can help me to write it ?
Or is there another way to autostart a specific tv program ?
Thanks in advance
-
It's in the libreelec repo under 'virtual network-tools', bundled with a few other bits and bobs.Thanks a lot. I'm sorry to say there is no description of the package in Addons/Program Addons, only "A bundle of network tools and programs". Unlike System Tools, where there is a listing of the tools.
Nevertheless I've got it
-
Hi all,
LibreELEC team: thanks for this fork. I was wondering why openElec's next version is delayed, but no I understand.
I'm running LE on a Raspi (not only, also on a Wetek Play), mainly as tvheadend based PVR.
In OE there was the infamous "Unofficial" repo with a cli based rsync client, which was quite handy from time to time. Are there plans to support rsync also under LE ?
Or is there a (simple) way to build the rsync client myself ? Or ist it possible to use the rsync binary from RaspBian ?
Thanks in advance