Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    Push button (ON/OFF) script problems?

    Recalbox General
    push button onoff script
    13
    34
    17977
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • lackyluuk
      lackyluuk Translator last edited by

      calm down @miserytom 馃槃

      I suggest you to put it into /recalbox/scripts and then in /etc/init.d (where all startup scripts are located) you could place another script which is starting your fan script in a background process

      NintendoRS | Nintendo Adapter Box | Cardboard Recalbox

      azvarel Pedro Vieira 2 Replies Last reply Reply Quote 0
      • azvarel
        azvarel @lackyluuk last edited by

        @paradadf

        I'm having a similar problem, I noticed two situations that happened with version 4.0 final the first was that in recalbox.conf the system.power.switch=PIN56ONOFF command duplicated several times, and the second that if I do screenscrapper of a very large romset example GBA simply out of nothing Rpi is turned off.

        There is a third option, the wifi in the recalbox shows that it is not connected, however I get access with your ip (this for me is very strange)

        Zodian Theme | #SNESProject

        paradadf 1 Reply Last reply Reply Quote 0
        • paradadf
          paradadf Staff @azvarel last edited by

          @azvarel i would say the things that you mention aren't related to this topic. Please, create your own threads if you consider appropriate and there aren't already existing ones.

          Pd. The duplicates are a known bug

          If your question was answered, please mark it as solved: Topic Tools -> Ask a question + Topic Tools -> Mark as Solved

          1 Reply Last reply Reply Quote 0
          • azvarel
            azvarel last edited by

            Sorry for my ignorance, but I did not mention that this was after I put the power button on the gpio if it is not related to this topic, I really will do.

            Zodian Theme | #SNESProject

            1 Reply Last reply Reply Quote 0
            • paradadf
              paradadf Staff last edited by

              It isn't.

              If your question was answered, please mark it as solved: Topic Tools -> Ask a question + Topic Tools -> Mark as Solved

              1 Reply Last reply Reply Quote 0
              • Wopy
                Wopy last edited by

                Lo tengo montado en mi bartop, me pasa algo parecido cuando enciendo/apago la luz de la marquesina o enciendo/apago los altavoces, se me apaga el sistema, e probado de todo, incluso desconectando todo los gpio de control, y solo dejando los cables 5 6 conectados sin interruptor ni pulsador sigue pasando igual, solo soluciono el problema desactivando la opci贸n del interruptor. No es problema de corto ni nada de eso ya que aunque los conecte a diferentes enchufes la luz y los altavoces sigue pasando, tambi茅n e probado diferentes cables gpio, diferentes rasp, y dem谩s y nada sigue pasando. Tal vez sea un problema del script si alguien le pasa, o puede revisar o algo, aria un gran favor.

                paradadf 1 Reply Last reply Reply Quote 0
                • Wopy
                  Wopy last edited by

                  A帽adir que como dicen arriba, cuando activas la opci贸n de on/off pin 5 6 , duplica el c贸digo como 5 o 6 veces, desconozco si pasaba antes de la 4.0 final, ya que la primera vez que lo e activado a sido en 4.0 final.

                  1 Reply Last reply Reply Quote 0
                  • lackyluuk
                    lackyluuk Translator last edited by

                    @Fran-Rdg-Gnd since this is an english thread, please use english 馃槈

                    NintendoRS | Nintendo Adapter Box | Cardboard Recalbox

                    1 Reply Last reply Reply Quote 0
                    • Wopy
                      Wopy last edited by

                      paradadf will translate it when I connect, Has more correct English

                      1 Reply Last reply Reply Quote 0
                      • paradadf
                        paradadf Staff @Wopy last edited by

                        A fast translation from what @Fran-Rdg-Gnd wrote:

                        He uses the script on his bartop. Something similar happens to him when he turns of/off the lights on the marquee or the speakers. His recalbox gets shut down, even disconnecting every other cable attached to the gpio and leaving the bare two cables on pins 5/6 without switch. The only way to "solve" the problem is by deactivating the script. He also says that it isn't a short circuit problem because this even happens when the lights/speakers are plug into a separate adaptor power adaptor. He has tested it on different cables, different RPis and every time he gets the same behaviour.

                        If your question was answered, please mark it as solved: Topic Tools -> Ask a question + Topic Tools -> Mark as Solved

                        voljega 1 Reply Last reply Reply Quote 0
                        • voljega
                          voljega Banned @paradadf last edited by

                          @paradadf I had the problem too just connecting a controller or the ethernet cable even with an off switch so I'm not using it nor the script anymore...

                          I understand why this coul happen wuth a momentary script but I don't get why this is a case with on off switch, isn't it possible to detect in that case if the switch is circuit closed or not before shutting down ?

                          paradadf 1 Reply Last reply Reply Quote 0
                          • paradadf
                            paradadf Staff @voljega last edited by paradadf

                            @voljega there is definitely something weird happening with the scripts. I'm not saying the script itself is wrong, but the coexistence with with something else must be faulty. It happens even without anything pluged in, just by activating it. It is like any movement, interference or signal in general is being captured by the gpio.

                            One possible solution could be what @supernature2k said at the beginning... Implement some kind of delay (or whatever it is called), so you can adjust the miliseconds for the script to be triggered. Currently, there is no option for that.

                            If your question was answered, please mark it as solved: Topic Tools -> Ask a question + Topic Tools -> Mark as Solved

                            1 Reply Last reply Reply Quote 0
                            • hanker
                              hanker last edited by

                              @paradadf : Thanks for your help, as I experience some weird things myself (lol, meaning the recalbox).

                              Could you give an example how to implement such a delay, i.e. having to press the momentary button for let's say 1/2 second to turn the recalbox on/off?

                              Greetings from Germany

                              Ren茅

                              paradadf 1 Reply Last reply Reply Quote 0
                              • paradadf
                                paradadf Staff @hanker last edited by

                                @hanker I can't, no idea about python. 1/2 a second would be too much imo.

                                If your question was answered, please mark it as solved: Topic Tools -> Ask a question + Topic Tools -> Mark as Solved

                                1 Reply Last reply Reply Quote 0
                                • Pedro Vieira
                                  Pedro Vieira @lackyluuk last edited by

                                  @lackyluuk said in Push button (ON/OFF) script problems?:

                                  calm down @miserytom 馃槃

                                  I suggest you to put it into /recalbox/scripts and then in /etc/init.d (where all startup scripts are located) you could place another script which is starting your fan script in a background process

                                  Hello everyone,
                                  I'm totally Noob with Linux and Raspberry Pi and I need your help. I'm following the lackyluuk Fan Control project, but I have some doubts.
                                  1 - I put the entire lackyluuk code line in a .py file and transferred it to Share / System. I tried using the Tardigrada mode "chmod + x fancontrol.py" but it did not work.
                                  2 - I tried to put fancontrol.py in the / recalbox / scripts and /etc/init.d folders, but the Terminal did not allow it, said the folder is Ready Only.
                                  3 - As I already moved as the Arduino, I know that a code of this is being processed all the time, this will not affect the performance in games and Kodi? Would you like to have this code only be activated by special event trigger?
                                  Some considerations:
                                  I am using the GPIO 14 because it is a PWM I / O port and can later use it in a Fan Control With PWM project.
                                  I used the Python Debug Mode Terminal (/ usr / bin / env python) and ran row by line, when it arrives in command below it's error. Even so, I was able to turn the Fan on and off manually with GPIO.output (GATE, "True / False").

                                  def getCPUtemperature():
                                  res = os.popen('vcgencmd measure_temp').readline()
                                  return(res.replace("temp=","").replace("'C\n",""))

                                  Thank tou all.

                                  Pedro Vieira 1 Reply Last reply Reply Quote 0
                                  • Pedro Vieira
                                    Pedro Vieira @Pedro Vieira last edited by

                                    @Pedro-Vieira said in Push button (ON/OFF) script problems?:

                                    @lackyluuk said in Push button (ON/OFF) script problems?:

                                    calm down @miserytom 馃槃

                                    I suggest you to put it into /recalbox/scripts and then in /etc/init.d (where all startup scripts are located) you could place another script which is starting your fan script in a background process

                                    Hello everyone,
                                    I'm totally Noob with Linux and Raspberry Pi and I need your help. I'm following the lackyluuk Fan Control project, but I have some doubts.
                                    1 - I put the entire lackyluuk code line in a .py file and transferred it to Share / System. I tried using the Tardigrada mode "chmod + x fancontrol.py" but it did not work.
                                    2 - I tried to put fancontrol.py in the / recalbox / scripts and /etc/init.d folders, but the Terminal did not allow it, said the folder is Ready Only.
                                    3 - As I already moved as the Arduino, I know that a code of this is being processed all the time, this will not affect the performance in games and Kodi? Would you like to have this code only be activated by special event trigger?
                                    Some considerations:
                                    I am using the GPIO 14 because it is a PWM I / O port and can later use it in a Fan Control With PWM project.
                                    I used the Python Debug Mode Terminal (/ usr / bin / env python) and ran row by line, when it arrives in command below it's error. Even so, I was able to turn the Fan on and off manually with GPIO.output (GATE, "True / False").

                                    def getCPUtemperature():
                                    res = os.popen('vcgencmd measure_temp').readline()
                                    return(res.replace("temp=","").replace("'C\n",""))

                                    Thank tou all.

                                    Please, delete this post and the above. I already made it work.

                                    1 Reply Last reply Reply Quote 0
                                    • Referenced by  Nosferatu676 Nosferatu676 
                                    • First post
                                      Last post

                                    Want to support us ?

                                    67
                                    Online

                                    99.6k
                                    Users

                                    28.1k
                                    Topics

                                    187.1k
                                    Posts

                                    Copyright 漏 2021 recalbox.com