Bugsounet Coding

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

    Hello Bugsounet ! Back it's great

    General Discussion
    2
    11
    304
    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.
    • 2hdlockness
      2hdlockness Helpers last edited by

      Hello Cedric. Glad to be able to chat with you again!
      I have a little question.
      Is it possible to send a notification via the google assistant to a particular module asking it to hide?
      I think I know the answer but I am convinced that you will find a solution for me …

      For info: I created a recipe, configure my module for reception.
      It seems that the command reaches the module and is decoded according to the information I see on the console in dev mode) but I have the impression that when the GA closes all the modules are reloaded suddenly my order is canceled.
      You confirm ?

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

        hi, when your module received the information just lock the hidding (maybe you have not set it)

        with something like this:

        module.hide(500, {lockString: "LOCKEDBYMYMODULE"})
        ```js
        
        `lockString` value is +/- equal a password for locking (other module can't lock it)
        
        after for show it's the same ;)
        1 Reply Last reply Reply Quote 0
        • 2hdlockness
          2hdlockness Helpers last edited by

          It works perfectly with this method. Thank you !

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

            One more thing … Is it possible to send multiple notifications in the same command. I have been looking for hours but cannot find the exact syntax …
            Like
            notificationExec: {
            notification: “HIDE_XXX”, “HIDE_YYY”
            }

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

              give me your recipe, i will see

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

                var recipe = {
                  transcriptionHooks: {
                    "masquerlesmodules": {
                      pattern: "supprime tous les modules",
                      command: "masquerlesmodules"
                    },
                    "afficherlesmodules": {
                      pattern: "affiche tous les modules",
                      command: "afficherlesmodules"
                    },    
                    "masquercolis": {
                      pattern: "supprime le module mes colis",
                      command: "masquercolis"
                    },
                    "affichercolis": {
                      pattern: "affiche le module mes colis",
                      command: "affichercolis"
                    },
                    "masquerscoreboard": {
                      pattern: "supprime le module résultats foot",
                      command: "masquerscoreboard"
                    },
                    "afficherscoreboard": {
                      pattern: "affiche le module résultats foot",
                      command: "afficherscoreboard"
                    }
                  },
                  commands: {
                    "masquerlesmodules": {
                      notificationExec: {
                        notification: "HIDE_SHIPPING,HIDE_SCOREBOARD",
                    }                             
                      },
                      soundExec: {
                        chime: "close"
                      },
                    "afficherlesmodules": {
                      notificationExec: {
                        notification: "SHOW_SHIPPING,SHOW_SCOREBOARD",
                    }
                      },
                      soundExec: {
                        chime: "open"
                      },    
                    "masquercolis": {
                      notificationExec: {
                        notification: "HIDE_SHIPPING",
                    }    
                      },
                      soundExec: {
                        chime: "close"
                      },
                    "affichercolis": {
                      notificationExec: {
                        notification: "SHOW_SHIPPING",
                    }    
                      },
                      soundExec: {
                        chime: "open"
                      },
                    "masquerscoreboard": {
                      notificationExec: {
                        notification: "HIDE_SCOREBOARD",
                    }    
                      },
                      soundExec: {
                        chime: "close"
                      },
                    "afficherscoreboard": {
                      notificationExec: {
                        notification: "SHOW_SCOREBOARD",
                    }    
                      },
                      soundExec: {
                        chime: "open"
                      }      
                  },
                  plugins: {
                    // Describe your plugin callback functions here.
                    //
                  },
                }
                
                exports.recipe = recipe // Don't remove this line.
                
                
                1 Reply Last reply Reply Quote 0
                • bugsounet
                  bugsounet Main Coder last edited by bugsounet

                  @2hdlockness said in Hello Bugsounet ! Back it's great:

                  some errors inside (and corrected)

                  try this for many notification to send:

                  var recipe = {
                    transcriptionHooks: {
                      "masquerlesmodules": {
                        pattern: "supprime tous les modules",
                        command: "masquerlesmodules"
                      },
                      "afficherlesmodules": {
                        pattern: "affiche tous les modules",
                        command: "afficherlesmodules"
                      },    
                      "masquercolis": {
                        pattern: "supprime le module mes colis",
                        command: "masquercolis"
                      },
                      "affichercolis": {
                        pattern: "affiche le module mes colis",
                        command: "affichercolis"
                      },
                      "masquerscoreboard": {
                        pattern: "supprime le module résultats foot",
                        command: "masquerscoreboard"
                      },
                      "afficherscoreboard": {
                        pattern: "affiche le module résultats foot",
                        command: "afficherscoreboard"
                      }
                    },
                    commands: {
                      "masquerlesmodules": {
                        notificationExec: {
                          notification: "HIDE_SHIPPING,HIDE_SCOREBOARD"
                        },
                        soundExec: {
                          chime: "close"
                        }
                      },
                      "afficherlesmodules": {
                        moduleExec: {
                          module: ["MMM-GoogleAssistant"],
                          exec: (module) => {
                            module.sendNotification("SHOW_SHIPPING")
                            module.sendNotification("SHOW_SCOREBOARD")
                          }
                        },
                        soundExec: {
                          chime: "open"
                        }
                      },
                      "masquercolis": {
                        notificationExec: {
                          notification: "HIDE_SHIPPING"
                        },
                        soundExec: {
                          chime: "close"
                        }
                      },
                      "affichercolis": {
                        notificationExec: {
                          notification: "SHOW_SHIPPING"
                        },
                        soundExec: {
                          chime: "open"
                        }
                      },
                      "masquerscoreboard": {
                        notificationExec: {
                          notification: "HIDE_SCOREBOARD"
                        },
                        soundExec: {
                          chime: "close"
                        }
                      },
                      "afficherscoreboard": {
                        notificationExec: {
                          notification: "SHOW_SCOREBOARD"
                        },
                        soundExec: {
                          chime: "open"
                        }
                      },
                    },
                    plugins: {
                      // Describe your plugin callback functions here.
                      //
                    },
                  }
                  
                  exports.recipe = recipe // Don't remove this line.
                  

                  result:

                  [Notification][MMM-GoogleAssistant] ASSISTANT_HOOK 
                  [Notification][MMM-GoogleAssistant] SHOW_SHIPPING 
                  [Notification][MMM-GoogleAssistant] SHOW_SCOREBOARD 
                  [Notification][MMM-GoogleAssistant] ASSISTANT_STANDBY 
                  

                  I have only do : “afficherlesmodules” command

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

                    It’s perfect and I didn’t fall into the trap I saw that you had intentionally forgotten to put a } 😊

                    "afficherlesmodules": {
                          moduleExec: {
                            module: ["MMM-GoogleAssistant"],
                            exec: (module) => {
                              module.sendNotification("SHOW_SHIPPING")
                              module.sendNotification("SHOW_SCOREBOARD")
                            }
                           }   <---HERE              
                          },
                          soundExec: {
                            chime: "open"
                          }
                        },
                    
                    1 Reply Last reply Reply Quote 0
                    • bugsounet
                      bugsounet Main Coder last edited by

                      nop …

                      just copy/past ALL my purpose 😉

                      sample of command:

                          "command": {
                            moduleExec: {
                              module: ["MMM-GoogleAssistant"],
                              exec: (module) => {
                                !!! <JS command to do > !!!!
                              }
                            },
                            soundExec: {
                              chime: "open"
                            }
                          },
                      

                      others is:

                          "command name": {
                            notificationExec: {
                              notification: "some noti"
                            },
                            soundExec: {
                              chime: "close"
                            }
                          },
                      
                      1 Reply Last reply Reply Quote 0
                      • 2hdlockness
                        2hdlockness Helpers last edited by

                        ps: did you read the chat I sent you about the personal GA Backround on JARVIS Iron Man that I did?

                        Et pps: Peut-on parler directement en Français sur ton forum ou préfères tu que l’on parle Anglais absolument ?

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

                          sorry i prefer english, FR is only for FR modules (Freebox for example)

                          sure in private you can 😄

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