Using Argon One case with fan and powerbutton together with piCorePlayer?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Aldoszx
    Junior Member
    • Jan 2020
    • 25

    #16
    Originally posted by carsten_h
    The gpio-shutdown script from the tweaks page will be deleted when I set this to "No"?
    I am only asking because the shutdown button is still shutting down so that the USB drives are not cleanly dismounted.
    I think you only should uninstall the extension.
    The shutdown button must be ON, in order to define the GPIO pin for shutdown.

    Paul, it is correct ?

    Yes, the fan is loud ! I intend to replace it with another one more silent.
    Mine is set to start at 40 degrees, at 10% speed.
    Usually the temp stays below 40.
    Last edited by Aldoszx; 2020-01-25, 22:45.

    Comment

    • carsten_h
      Senior Member
      • Apr 2019
      • 831

      #17
      Originally posted by Aldoszx
      The shutdown button must be ON, in order to define the GPIO pin for shutdown.
      If I look into the script, I find the following line:
      Code:
      GPIO.setup(shutdown_pin, GPIO.IN,  pull_up_down=GPIO.PUD_DOWN)
      So I think the correct setting should be used.

      But I saw the following reaction to the pressed button. Regardless how long I press it, the reaction is always a shutdown.
      Although in the code I see that from 2 to 3 seconds (pulses) there should be a reboot happen and from 4 to 5 seconds there should be a shutdown happen. But there is no difference between pressing long or short.
      Pi4 4GB piCorePlayer with LMS and Squeezelite for USB inside an Argon One case
      Pi3B+ (7" Display, Hifiberry DAC+ Pro) piCorePlayer with Squeezlite/Jivelite for Hifiberry inside a SmartiPi touch case
      Pi Zero W only for Bluetooth headphones
      Two Airport Express
      Ikea Symfonisk

      Comment

      • paul-
        Senior Member
        • Jan 2013
        • 5778

        #18
        Yes, remove the shutdown overlay and the shutdown monitor extension.

        The python script should call “pcp rb” for a reboot. Or “pcp sd” for shutdown.

        Drives should be unmounted, but exfat is an odd file system. It doesn’t have direct kernel support.
        piCorePlayer a small player for the Raspberry Pi in RAM.
        Homepage: https://www.picoreplayer.org

        Please donate if you like the piCorePlayer

        Comment

        • Aldoszx
          Junior Member
          • Jan 2020
          • 25

          #19
          Thank you !
          There is another way to load the i2c-dev module besides user commands?
          Could be done automatically via auto start script?
          Last edited by Aldoszx; 2020-01-26, 08:53.

          Comment

          • carsten_h
            Senior Member
            • Apr 2019
            • 831

            #20
            Originally posted by paul-
            Yes, remove the shutdown overlay and the shutdown monitor extension.
            What is the correct ist way to do it? Only switching to „No“.?
            Pi4 4GB piCorePlayer with LMS and Squeezelite for USB inside an Argon One case
            Pi3B+ (7" Display, Hifiberry DAC+ Pro) piCorePlayer with Squeezlite/Jivelite for Hifiberry inside a SmartiPi touch case
            Pi Zero W only for Bluetooth headphones
            Two Airport Express
            Ikea Symfonisk

            Comment

            • paul-
              Senior Member
              • Jan 2013
              • 5778

              #21
              Originally posted by carsten_h
              What is the correct ist way to do it? Only switching to „No“.?
              Correct.
              piCorePlayer a small player for the Raspberry Pi in RAM.
              Homepage: https://www.picoreplayer.org

              Please donate if you like the piCorePlayer

              Comment

              • carsten_h
                Senior Member
                • Apr 2019
                • 831

                #22
                Originally posted by paul-
                Correct.
                Ok. That is easy.

                The LMS is running now without any problem and the Pi 4 runs at 45°C, which is Ok I think. Even if I build the database new the temperature stays at this value.

                The last two times the file systems are clean after switching off via powerbutton.
                Regarding the switching off via the powerbutton. Is it possible to see online without a display attached to see if "pcb rb" or "pcp sd" is executed? Maybe via tail -f xxxx.log?
                Pi4 4GB piCorePlayer with LMS and Squeezelite for USB inside an Argon One case
                Pi3B+ (7" Display, Hifiberry DAC+ Pro) piCorePlayer with Squeezlite/Jivelite for Hifiberry inside a SmartiPi touch case
                Pi Zero W only for Bluetooth headphones
                Two Airport Express
                Ikea Symfonisk

                Comment

                • carsten_h
                  Senior Member
                  • Apr 2019
                  • 831

                  #23
                  Originally posted by carsten_h
                  Regarding the switching off via the powerbutton. Is it possible to see online without a display attached to see if "pcb rb" or "pcp sd" is executed? Maybe via tail -f xxxx.log?
                  Today I got a Micro HDMI to HDMI cable and could test the output of piCorePlayer. So I can say that always a "pcp sd" is executed, also when I press longer. But that is Ok for me, I only need switching off. I will only start a reboot via the webpage. But now it is clear that the command is executed and that is the great part!

                  Now I saw the following:
                  Code:
                  Finished piCorePlayer v6.0.0-b7 startup.
                  
                  To setup piCorePlayer, use the web interface via a browser:
                   - http://192.168.178.109
                  
                  Press [Enter] to access console.
                  
                  In the background, ntpd is syncing time between piCorePlayer and the internet.
                  A large offset between 1970 and now is normal.
                  /bin/sh: vcgencmd: not found
                  It seems that the first time the command to get the actual temperature is not working. But I think that this is no real problem.
                  Pi4 4GB piCorePlayer with LMS and Squeezelite for USB inside an Argon One case
                  Pi3B+ (7" Display, Hifiberry DAC+ Pro) piCorePlayer with Squeezlite/Jivelite for Hifiberry inside a SmartiPi touch case
                  Pi Zero W only for Bluetooth headphones
                  Two Airport Express
                  Ikea Symfonisk

                  Comment

                  • Aldoszx
                    Junior Member
                    • Jan 2020
                    • 25

                    #24
                    If I am not mistaken, reboot could be done by double tapping the power button.
                    It worked for me, at least.

                    Comment

                    • carsten_h
                      Senior Member
                      • Apr 2019
                      • 831

                      #25
                      Originally posted by Aldoszx
                      If I am not mistaken
                      Yes, that works! Thank you!
                      Pi4 4GB piCorePlayer with LMS and Squeezelite for USB inside an Argon One case
                      Pi3B+ (7" Display, Hifiberry DAC+ Pro) piCorePlayer with Squeezlite/Jivelite for Hifiberry inside a SmartiPi touch case
                      Pi Zero W only for Bluetooth headphones
                      Two Airport Express
                      Ikea Symfonisk

                      Comment

                      • carsten_h
                        Senior Member
                        • Apr 2019
                        • 831

                        #26
                        Originally posted by paul-
                        The script has to run with root permissions, as it make a call to vcgencmd, which requires it.
                        I changed the second user script to "sudo python3 /home/tc/argononed.py", but I am still getting the message that vcgencmd is not found.
                        Should I change the call:
                        Code:
                        temp = os.popen("vcgencmd measure_temp").readline()
                        into
                        Code:
                        temp = os.popen("sudo vcgencmd measure_temp").readline()
                        ?
                        Pi4 4GB piCorePlayer with LMS and Squeezelite for USB inside an Argon One case
                        Pi3B+ (7" Display, Hifiberry DAC+ Pro) piCorePlayer with Squeezlite/Jivelite for Hifiberry inside a SmartiPi touch case
                        Pi Zero W only for Bluetooth headphones
                        Two Airport Express
                        Ikea Symfonisk

                        Comment

                        • Aldoszx
                          Junior Member
                          • Jan 2020
                          • 25

                          #27
                          Originally posted by carsten_h
                          I changed the second user script to "sudo python3 /home/tc/argononed.py", but I am still getting the message that vcgencmd is not found.
                          Should I change the call:
                          Code:
                          temp = os.popen("vcgencmd measure_temp").readline()
                          into
                          Code:
                          temp = os.popen("sudo vcgencmd measure_temp").readline()
                          ?
                          Have you tried to chmod 775 the argononed.py script?

                          Comment

                          • carsten_h
                            Senior Member
                            • Apr 2019
                            • 831

                            #28
                            Originally posted by Aldoszx
                            Have you tried to chmod 775 the argononed.py script?
                            Yes, I did this when creating it.

                            I tried vcgencmd on the shell and also with sudo and I always get "not found". So there must be something missing. I will search which part includes vcgencmd.
                            Pi4 4GB piCorePlayer with LMS and Squeezelite for USB inside an Argon One case
                            Pi3B+ (7" Display, Hifiberry DAC+ Pro) piCorePlayer with Squeezlite/Jivelite for Hifiberry inside a SmartiPi touch case
                            Pi Zero W only for Bluetooth headphones
                            Two Airport Express
                            Ikea Symfonisk

                            Comment

                            • Paul Webster
                              Senior Member
                              • Apr 2005
                              • 10343

                              #29
                              You probably have to install rpi-vc.tcz


                              PCP web interface/Main/Extensions/Available

                              install it

                              If you then try to run it directly you will get an error
                              VCHI initialization failed

                              However, if you run it with sudo then you will get something like
                              temp=46.7'C

                              and then reboot to make sure everything has been backed up.

                              IGNORE THIS BIT ... I think it does not apply to pCP
                              If you can find a way to add the user tc to the group "video" then I think it will not need sudo.
                              (usermod not in pCP)
                              Last edited by Paul Webster; 2020-01-28, 11:46. Reason: Add VCHI info
                              Paul Webster
                              Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
                              and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

                              Comment

                              • carsten_h
                                Senior Member
                                • Apr 2019
                                • 831

                                #30
                                Originally posted by Paul Webster
                                You probably have to install rpi-vc.tcz
                                Yes, I found it two minutes ago.
                                This package was under uninstalled packages, but I don't know why? When I first tried the script it has been working, so something has uninstalled it.
                                The only thing I changed was the gpio-handler for shutdown. Maybe when disabling this, rpi-vc was also disabled?

                                I had to delete it, reboot, install it, reboot and now it works and it works without sudo.
                                Pi4 4GB piCorePlayer with LMS and Squeezelite for USB inside an Argon One case
                                Pi3B+ (7" Display, Hifiberry DAC+ Pro) piCorePlayer with Squeezlite/Jivelite for Hifiberry inside a SmartiPi touch case
                                Pi Zero W only for Bluetooth headphones
                                Two Airport Express
                                Ikea Symfonisk

                                Comment

                                Working...