Welcome!

Welcome to Satlover forums, full of great people, ideas and excitement.

Please register if you would like to take part. link..

Register Now

Alert: Don't Use Hotmail Email Accounts for registration

Collapse

Before Access to all Forums and Trial accounts you must need to activate your account Email address

Continuous zapping through channels

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sjamesamuel
    Board Senior Member
    • Jul 2013
    • 251

    #16
    Re: Continuous zapping through channels

    I understand but for some sats it's not available. Even many channels don't have websites.

    I want this for FTA channels which don't have EPG. Most encrypted ones have EPG. So the ecm delay isn't an issue.

    Even for encrypted ones, it won't be a very bad idea to take a look at each channel, giving allowance for a larger ecm delay.

    Comment

    • gianni253
      Experienced Board Member
      • Nov 2012
      • 903

      #17
      Re: Continuous zapping through channels

      Originally posted by sjamesamuel
      Hi
      Is there a way to make dreambox zap through channels automatically. So it zaps to a new channel every 5 sec for example.
      It's not that hard to do that: just write a loop script where, inside the loop, you put commands to zap the channel list.

      Example for enigma1:
      Code:
      #!/bin/sh
      
      while [ 1 ]
      do
        wget -q -O dev/null http://root:PWD@ IP_DREAMBOX /cgi-bin/zapTo?path=1:0:1:2144:3070:13e:820000:0:0:0:
        sleep 5
        wget -q -O dev/null http://root:PWD@ IP_DREAMBOX /cgi-bin/zapTo?path=1:0:1:213f:3070:13e:820000:0:0:0:
        sleep 5
        wget -q -O dev/null http://root:PWD@ IP_DREAMBOX /cgi-bin/zapTo?path=1:0:1:2140:3070:13e:820000:0:0:0:
        sleep 5
        wget -q -O dev/null http://root:PWD@ IP_DREAMBOX /cgi-bin/zapTo?path=1:0:1:2141:3070:13e:820000:0:0:0:
      done
      
      exit 0
      This code loops through 4 channels but you can add all channels you want.
      Remember this is an infinite loop, so you need another script to kill it when you have done.

      Comment

      • aplok
        Experienced Board Member
        • Jun 2013
        • 1155

        #18
        Re: Continuous zapping through channels

        @gianni253

        nice,

        the next step: how to start this script with the dm500 addon menu

        otherwise, i can only start it by mean of a telnet session ...

        i prefer from the remote control

        Comment

        • gianni253
          Experienced Board Member
          • Nov 2012
          • 903

          #19
          Re: Continuous zapping through channels

          Originally posted by aplok
          @gianni253

          nice,

          the next step: how to start this script with the dm500 addon menu

          otherwise, i can only start it by mean of a telnet session ...

          i prefer from the remote control
          For enigma2 I put all my scripts in a given directory (example /usr/scripts) and then use a plugin (Script Executer) to launch them with remote control.

          For Enigma1 it's even simpler ... put all scripts in /var/tuxbox/plugins, create corresponding .cgf, and launch them with yellow button.

          Comment

          • aplok
            Experienced Board Member
            • Jun 2013
            • 1155

            #20
            Re: Continuous zapping through channels

            Originally posted by gianni253
            For Enigma1 it's even simpler ...
            1.- put all scripts in /var/tuxbox/plugins,
            ok

            2.- create corresponding .cgf,
            i did
            cp CCcaminfo.cfg mycmd.cfg
            vi mycmd.cfg
            cat mycmd.cfg

            name=mycmd
            depend=
            type=2
            needfb=0
            needrc=0
            needlcd=0
            needenigma=0


            ( ... ? what's that params ? ... )

            3.- and launch them with yellow button
            ok

            answer:
            /var/tuxbox/plugins/mycmd.so no such file

            -> how to create this mycmd.so file

            ps: mycmd is a bash script

            Comment

            • gianni253
              Experienced Board Member
              • Nov 2012
              • 903

              #21
              Re: Continuous zapping through channels

              Originally posted by aplok
              name=mycmd
              depend=
              type=2
              needfb=0
              needrc=0
              needlcd=0
              needenigma=0[/FONT]
              Put type=3

              Comment

              • sjamesamuel
                Board Senior Member
                • Jul 2013
                • 251

                #22
                Re: Continuous zapping through channels

                Thanks Gianni. This looks great.

                -Is it possible to simulate a key press (eg. channel+ or channel -) in a script?

                -Will the same script work for enigma2? Do I have to replace ip ...?

                -How to stop the script?

                Thank you very much for your help

                Comment

                • aplok
                  Experienced Board Member
                  • Jun 2013
                  • 1155

                  #23
                  Re: Continuous zapping through channels

                  Originally posted by sjamesamuel
                  -Is it possible to simulate a key press (eg. channel+ or channel -) in a script?
                  -Will the same script work for enigma2? Do I have to replace ip ...?
                  -How to stop the script?
                  the interaction from the remote control to the system goes via the interface and enigma 1/2

                  so the question is how the remote control interact with enigma,
                  and how enigma interacts with the bash script

                  Comment

                  • sjamesamuel
                    Board Senior Member
                    • Jul 2013
                    • 251

                    #24
                    Re: Continuous zapping through channels

                    Originally posted by aplok
                    the interaction from the remote control to the system goes via the interface and enigma 1/2

                    so the question is how the remote control interact with enigma,
                    and how enigma interacts with the bash script

                    When I had enigma1 I could send the remote control commands through a c# app:
                    WebBrowser.Navigate(@"http://<Box IP>/cgi-bin/rc?106");
                    where 106 is the key code.

                    I didn't have much time to test this on enigma2, but it's obviously different.
                    I don't know if this will help here.

                    Comment

                    • gianni253
                      Experienced Board Member
                      • Nov 2012
                      • 903

                      #25
                      Re: Continuous zapping through channels

                      Originally posted by sjamesamuel
                      When I had enigma1 I could send the remote control commands through a c# app:
                      WebBrowser.Navigate(@"http://<Box IP>/cgi-bin/rc?106");
                      where 106 is the key code.

                      I didn't have much time to test this on enigma2, but it's obviously different.
                      I don't know if this will help here.
                      In E2 it's fundamentally the same .. only commands are a little bit different.
                      To zap to a given channel:
                      Code:
                      wget -q -O - http://root: PWD @ IP_DREAMBOX /web/zap?sRef=1:0:1:213F:3070:13E:820000:0:0:0:
                      Coming to remote control, here's the command syntax:
                      Code:
                      http://dreambox/web/remotecontrol?command={command}
                      and control codes ...
                      Code:
                      116 Key "Power"
                      2 Key "1"
                      3 Key "2"
                      4 Key "3"
                      5 Key "4"
                      6 Key "5"
                      7 Key "6"
                      8 Key "7"
                      9 Key "8"
                      10 Key "1"
                      11 Key "0"
                      412 Key "previous"
                      407 Key "next
                      115 Key "volume up"
                      113 Key "mute"
                      402 Key "bouquet up"
                      114 Key "volume down"
                      174 Key "lame"
                      403 Key "bouquet down"
                      358 Key "info"
                      103 Key "up"
                      139 Key "menu"
                      105 Key "left"
                      352 Key "OK"
                      106 Key "right"
                      392 Key "audio"
                      108 Key "down"
                      393 Key "video"
                      398 Key "red"
                      399 Key "green"
                      400 Key "yellow"
                      401 Key "blue"
                      377 Key "tv"
                      385 Key "radio"
                      388 Key "text"
                      138 Key "help"

                      Comment

                      • aplok
                        Experienced Board Member
                        • Jun 2013
                        • 1155

                        #26
                        Re: Continuous zapping through channels

                        so, the remote control send a msg to enigma when hitting a key, as

                        (e1): --http://ip/cgi-bin/rc?_code_
                        (e2): --http://dreambox/web/remotecontrol?command=_code_


                        where _code_ is a key code, like 407 as an example

                        this _code_ is switched by enigma to the adhoc subprocess (like next channel of the list, as an example)

                        all this show us how the script gains access to the tuner ressources (as next channel subprocess) via e1/2:
                        curl --http://127.0.0.1/web/remotecontrol?command=407 >/dev/null
                        curl --http://ip/cgi-bin/rc?_code >/dev/null


                        and make our friend sjamesamuel happy , to zap along a bouquet:

                        WebBrowser.Navigate(@"http://dreambox/web/remotecontrol?command=407"); # next


                        also, and further more,
                        how enigma1/2 can send this related message _code_ to the bash script ?

                        Comment

                        • gianni253
                          Experienced Board Member
                          • Nov 2012
                          • 903

                          #27
                          Re: Continuous zapping through channels

                          Originally posted by aplok
                          how enigma1/2 can send this related message _code_ to the bash script ?
                          It's only a one-way communication: bash script sends command to enigma1/2 but there's no return code.
                          And if you want to know what's the channel you are currently tuned in, there's another command ...

                          Comment

                          • aplok
                            Experienced Board Member
                            • Jun 2013
                            • 1155

                            #28
                            Re: Continuous zapping through channels

                            ... just an idea

                            if enigma1/2 traces the entries (from remote control) into a file,
                            like such an history,

                            if this enigma1/2 cmd-history-like file is readable and intelligible,

                            we can then imagine a deamonized bash script reading it,
                            to trap the some private key.combination
                            to trig process

                            Comment

                            • sjamesamuel
                              Board Senior Member
                              • Jul 2013
                              • 251

                              #29
                              Re: Continuous zapping through channels

                              Thank you very much Gianni.
                              You're always so helpful.

                              I used this for channel up:
                              wget -q -O dev/null http:// ip here /web/remotecontrol?comman
                              d=106 for channel up (right key) as command and it worked!

                              Channel down is 105.


                              -Would you please tell me how to make a script to stop the running one?

                              -Are there any documentations for this matter?

                              Thanks

                              Comment

                              • aplok
                                Experienced Board Member
                                • Jun 2013
                                • 1155

                                #30
                                Re: Continuous zapping through channels

                                -Would you please tell me how to make a script to stop the running one?
                                i suggest this:
                                kill -9 $( ps |grep myscript |grep -v grep |awk '{print $1}' )

                                -Are there any documentations for this matter?
                                --https://www.******.com/#q=bash+tutorial

                                -Thanks
                                you're welcome

                                Comment

                                Working...