Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.
Page 1 of 6 123 ... LastLast
Results 1 to 15 of 90

Thread: Auto Change Channel Before Going on Standby

  1. #1

    Title
    Member
    Join Date
    Jan 2015
    Posts
    41
    Thanks
    12
    Thanked 1 Time in 1 Post

    Auto Change Channel Before Going on Standby

    Hi

    I would like to set some sort of a channel change shortcut to happen when i press the standby button, so that when i press the standby button, it first changes the channel to say BBC1 and then goes on standby. Is this possible? even though maybe some sort of a script?

    Thanks in advance.

    ess

  2. #2
    Willo3092's Avatar
    Title
    ViX Beta Tester
    Join Date
    Oct 2016
    Location
    East Midlands
    Posts
    1,055
    Thanks
    747
    Thanked 400 Times in 301 Posts
    It's easy to set BBC1 to always be the startup channel if that's what you're trying to achieve?

  3. #3
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,335
    Thanks
    6,421
    Thanked 9,146 Times in 6,224 Posts
    You cant set a shut down channel. But as in post 2, you can set a start up channel. It doesnt have to be bbc 1.

  4. #4

    Title
    Member
    Join Date
    Jan 2015
    Posts
    41
    Thanks
    12
    Thanked 1 Time in 1 Post
    Sorry, i should have explained my situation better.

    Basically I have some channels as streams setup on my box, and I can have 2 streams simultaneously, also i record streams too. so i wanted the channel to change before standby so that while the box is in standby it isn't using up a stream.

    I understand that boot up channel can be set, but that isn't what i am looking for. I read somewhere that the the standby.pyo file can be modified. any ideas or direction would be appreciated.

  5. #5
    dsayers's Avatar
    Title
    ViX Beta Tester
    Join Date
    Mar 2016
    Posts
    1,752
    Thanks
    472
    Thanked 606 Times in 432 Posts
    I have had a little look but not tested
    Code:
    https://dream.reichholf.net/wiki/Enigma2:WebInterface#Zap
    So maybe have a script to zap to BBC 1 then in the standby.py maybe call it on the def __onFirstExecBegin(self): https://github.com/OpenViX/enigma2/b...tandby.py#L124

    I could be totally wrong though

    Edit seen this with users running scripts on standby
    Code:
    https://www.domoticz.com/forum/viewtopic.php?f=61&t=2505#p19177
    Last edited by dsayers; 01-03-18 at 15:38.

  6. The Following User Says Thank You to dsayers For This Useful Post:

    ess2k (01-03-18)

  7. #6

    Title
    Member
    Join Date
    Jan 2015
    Posts
    41
    Thanks
    12
    Thanked 1 Time in 1 Post
    Quote Originally Posted by dsayers View Post
    I have had a little look but not tested
    Code:
    https://dream.reichholf.net/wiki/Enigma2:WebInterface#Zap
    So maybe have a script to zap to BBC 1 then in the standby.py maybe call it on the def __onFirstExecBegin(self): https://github.com/OpenViX/enigma2/b...tandby.py#L124

    I could be totally wrong though

    Edit seen this with users running scripts on standby
    Code:
    https://www.domoticz.com/forum/viewtopic.php?f=61&t=2505#p19177
    WOW! Thanks, why didnt i find that!

    Can i please just ask, on the box itself the file ends in pyo and is not editable with notepad, i can download the source .py file from the github which is editable but then how do i change the .py back to .pyo?

    i am venturing into new territory with linux

    Thanks

  8. #7
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,335
    Thanks
    6,421
    Thanked 9,146 Times in 6,224 Posts
    Always make a backup of the .pyo file first.

    Restart and the .py file will compile to .pyo file.

  9. The Following User Says Thank You to abu baniaz For This Useful Post:

    ess2k (01-03-18)

  10. #8
    dsayers's Avatar
    Title
    ViX Beta Tester
    Join Date
    Mar 2016
    Posts
    1,752
    Thanks
    472
    Thanked 606 Times in 432 Posts
    Quote Originally Posted by ess2k View Post
    WOW! Thanks, why didnt i find that!

    Can i please just ask, on the box itself the file ends in pyo and is not editable with notepad, i can download the source .py file from the github which is editable but then how do i change the .py back to .pyo?

    i am venturing into new territory with linux

    Thanks
    Just visit that github link choose raw and copy all the text and past in notepad++ (standard notepad maybe fine but ++ is better) save as Standby.py do your edits and transfer it Standby.py to \usr\lib\enigma2\python\Screens

    Save a copy of the origional .pyo in case it causes issues then you can send it back. Reboot box and the py should compile as .pyo

  11. #9
    dsayers's Avatar
    Title
    ViX Beta Tester
    Join Date
    Mar 2016
    Posts
    1,752
    Thanks
    472
    Thanked 606 Times in 432 Posts
    Someone may have a better way to check standby in script then if stanby switch channel else exit, you could then have it run in timer every ten minuets this maybe better than editing .py files as it may cause issues when updating the box.

    This method looks good
    Code:
    https://www.domoticz.com/forum/viewtopic.php?t=2505#p16305
    only issue is I dont have lcd folder this maybe due to me having Uno4k and I have no display

  12. The Following User Says Thank You to dsayers For This Useful Post:

    ess2k (01-03-18)

  13. #10

    Title
    Member
    Join Date
    Jan 2015
    Posts
    41
    Thanks
    12
    Thanked 1 Time in 1 Post
    Thank you guys for all your help, i will be trying this tonight. just a couple final questions so i know exactly what i am doing.

    1. when i copy the modded .py to the box, should i delete the .pyo before restart? (i will deffo back it up before i delete)
    2. does the compiling take a noticeable amount of time, or should i not notice in change in initial boot up after change? (just asking so i know if it hangs and i can replace original file and that i am not being too hasty)

    Thank you soo much, you guys have been an immense help, i will report how i get on after i have had a go.

  14. #11
    ccs's Avatar
    Title
    ViX Beta Tester
    Join Date
    Sep 2014
    Posts
    5,836
    Thanks
    554
    Thanked 1,276 Times in 1,089 Posts
    I'd stop enigma first (init 4) before making changes, and restart with init 3 (they're telnet commands).

    Just rename the .pyo file to .pyo.ok

    You'll not notice any "compiling" so if it slows down you know it hasn't work.

    Take an image backup before you make any changes and put it on a usb stick in case the box stops and you can't telnet in to repair it.
    Last edited by ccs; 01-03-18 at 16:28.

  15. The Following User Says Thank You to ccs For This Useful Post:

    ess2k (01-03-18)

  16. #12
    dsayers's Avatar
    Title
    ViX Beta Tester
    Join Date
    Mar 2016
    Posts
    1,752
    Thanks
    472
    Thanked 606 Times in 432 Posts
    You can delete it if you want I just normally leave them as I take a backup of them and it shouldn't take much longer to boot

  17. #13

    Title
    Member
    Join Date
    Jan 2015
    Posts
    41
    Thanks
    12
    Thanked 1 Time in 1 Post
    Thank you very much all, you have been incredibly helpful. I will give this a go tonitght.

  18. #14

    Title
    Member
    Join Date
    Jan 2015
    Posts
    41
    Thanks
    12
    Thanked 1 Time in 1 Post
    Quote Originally Posted by dsayers View Post
    Someone may have a better way to check standby in script then if stanby switch channel else exit, you could then have it run in timer every ten minuets this maybe better than editing .py files as it may cause issues when updating the box.

    This method looks good
    Code:
    https://www.domoticz.com/forum/viewtopic.php?t=2505#p16305
    only issue is I dont have lcd folder this maybe due to me having Uno4k and I have no display
    I will check this method out too, as i have read that an update would overwrite the standby.pyo file, so thank you for this link

  19. #15
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,769
    Thanks
    235
    Thanked 1,656 Times in 1,305 Posts
    Quote Originally Posted by ess2k View Post
    Can i please just ask, on the box itself the file ends in pyo and is not editable with notepad,
    Best not to use notepad for editing anything that is going onto this box anyway. it adds (and expects DOS line endings. The box uses Unix ones.
    You could try notepad++ instead (suitably configured).
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

Page 1 of 6 123 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.