Bugsounet Coding

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

    difference in v4

    Recipes
    3
    15
    142
    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.
    • A
      abdelhadj Donators last edited by

      Hello,
      could you explain the difference for the GA V4?

      current recipe won’t work :
      for example how to open external link ?

            functionExec: {
              exec: () => {
                this.displayEXTResponse.start({
                  "photos": [],
                  "urls": [ "xxx" ],
                  "transcription": { transcription: 'Waze', done: true },
                })
              }
            },
      

      Thank you!

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

        Like you know (or not) GA have no plugins now 🙂
        that Why there is Gateway and EXT Plugins

        So let’s send notification to EXT-Gateway with EXT-GATEWAY notification

        want to use urls ?

        Warn: EXT-Browser plugins needed
        Try this:

              notificationExec: {
                notification: "EXT_GATEWAY",
                payload: (params) => {
                  return {
                    urls: ["xxx"]
                  }
                }
              },
        

        want to use photos ?

        Warn: EXT-Photos plugins needed
        Try this:

              notificationExec: {
                notification: "EXT_GATEWAY",
                payload: (params) => {
                  return {
                    photos: ["xxx", "YYY", "ZZZ"]
                  }
                }
              },
        

        Sorry, I forget to add it in wiki

        1 Reply Last reply Reply Quote 0
        • A
          abdelhadj Donators last edited by

          Thank you, it works for external url
          for photo, jpg picture needs to be add to ressources folder of EXT-Photo or GA? do we need to specify “xxx.jpg” ?
          or it works only with url?

          What about radiocommand? what is the equivalent and the EXT module ?

          Thank you

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

            Read Extended Plug-ins in GA wiki

            For photo in local, yes it works too but just remember path of photos is from “/modules” directory

            1 Reply Last reply Reply Quote 0
            • A
              abdelhadj Donators last edited by

              it works thank you.
              i will wait for Ext-Radio module

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

                No problem, it’s planned to be released soon!

                Enentually, if you have or updated radio sources, you can send me, I will apply in release

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

                  Hi hello
                  I had this very awesome recipe working in v3,3 but now with the Gateway and the xternal plugins
                  it doesnt work:

                  var recipe = {
                    transcriptionHooks: {
                  
                      "AN": {
                        pattern: "play another one",
                        command: "AN"
                      },
                      
                      },
                  
                    commands: {
                  
                      "AN": {
                         functionExec: {
                          exec: () => {
                            this.ExtentedOpen({
                  			photos: [],
                              urls: ["https://www.youtube.com/watch?v=ql9-82oV2JE"]      //or https://www.youtube.com/watch?v=K7l5ZeVVoCA    or  https://www.youtube.com/watch?v=vVy9Lgpg1m8  
                            })
                          }
                        },
                        soundExec: {
                          chime: "open"
                        }
                      },
                     
                    }
                  }
                  exports.recipe = recipe
                  
                  

                  Could you please give me a real time example as this one above on how to use it now.
                  If you write a full sample then i will be able to understand more but from the small samples in the top of the post and even though i red them i cant get it i am sorry. I have no idea how to actually structure inside the code the changes that have to be made and the way i should write them.

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

                    Hi,
                    this is a sample:

                    var recipe = {
                      transcriptionHooks: {
                        "AN": {
                          pattern: "play another one",
                          command: "AN"
                        }
                      },
                      commands: {
                        "AN": {
                          notificationExec: {
                            notification: "EXT_GATEWAY",
                            payload: (params) => {
                              return {
                                urls: ["https://www.youtube.com/watch?v=ql9-82oV2JE"]
                              }
                            }
                          },
                          soundExec: {
                            chime: "open"
                          }
                        }
                      }
                    }
                    
                    exports.recipe = recipe
                    

                    Need: Gateway and an Youtube plugin

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

                      So the EXT_GATEWAY will automatically send the url to the youtube plugin? i thought we had to specify after the notification gateway a notification to the proper plugin .
                      Well if that is the case then if i wanted to open a url the recipe again will only have to notify the Gateway ?
                      so it will practically be the same

                      var recipe = {
                        transcriptionHooks: {
                          "AN": {
                            pattern: "play another one",
                            command: "AN"
                          }
                        },
                        commands: {
                          "AN": {
                            notificationExec: {
                              notification: "EXT_GATEWAY",
                              payload: (params) => {
                                return {
                                  urls: ["http://www.stasinos.tv/Greek-Live-TV/Antenna.aspx"]
                                }
                              }
                            },
                            soundExec: {
                              chime: "open"
                            }
                          }
                        }
                      }
                      
                      exports.recipe = recipe
                      

                      right?

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

                        yes, it’s the gateway job 😉

                        actually, it make difference between Youtube, spotify, and others link

                        • youtube link => open with youtube plugin (EXT-YouTube OR EXT-YouTubeVLC [depend of what installed])
                        • spotify link => open with EXT-Spotify (if installed)
                        • other link => with EXT-Browser (if installed)

                        if youtube plugin or spotify plugin is not installed => it’s will open with EXT-Browser
                        if EXT-Browser is not installed => do nothing

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

                          @bugsounet
                          Nice !! you eally spend a lot of time coding the gateway 😄
                          Another recipe that worked in v3,3 and now it cannot execute the command , its for MMM-Newsfeed and the one i am talking about it the “article details” i get the confirmation icon but the command doesnt work i need to intersect gateway so it will open the article with ext browser.

                          var recipe = {
                            transcriptionHooks: {       
                              "NEWS_DETAIL_EN": {
                                pattern: "article details",
                                command: "NEWS_DETAIL"
                              },
                              "NEWS_PREVIOUS_EN": {
                                pattern: "previous article",
                                command: "NEWS_PREVIOUS"
                              },
                              "NEWS_NEXT_EN": {
                                pattern: "next article",
                                command: "NEWS_NEXT"
                              },
                              "NEWS_REFRESH_EN": {
                                pattern: "update news data",
                                command: "NEWS_REFRESH"
                              }                                    
                            },
                            commands: {
                              "NEWS_DETAIL": {
                                notificationExec: {
                                  notification: "NEWSFEED_DETAIL"
                                },
                                soundExec: {
                                  chime: "open"
                                }  
                              },
                              "NEWS_PREVIOUS": {
                                notificationExec: {
                                  notification: "NEWSFEED_PREVIOUS"
                                },
                                soundExec: {
                                  chime: "open"
                                }  
                              },
                              "NEWS_NEXT": {
                                notificationExec: {
                                  notification: "NEWSFEED_NEXT"
                                },
                                soundExec: {
                                  chime: "open"
                                }
                              },
                              "NEWS_REFRESH": {
                                notificationExec: {
                                  notification: "NEWSFEED_REFRESH"
                                },
                                soundExec: {
                                  chime: "open"
                                }
                              }
                            }
                          }
                          
                          exports.recipe = recipe // Don't remove this line.
                          
                          
                          1 Reply Last reply Reply Quote 0
                          • bugsounet
                            bugsounet Main Coder last edited by

                            make an issue in MMM-Newsfeed, i will pin it and correct it soon (I forget to apply new rules)

                            1 Reply Last reply Reply Quote 0
                            • A
                              Angel last edited by

                              ok i will ; )

                              A 1 Reply Last reply Reply Quote 0
                              • A
                                Angel @Angel last edited by

                                I tested the recipe corrected and it still doesnt run anything : (
                                What am i doing wrong?

                                var recipe = {
                                  transcriptionHooks: {
                                    "AN": {
                                      pattern: "play another one",
                                      command: "AN"
                                    }
                                  },
                                  commands: {
                                    "AN": {
                                      notificationExec: {
                                        notification: "EXT_GATEWAY",
                                        payload: (params) => {
                                          return {
                                            urls: ["https://www.youtube.com/watch?v=ql9-82oV2JE"]
                                          }
                                        }
                                      },
                                      soundExec: {
                                        chime: "open"
                                      }
                                    }
                                  }
                                }
                                
                                exports.recipe = recipe
                                
                                1 Reply Last reply Reply Quote 0
                                • bugsounet
                                  bugsounet Main Coder last edited by bugsounet

                                  corrected just now with new version of Gateway (v1.0.3)
                                  [Gateway send YT link instead of YT video id to EXT-YouTubeVLC]

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