Superb quality and spec AB-Com PULSe 4K SE. Crazy offer! Only £129! FREE UK DELIVERY! 4K UHD, Enigma 2, Multiboot 4 images & more!...
Superb quality and spec AB-Com PULSe 4K Rev II Twin Satellite tuner only £179! FREE UK DELIVERY! 4K UHD, Enigma 2, SATA HDD facility, Multiboot 4 images & more!...

[Mut@nt] HD51 Auto Change Channel Before Going on Standby

  • Thread starter Thread starter ess2k
  • Start date Start date
@dsayers

Thank you for going through the trouble, I have tried but for some reason i cannot get it to work. I have backups of the origional standby.pyo, deleted it, put your standby.py in, restarted and it created the pyo as expected. i created my script and put it in the correct folder and set correct permissions but nothing happens.

I have but the script in the bin folder and ran the script from putty and it changes the channel, my script is just this,
Code:
wget -q -O - http://127.0.0.1/web/zap?sRef=1:0:19:1B1D:802:2:11A0000:0:0:0

i tried running the script from the usr\scripts folder in putty but keep getting, no such file or directory found, but its there, to try and run the script from that folder i am simply typing in the following, usr/scripts/StandbyEnter.sh

any ideas? ( i am pretty new at this linux commands stuff)

I have just copied and pasted the wget script and pasted in putty and it zaps to BBC 1 HD, it can also be ran in script runner, menu, setup, vix, script runner choose StandbyEnter.sh

Im currently on OpenATV and they call it Job manager and it runs fine but not when pressing standby.

So I thought I would try another script so in StandbyEnter.sh I put
Code:
#!/bin/bash
wget -O /tmp/ABM.xml "https://raw.githubusercontent.com/oe-alliance/AutoBouquetsMaker/master/AutoBouquetsMaker/providers/sat_282_sky_uk.xml" &> /dev/null 2>&1

Pressed standby and it downloaded sat_282_sky_uk.xml to ABM.xml in tmp, so im not sure why it doesnt change change channel on standby
 
....try /usr/scripts/StandbyEnter.sh rather than usr/scripts/StandbyEnter.sh

:smiley_yup:

that got the script to run from the folder usr - scripts. thank you for that, i certainly wont forget that / again
 
@dsayers

thanks you for all your help, i didnt know what script runner was until now, i ran the script from script runner and it works. again, crazy how 1 script works fine proving the code is correct but this particular script dont.

edit: do you think adding
Code:
#!/bin/bash
to the beginning of the script would make a difference?

edit 2- nope, it dont.
 
Last edited by a moderator:
I have but the script in the bin folder and ran the script from putty and it changes the channel, my script is just this,
Code:
wget -q -O - http://127.0.0.1/web/zap?sRef=1:0:19:1B1D:802:2:11A0000:0:0:0
Whcih won't work, as "?" is an active shell character.
try:
Code:
wget -q -O - 'http://127.0.0.1/web/zap?sRef=1:0:19:1B1D:802:2:11A0000:0:0:0'
 
Whcih won't work, as "?" is an active shell character.
try:
Code:
wget -q -O - 'http://127.0.0.1/web/zap?sRef=1:0:19:1B1D:802:2:11A0000:0:0:0'

I really thought this would do the trick, it made perfect sense, but it still won't work

so i tried another script,
Code:
grab -d -p /tmp/test.png
Though it works from script runner, it doesnt from standby, i even tried the scripts as StandbyLeave.sh just to test and they still dont run.

could it be a openvix issue?
 
just to show what i have done, in case i am doing something wrong,
1.webp Standby.py as provided dsayers (thank you)

2.webp Modifies StandbyEnter.sh as suggested by birdman ( thank you)

3.webp Image of where i am copying file to, and file attrib

4.webp Image of where i am copying file to, and file attrib
 
