Bugsounet Coding

    • Register
    • Login
    • Search
    This Forum is now reserved to registred users!

    Screen Manager Recipe

    Recipes
    5
    18
    270
    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.
    • bmachina
      bmachina Translators BetaTester last edited by bmachina

      I’m running a RP3 with an HDMI TV connecting cable but I’m unable to get the ScreenManager.js recipe working.
      When I say my “pattern” it does shut the screen down for 2 seconds but it turns on again right away.
      The opposite also don’t work, with the screen off, if I say Jarvis “pattern” he doesn’t turn the screen on.

      Could this be because I’m using a TV instead of a computer monitor?
      I was wondering if I can use something like tvservice -o instead of the “vcgencmd display_power 0” the recipe itself? But I have no idea how…

      Thanks

      1 Reply Last reply Reply Quote 0
      • U
        ulster Donators last edited by

        Já experimentaste algum destes comandos?
        sudo tvservice -o to turn off
        sudo tvservice -p to turn on

        Um destes 4 exemplos deita o monitor abaixo.
        Aparece o sinal sem hdmi. O problema é que depois não o consigo ligar.
        Experimenta
        1- vcgencmd display_power 0
        2- sudo tvservice -o
        3- DISPLAY=:0 xset dpms force off
        4-xset -display :0 dpms force off

        1 Reply Last reply Reply Quote 0
        • bugsounet
          bugsounet Main Coder last edited by

          maybe, if your TV is CEC, you can try

          echo 'standby 0' | cec-client -s

          Note: you have to install cec-utils packet to use CEC function
          sudo apt-get install cec-utils -y

          bmachina 1 Reply Last reply Reply Quote 0
          • bmachina
            bmachina Translators BetaTester last edited by

            Awesome, thanks guys I’m going to try both

            1 Reply Last reply Reply Quote 0
            • bmachina
              bmachina Translators BetaTester @bugsounet last edited by

              @bugsounet said in Screen Manager Recipe:

              maybe, if your TV is CEC, you can try

              echo 'standby 0' | cec-client -s

              Note: you have to install cec-utils packet to use CEC function
              sudo apt-get install cec-utils -y

              I need to try this in the recipe, after installing the cec-utils, right?
              It will be something like this?:

              commands: {
              “SCREEN_TURNOFF”: {
              soundExec: {
              chime: “close”,
              },
              shellExec: {
              exec: “echo ‘standby 0’ | cec-client -s”
              }
              },
              “SCREEN_TURNON”: {
              soundExec: {
              chime: “open”,
              },
              shellExec: {
              exec: “vcgencmd display_power 1”
              }
              }
              }
              }

              1 Reply Last reply Reply Quote 0
              • bmachina
                bmachina Translators BetaTester last edited by

                It works!! 😄
                How can I turn it on now? exec: “echo ‘standby 1’ | cec-client -s” ?

                1 Reply Last reply Reply Quote 0
                • bugsounet
                  bugsounet Main Coder last edited by

                  to on echo 'on 0' | cec-client -s

                  1 Reply Last reply Reply Quote 0
                  • bmachina
                    bmachina Translators BetaTester last edited by

                    BINGO!! Thanks man, you rock!

                    1 Reply Last reply Reply Quote 0
                    • bmachina
                      bmachina Translators BetaTester last edited by

                      Here’s the Recipe code for other people use if they need to use CEC:

                      /** Screen Manager /
                      /
                      Vocal commands script /
                      /
                      set partern in your language /
                      /
                      @bugsounet **/

                      var recipe = {
                      transcriptionHooks: {
                      “SCREEN_TURNOFF”: {
                      pattern: “Turn your screen OFF in Your Own Language”,
                      command: “SCREEN_TURNOFF”
                      },
                      “SCREEN_TURNON”: {
                      pattern: “Turn your screen ON in Your Own Language”,
                      command: “SCREEN_TURNON”
                      }
                      },

                      commands: {
                      “SCREEN_TURNOFF”: {
                      soundExec: {
                      chime: “close”,
                      },
                      shellExec: {
                      exec: “echo ‘standby 0’ | cec-client -s”
                      }
                      },
                      “SCREEN_TURNON”: {
                      soundExec: {
                      chime: “open”,
                      },
                      shellExec: {
                      exec: “echo ‘on 0’ | cec-client -s”
                      }
                      }
                      }
                      }

                      exports.recipe = recipe // Don’t remove this line.

                      1 Reply Last reply Reply Quote 2
                      • bugsounet
                        bugsounet Main Coder last edited by

                        Don’t forget to save it with a different file name because it will reset on next update 😉

                        bmachina 1 Reply Last reply Reply Quote 1
                        • bmachina
                          bmachina Translators BetaTester @bugsounet last edited by

                          @bugsounet said in Screen Manager Recipe:

                          Don’t forget to save it with a different file name because it will reset on next update 😉

                          You bet! Thanks again 🙂

                          Chris 1 Reply Last reply Reply Quote 0
                          • Chris
                            Chris @bmachina last edited by

                            @bmachina
                            Hello,
                            For information, this recipe did not work for me.

                            in effect,

                            echo ‘standby 0’ | cec-client -s
                            

                            and

                            echo ‘on 0’ | cec-client -s
                            

                            did not work for me.

                            The appropriate commands are:

                            echo standby 0 | cec-client -s -d 1
                            

                            and

                            echo on 0 | cec-client -s -d 1
                            

                            I have another problem, unable to make the recipe work as it was written in French.

                            It was necessary to replace the commands with “TURN ON” and TURN OFF "for this to work.

                            I am still trying to find a solution to this problem.

                            Hope this can help other people out.

                            Regards,

                            1 Reply Last reply Reply Quote 1
                            • bmachina
                              bmachina Translators BetaTester last edited by

                              Awesome thanks for the update @Chris! These ones are also working for me but I do notice sometimes the older ones were returning ShellExec error but only sometimes. I will keep an eye on this ones now.

                              1 Reply Last reply Reply Quote 0
                              • bugsounet
                                bugsounet Main Coder last edited by

                                @Chris don’t respond to many topic but when it respond it take a good response !!!
                                Good see @Chris !

                                Chris 1 Reply Last reply Reply Quote 0
                                • Chris
                                  Chris @bugsounet last edited by

                                  @bugsounet
                                  Hello,
                                  Thanks for the compliment.
                                  as I am currently working on CEC utilities in order to save energy on the consumption of the TV connected to the magic mirror (rather useful in France with the price of electricity at the moment …). I looked for a module that could transform a USB camera into a motion detector for waking up and sleeping a CEC compatible screen.
                                  I may have found a solution by modifying a few command lines on an existing module. I continue my tests. If people are interested, I will pass the procedure on.

                                  Regards,

                                  bmachina 1 Reply Last reply Reply Quote 1
                                  • bugsounet
                                    bugsounet Main Coder last edited by

                                    @chris: humm… maybe another @bugsounet library for this…

                                    1 Reply Last reply Reply Quote 0
                                    • 2hdlockness
                                      2hdlockness Helpers last edited by

                                      This post is deleted!
                                      1 Reply Last reply Reply Quote 0
                                      • bmachina
                                        bmachina Translators BetaTester @Chris last edited by

                                        @chris x2

                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post
                                        Powered by NodeBB | @bugsounet ©2022