Bugsounet Coding

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

    Solved With-EXT-Screen ?

    EXT-Screen
    2
    6
    91
    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.
    • V
      venditti69500 Donators last edited by

      hello everybodyl, I just finished the installation of Ext-Screen and Ext-Pir without problem, I would like to know the best possibilities of method to play a brief chime like a soundExec of GA when the userpresence notification or screen wake up is detected. possible with “recipe”? a piece of code in the modules concerned?
      Thanks to you

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

        Hi,

        something like this, maybe?

        var recipe = {
          commands: {
            "WakeUpSound": {
              moduleExec: {
                module: ["MMM-GoogleAssistant"],
                exec: (module, noti) => {
                  if (noti.notification == "EXT_SCREEN-WAKEUP") {
                    module.assistantResponse.playChime("opening")
                  }
                }
              }
            }
          },
          plugins: {
            onNotificationReceived: "WakeUpSound"
          }
        }
        
        exports.recipe = recipe
        

        Other way:

        • You can replace EXT_SCREEN-WAKEUP by EXT_SCREEN-ON for a sound when the screen turn on

        • EXT-Screen send a popup to EXT-Alert for displaying turn on warning but i don’t emit some sound. Why ? just because i think it will make some noise for nothing 😛

        • After… I can code this options but it will be disabled by default

        1 Reply Last reply Reply Quote 0
        • V
          venditti69500 Donators last edited by

          Wouah, it’s exactly that. I haven’t totaly finished yo assimilate the logic of all de can do with tour modules, but you make me want to learn, and to code, thank you very much. I will try to tweak if it’s possible with a “mysound” chime by myself.

          I seem to have already come across a similar topic in Portuguese so why not default option disabled, but here I am advanced.

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

            replace module.assistantResponse.playChime("opening") by module.assistantResponse.playChime("your_sound.mp3", true)

            your_sound.mp3 must be in resources directory of GA

            1 Reply Last reply Reply Quote 0
            • V
              venditti69500 Donators last edited by

              Thanks so much, i will test it today, Yesterday tried i’ve add the last line "recipe. export recipe and test EXT_SCREEN-WAKEU and EXT-SCREEN-ON , the module there Is upload but no chime, i will look what logs tell me. Or maybe just try a simple notification with soundExec

              1 Reply Last reply Reply Quote 0
              • V
                venditti69500 Donators last edited by

                Bonjour, merci beaucoup, la recette fonctionne parfaitement 👌🏼 le sujet peut être résolu

                1 Reply Last reply Reply Quote 1
                • Topic has been marked as solved  bugsounet bugsounet 
                • First post
                  Last post
                Powered by NodeBB | @bugsounet ©2022