Last edited by a moderator:
that got the script to run from the folder usr - scripts. thank you for that, i certainly wont forget that / again
If the script is in the current directory, then ./scriptname is all you need.
The full pathname (the one starting with /usr in your case) will work from any directory.

I'm not sure which the current directory script runner starts up in, so it's best to cd into the one you want at the start of the script.
(Using the full pathname.)
 
Last edited:
That code refers to leaving standby, not entering it. You want the bit lower down....(as ccs noted in #20).
Hi, I am sure the code for entering standby is there too, i collapsed a couple sections just so i could show the code fro entering standby, if you look at the second half of the image, the text in green it says "use custom script when putting in standby" i am sure this is the correct section for entering standby.

unless I am wrong?
 
Hi, I am sure the code for entering standby is there too,
Ah, sorry. Gave up reading too soon.

The thing to do is to write a script that just echoes some text to a file in /tmp. That will check that the facility is working.
Once that is working, to debug a script that then isn't put this at the top:

Code:
#!/bin/sh
#

exec > /tmp/standby.log 2>&1
set -x
...
...your actual code....
...

This will produce a (debug) log of what is happening in [FONT=courier\ new]/tmp/standby.log[/FONT] and let you figure out what is going wrong.
 
Just to make sure to myself I haven't messed up the image, or that i aint going crazy, i just reflashed the box with the latest image and started from scratch,

So then I created a simple script,
Code:
#!/bin/bash
touch /tmp/1234.txt

Works fine from script runner, it creates the file 1234 in tmp folder, but nothing when hitting the standby button.

so its either the standby.py file or the image itself.

It cannot be the standby.py file as dsayers has tested it with the autobouquet test and that worked great ( I believe if dsayers re ran the change channel script with the modification mentioned by birdman below it would work)
wget -q -O - 'http://127.0.0.1/web/zap?sRef=1:0:19:1B1D:802:2:11A0000:0:0:0'

therefore i think i am going to give up as i think this is a openvix image issue.

Anyone else can help it would be appreciated.

i think i might look further into
Code:
https://www.domoticz.com/forum/viewtopic.php?t=2505#p16305
but having a quick look at cron job timer, the minimum repeat time is and hour :(
 
Sorry I didn't get chance to post yesterday here is a debug log using
Code:
wget -q -O - http://127.0.0.1/web/zap?sRef=1:0:19:1B1D:802:2:11A0000:0:0:0

Code:
21:55:51.7667 {   } Screens/Standby.py:93 _init_ [Standby] enter standby
21:55:51.7669 [   ] base/console.cpp:110 execute [eConsoleAppContainer] Starting /bin/sh
21:55:51.7683 [   ] dvb/cahandler.cpp:333 unregisterService [eDVBCAService] free slot 0 demux 0 for service 1:0:1:712:12:F020:FFFF0000:0:0:0:
21:55:51.7683 [   ] dvb/cahandler.cpp:497 eDVBCAService [eDVBCAService] free service 1:0:1:712:12:F020:FFFF0000:0:0:0:
21:55:51.7730 [   ] service/servicedvb.cpp:1728 timeshift [eDVBServicePlay] timeshift
21:55:51.7734 [   ] service/servicedvb.cpp:1728 timeshift [eDVBServicePlay] timeshift
21:55:51.7740 [   ] dvb/decoder.cpp:836 setState [eTSMPEGDecoder] decoder state: play, vpid=ffffffff, apid=ffffffff
21:55:51.7741 <   > dvb/decoder.cpp:728 stop [eDVBPCR0] DEMUX_STOP ok
21:55:51.7741 [   ] dvb/decoder.cpp:739 eDVBPCR [eDVBPCR0] destroy
21:55:51.7742 <   > dvb/decoder.cpp:427 stop [eDVBVideo0] DEMUX_STOP  ok
21:55:51.7751 <   > dvb/decoder.cpp:436 stop [eDVBVideo0] VIDEO_STOP ok
21:55:51.7789 [   ] dvb/decoder.cpp:528 eDVBVideo [eDVBVideo0] destroy
21:55:51.7790 <   > dvb/decoder.cpp:159 stop [eDVBAudio0] AUDIO_STOP ok
21:55:51.7888 <   > dvb/decoder.cpp:167 stop [eDVBAudio0] DEMUX_STOP ok
21:55:51.7890 <   > dvb/decoder.cpp:203 unfreeze [eDVBAudio0] AUDIO_CONTINUE ok
21:55:51.7983 [   ] dvb/decoder.cpp:247 eDVBAudio [eDVBAudio0] destroy
21:55:51.7984 <   > dvb/decoder.cpp:806 stop [eDVBText0] DEMUX_STOP ok
21:55:51.7994 [   ] dvb/decoder.cpp:817 ~eDVBTText [eDVBText0] destroy
21:55:51.8013 [   ] dvb/dvb.cpp:1495 DVBChannelStateChanged [eDVBResourceManager] start release channel timer
21:55:51.9364 {   } skin.py:1346 readSkin [SKIN] processing screen Standby:
21:55:51.9379 {   } skin.py:1107 readSkin [SKIN] Parsing embedded skin <embedded-in-'StandbySummary'>
21:55:51.9386 {   } skin.py:1346 readSkin [SKIN] processing screen <embedded-in-'StandbySummary'>:
21:55:51.9405 {   } Screens/Screen.py:151 show [SCREENNAME]  StandbySummary
21:55:52.0423 {   } Screens/Screen.py:151 show [SCREENNAME]  Standby
21:55:52.0566 {   } Navigation.py:250 playService playing 1:0:19:1B1D:802:2:11A0000:0:0:0:
21:55:52.0571 {   } Components/ServiceList.py:182 setCurrent [servicelist] search for service in userbouquets
21:55:52.0682 [ E ] gdi/accel.cpp:357 accelAlloc [gAccel] accel alloc failed
 
Hi dsayers
could you try the script with ' before and after the url so
Code:
wget -q -O - 'http://127.0.0.1/web/zap?sRef=1:0:19:1B1D:802:2:11A0000:0:0:0'

I think that would work for you.

but I just cant get any response what so ever from standby, i think its a vix issue.

What image are you using?
 
Hi dsayers
could you try the script with ' before and after the url so
Code:
wget -q -O - 'http://127.0.0.1/web/zap?sRef=1:0:19:1B1D:802:2:11A0000:0:0:0'

I think that would work for you.

but I just cant get any response what so ever from standby, i think its a vix issue.

What image are you using?

I don't think it's a vix issue I'm currently on OpenATV testing vpn scripts I'll test the above later tonight but as you can see in the debug it's attempting to switch channel but fails.

Maybe there isn't enough time to zap when pressing standby, if I added sleep 4 then repeatedly pressed standby on and off it would switch after turning on. Other wget scripts worked but maybe those services are still active in standby but zapping isn't.

P,s Someone else tested the Standby.py code on vix and it worked I'm not sure what script he used though. Can you turn on debug logging and we can have a look at the debug log after pressing standby.
 
No, it isn't. IIRC that's a limitation of the Vix menu input system.

Oh ok, so could I create a cron job using the menu and then adjust the time on it via telnet? if so how please?
Thanks
 
What would you want the cronjob to do, check if in standby and then zap???
 
What would you want the cronjob to do, check if in standby and then zap???

Yes this method checks LCD display and echo
Code:
https://www.domoticz.com/forum/viewtopic.php?t=2505#p16305
so adjust to zap instead then have it run every 10 minutes. Just a question can you zap whilst in standby? If not then this would be no good.
 
Maybe there isn't enough time to zap when pressing standby
Sounds likely. I suspect if you used the original os.system() code it might work, as that will run in the foreground and enigma2 would wait for it.
However, this all indicates (to me) that this isn't the correct way to go.
 

OpenViX Feeds Status

Back
Top