Bugsounet Coding

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

    Recipes don't work

    Recipes
    2
    30
    120
    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
      Anthony Donators last edited by

      Because I am really newby and I have no idea of coding can someone help me understand GA recipes? (How to make them, where to save them, add them in the config etc.) For example I have installed EXT-RadioPlayer and made a recipe for greek radio stations the module is not even loading in MM and I don’t know if recipe is correct. Here is my config of the module and from the recipe as well:

      module config:

      		{
      			module: 'EXT-RadioPlayer',
      			position: 'top_right',
      			config: {
      				debug: false,
      				minVolume: 30,
      				maxVolume: 75,
      			}
      		},
      
      

      GA config with recipes:

      		{
      			module: "MMM-GoogleAssistant",
      			configDeepMerge: true,
      			config: {
      				assistantConfig: {
      				latitude: 37.93333,
      				longitude: 23.73333,
      				recipes: [
      					"modules/EXT-RadioPlayer/recipe/EXT-RadioPlayer.js",
      					"Reboot-Restart-Shutdown.js", "with-MMM-NewsFeed.js"
      				],
      			},
      			}
      		},
      
      

      EXT-RadioPalyer recipe

      var recipe = {
        transcriptionHooks: {
          "rockfm": {
            pattern: "play rock fm",
            command: "rockfm"
          },
          /**"athensdj": {
            pattern: "play athens dj",
            command: "athensdj"
          },**/
          "sfairafm": {
            pattern: "play sfaira fm",
            command: "sfairaf"
          },
        },
      
        commands: {
          "rockfm": {
            notificationExec: {
              notification: "EXT_RADIO-START",
              payload: (params) => {
                return {
                  img: "modules/EXT-RadioPlayer/Logos/GR/rockfm.png",
                  link: "https://az10.yesstreaming.net:8060/radio.mp3"
                }
              }
            },
            displayResponse: false,
            soundExec: {
              chime: "open"
            }
          },
        commands: {
          "sfairafm": {
            notificationExec: {
              notification: "EXT_RADIO-START",
              payload: (params) => {
                return {
                  img: "modules/EXT-RadioPlayer/Logos/GR/sfairafm.png",
                  link: "http://sfera.live24.gr:80/sfera4132"
                }
              }
            },
            displayResponse: false,
            soundExec: {
              chime: "open"
            }
          },
         /**   commands: {
          "athensdjfm": {
            notificationExec: {
              notification: "EXT_RADIO-START",
              payload: (params) => {
                return {
                  img: "modules/EXT-RadioPlayer/Logos/GR/athensdj.png",
                  link: "http://netradio.live24.gr:80/athensdeejay"
                }
              }
            },
            displayResponse: false,
            soundExec: {
              chime: "open"
            }
          },**/
      }
      exports.recipe = recipe
      
      1 Reply Last reply Reply Quote 0
      • bugsounet
        bugsounet Main Coder last edited by

        Hi, @Anthony,

        That i see:

        • recipe file is really not matching with syntax
        • GA config syntaxt is not good too

        I will correct recipe and test it
        be back…

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

          EXT-RadioPlayer recipe:

          • inside EXT-RadioPlayer recipe directory
          • saved to EXT-RadioPlayer.gr.js for Gateway radioplayer tool using

          image.png

          var recipe = {
            transcriptionHooks: {
              "rockfm": {
                pattern: "play rock fm",
                command: "rock fm"
              },
              "athensdj": {
                pattern: "play athens dj",
                command: "athens dj"
              },
              "sfairafm": {
                pattern: "play sfaira fm",
                command: "sfaira fm"
              },
            },
          
            commands: {
              "rock fm": {
                notificationExec: {
                  notification: "EXT_RADIO-START",
                  payload: (params) => {
                    return {
                      img: "modules/EXT-RadioPlayer/Logos/GR/rockfm.png",
                      link: "https://az10.yesstreaming.net:8060/radio.mp3"
                    }
                  }
                },
                displayResponse: false,
                soundExec: {
                  chime: "open"
                }
              },
              "sfaira fm": {
                notificationExec: {
                  notification: "EXT_RADIO-START",
                  payload: (params) => {
                    return {
                      img: "modules/EXT-RadioPlayer/Logos/GR/sfairafm.png",
                      link: "http://sfera.live24.gr:80/sfera4132"
                    }
                  }
                },
                displayResponse: false,
                soundExec: {
                  chime: "open"
                }
              },
              "athens dj": {
                notificationExec: {
                  notification: "EXT_RADIO-START",
                  payload: (params) => {
                    return {
                      img: "modules/EXT-RadioPlayer/Logos/GR/athensdj.png",
                      link: "http://netradio.live24.gr:80/athensdeejay"
                    }
                  }
                },
                displayResponse: false,
                soundExec: {
                  chime: "open"
                }
              }
            }
          }
          exports.recipe = recipe
          

          GA config:

          • recipe should be inside config {} and outiside assistantConfig: {}
          • recipe path should be: '../../EXT-RadioPlayer/recipe/EXT-RadioPlayer.gr.js',
          {
            module: "MMM-GoogleAssistant",
            configDeepMerge: true,
            config: {
              assistantConfig: {
                latitude: 37.93333,
                longitude: 23.73333,
              },
              recipes: [
                "../../EXT-RadioPlayer/recipe/EXT-RadioPlayer.gr.js",
                "Reboot-Restart-Shutdown.js",
                "with-MMM-NewsFeed.js"
              ],
            }
          },
          

          If you want i can publish your recipe just upload images somewhere and i will add it for all users of your country 🙂

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

            @Anthony : since I test your recipe… I listen athens dj radio station 😕
            it’s just like i love 😁 😁

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

              OK I defenetly am doing something wrong. Is my EXT-RadioPlayer config correct? Because it still does not appear in MM.

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

                For example when I say “Jarvis, open anthens dj” the answer is “this came back from a search”

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

                  I am pretty sure that something is missing from my config. Would I help you if I send all my config? Sorry for the trouble.

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

                    “Jarvis, open anthens dj”

                    you have defined in recipe:
                    pattern: "play athens dj",

                    so try with: “Jarvis, play athens dj”

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

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • A
                        Anthony Donators last edited by

                        I will sed you all my config to review. Basically I cannot control anything that has to do with MM modules. I can only chat with GA like “How are you”, “what time is it” etc.

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

                          @Anthony said in Recipes don't work:

                          I will sed you all my config to review. Basically I cannot control anything that has to do with MM modules. I can only chat with GA like “How are you”, “what time is it” etc.

                          	modules: [
                          		{
                          			module: "MMM-GoogleAssistant",
                          			configDeepMerge: true,
                          			config: {
                          				assistantConfig: {
                          				latitude: 37.93333,
                          				longitude: 23.73333,
                          			},
                          				recipes: [
                          					"../../EXT-RadioPlayer/recipe/EXT-RadioPlayer.gr.js",
                          					"Reboot-Restart-Shutdown.js", "with-MMM-NewsFeed.js"
                          				],
                          			}
                          		},
                          		{
                          			module: 'Gateway',
                          			config: {
                          				debug: false,
                          				port: 8081,
                          				username: "**********",
                          				password: "***************",
                          				noLogin: false,
                          				usePM2: false,
                          				PM2Id: 0,
                          				useMapping: false,
                          				portMapping: 8081
                          			}
                          		},
                          		{
                          			module: "EXT-Detector",
                          			position: "top_left",
                          			configDeepMerge: true
                          		},
                          		{
                          			module: "alert",
                          		},
                          		{
                          			module: "EXT-Background",
                          			config: {
                          				model: "ironman",
                          				myImage: null
                          			}
                          		},
                          		{
                          			module: "MMM-IronManGIF",
                          			position: "middle_center",
                          			config: {
                          			style: 8,              // Style number
                          			maxWidth: "100%",      // Sizes the images. 
                          			rotate: false,         // Rotate through images
                          			updateInterval: 30000  // Interval between image rotations (30 seconds)
                          		}
                          		},
                          		{
                          			module: "updatenotification",
                          			position: "top_bar"
                          		},
                          		{
                          			module: "clock",
                          			position: "top_left"
                          		},
                          		{
                          			module: 'MMM-SpeedTest',
                          			position: 'top_center',
                          			configDeepMerge: true
                          		},
                          		{
                          			module: "calendar",
                          			header: "Greek Holidays",
                          			position: "top_left",
                          			config: {
                          				calendars: [
                          					{
                          						symbol: "calendar-check",
                          						url: "https://www.officeholidays.com/ics-all/greece"
                          					}
                          				]
                          			}
                          		},
                          		{
                          			module: 'MMM-Tools',
                          			position: 'top_left',
                          			config: {
                          				refresh: 1000 * 5,
                          				containerSize: null,
                          				itemSize: null
                          			}
                          		},
                          
                          		{
                          			module: "MMM-Weather",
                          			position: "top_right",
                          			configDeepMerge: true,
                          			config: {
                          			updateInterval: "15m", // 15 minutes
                          			api: {
                          			key: "**************************",
                          			latitude: 37.93333,
                          			longitude: 23.73333,
                          		},
                          		}
                          		},
                          		{
                          			module: 'EXT-RadioPlayer',
                          			position: 'top_right',
                          			config: {
                          				debug: false,
                          				minVolume: 30,
                          				maxVolume: 75,
                          			}
                          		},
                          
                          		{
                          			module: "compliments",
                          			position: "lower_third"
                          		},
                          		{
                          			module: "MMM-NewsFeed",
                          			position: "bottom_bar",
                          			configDeepMerge: true,
                          			config: {
                          				debug:false,
                          				update: "15m",
                          				speed: "15s",
                          				maxItems: 100,
                          				flux: [
                          				{
                          					from: "News Beast",
                          					url: "https://www.newsbeast.gr/greece/feed"
                          				},
                          				{
                          					from: "4th Party Modules",
                          					url: "http://forum.bugsounet.fr/category/1.rss"
                          				}
                          				],
                          				personalize: {
                          				Name: "NewsFeed",
                          				NameField: true,
                          				NameColor: "#FFF",
                          				NameBackground: "#414141",
                          				ArticleColor: "#ffffff",
                          				ArticleBackground: "#000000",
                          				DescriptionColor: "#ffffff",
                          				DescriptionBackground: "#000000",
                          				QRCode: false,
                          				fontSize: "100%"
                          				},
                          				vertical: {
                          				useVertical: false,
                          				width: "450px",
                          				imageMaxWidth: "20vw",
                          				imageMaxHeight: "20vh"
                          				}
                          			}
                          			},
                          	]
                          };
                          
                          1 Reply Last reply Reply Quote 0
                          • bugsounet
                            bugsounet Main Coder last edited by

                            just see patern in the recipe file, and you have what to say to activate it

                            sample in your new recipe:

                                "athensdj": {
                                  pattern: "play athens dj",
                                  command: "athens dj"
                                },
                            

                            to activate athensdj you have to say: `javis, play athens dj"

                            pattern filed is the exact match sentence

                            if you want to say jarvis... open anthens dj
                            change partern to
                            pattern: "open athens dj",

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

                              I have allready tried both but same result. I know Iam missing something. Did you review my hole config file? Because I made the changes you send me but still nothing. You may spot the error. GA works only for conversation and for control the mirror.

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

                                and from Gateway app, try to launch radio ?

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

                                  Do i have to do something in Gateway’s config to work? How do I lunch it with voice? Because it does not appear in MM start up

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

                                    open your browser from your computer: http://ip-of-your-rasberrypi:8081

                                    sample: http://192.168.0.100:8081
                                    login/password by default are admin

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

                                      I get ‘Error: Invalid username and password.’

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

                                        case sensitive 😉

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

                                          @bugsounet said in Recipes don't work:

                                          case sensitive 😉

                                          ok i am in
                                          radio.png

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

                                            @bugsounet said in Recipes don't work:

                                            EXT-RadioPlayer recipe:

                                            inside EXT-RadioPlayer recipe directory
                                            saved to EXT-RadioPlayer.gr.js for Gateway radioplayer tool using

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