Question(s) about recipes...
-
Ok,
-
I have instaled the MMM-Selfieshot module,
-
I have changed the Pattern to my own language (Portuguese) in the with-MMM-Selfieshot.js inside the Recipes folder and changed the name to with-MMM-SelfieshotPT.js because of the updates.
-
Then, I put the name of the file the config.js in the recipes section like this:
recipes: [“ExtSpotifyPT.js”, “test.js”, “Reboot-Restart-ShutdownPT.js”, “ScreenManagerPT.js”, “with-MMM-SelfieshotPT.js”, “MMM-MplayerRadioPT.js”],
Do I need to make anything else to get a recipe to work?
Probably missing something very stupid because I read all over the wiki and I could not get any of them to work
Thanks in advance
-
-
do you change the
pattern
to your own language ?actually:
... pattern: "selfie", ...
it’s mean that you have to say
selfie
to take a selfie. If you want another word or sentence just change it -
Yes, I changed the Pattern to my own language (with several Portuguese words) in the with-MMM-Selfieshot.js , is there another place I need to edit besides put the recipe name inside config.js?
-
normaly nothing else, it’s depend if coder of MMM-Selfieshot have changed something and breaking change since my last check
-
I really don’t know why I cannot get any of them to work.
recipes: [“ExtSpotifyPT.js”, “test.js”, “Reboot-Restart-ShutdownPT.js”, “ScreenManagerPT.js”, “with-MMM-SelfieshotPT.js”, “MMM-MplayerRadioPT.js”],
Could this be something related specifically to the Language that is set up in Google Assistant? Changing Patterns doesn’t look like is triggering something.
-
maybe
recipes :[]
is in a bad place inconfig:{}
past your GA config for see ?
-
I’m using on RP3+ but I still didn’t have time to change the code to GA Light but Recipes were also not working previously, so probably that’s not the reason as well.
{ module: "MMM-GoogleAssistant", position: "top_left", configDeepMerge: true, config: { debug: false, assistantConfig: { lang: "pt-BR", latitude: xxxxxxx, //add your location coordinates longitude: xxxxxx, }, responseConfig: { useFullscreen: false, useResponseOutput: true, responseOutputCSS: "response_output.css", screenOutputTimer: 5000, useAudioOutput: true, useChime: true, confirmationChime: true, useInformations: true }, Extented: { useEXT: true, deviceName: "MagicMirror", stopCommand: "stop", youtube: { useYoutube: true, youtubeCommand: "youtube", displayResponse: true, useVLC: true, minVolume: 30, maxVolume: 100 }, screen: { useScreen: true, animateBody: true, delay: 5 * 60 * 1000, turnOffDisplay: true, mode: 4, ecoMode: true, delayed: 0, displayCounter: true, displayBar: true, displayStyle: "Text", detectorSleeping: false, governorSleeping: false, displayLastPresence: true, userPresenceNotification: true, // available with v3.0.3 screenStatusNotification: true // available with v3.0.3 }, governor: { useGovernor: true, useCallback: true, sleeping: "powersave", working: "ondemand" }, links: { useLinks: true, displayDelay: 60 * 1000, scrollActivate: false, scrollStep: 25, scrollInterval: 1000, scrollStart: 5000 }, internet: { useInternet: true, displayPing: false, delay: 2* 60 * 1000, scan: "google.pt", command: "pm2 restart 0", showAlert: true, needRestart: false }, photos: { usePhotos: true, useGooglePhotosAPI: true, displayType: "none", displayDelay: 10 * 1000, albums: [], sort: "new", hiResolution: true, timeFormat: "DD/MM/YYYY HH:mm", moduleHeight: 300, moduleWidth: 300, }, welcome: { useWelcome: true, welcome: "O resumo de hoje" }, cast: { useCast: true, port: 8569 }, volume: { useVolume: true, volumePreset: "ALSA_HDMI", myScript: null }, spotify: { useSpotify: true, visual: { updateInterval: 1000, idleInterval: 10000, useBottomBar: true, CLIENT_ID: "xxxxxxxxxx", CLIENT_SECRET: "xxxxxx", }, player: { type: "Librespot", email: "xxxxxxx", password: "xxxxxxxx", minVolume: 10, maxVolume: 90, usePause: true }, }, recipes: ["ExtSpotifyPT.js", "test.js", "Reboot-Restart-ShutdownPT.js", "ScreenManagerPT.js", "with-MMM-SelfieshotPT.js", "MMM-MplayerRadioPT.js"], NPMCheck: {} } }, },
-
hi,
this is your AssistantLight config:
{ module: "MMM-GoogleAssistant", position: "top_left", configDeepMerge: true, config: { debug: false, assistantConfig: { lang: "pt-BR", latitude: xxxxxxx, longitude: xxxxxx, }, recipes: ["test.js", "Reboot-Restart-ShutdownPT.js", "ScreenManagerPT.js", "with-MMM-SelfieshotPT.js", "MMM-MplayerRadioPT.js"], } },
what recipe don’t works ?
Note: Spotify recipe can’t works because you use an 3b+ (that’s why i delete it)
-
Thanks for your help @bugsounet , I’m copy/pasting this right now. However, none of the recipes seems to work and these ones + the with-MMM-pages are the ones I really need
Regarding Spotify how can use Librespot and see what is playing on Spotify on my Magic Mirror as an alternative? I don’t mind not controlling Spotify with the recipe, I just need the player and see what’s playing, though.
-
with-MMM-pages is an sample to change page automaticaly with incoming notification, but need to know incoming notifaction name
there is no vocal control coded with this partfor other recipe it’s depend what do have in patern value and should be in accord of what do you have to say and should match with the transciption on the screen
Partern is compared with result of transcription of your screenFor spotify, maybe search in 3rd party module
-
concret sample with with-MMM-Selfieshot.js
the coded pattern for take a selfie with this module is :
pattern: "selfie",
so after activating GA if you says
selfie
it with launch the remote a command to launch a selfienow how verify is the pattern match with what you says ?
enable debug mode withdebug: true,
in GA configactivate assistant and says
selfie
and you can see if the transcript match with your patternfrom log:
[08.11.2021 18:01.19.663] [LOG] [GA] ASSISTANT_RESULT { error: { error: null, message: null, audio: false }, action: null, text: null, screen: null, audio: { path: '/home/bugsounet/MagicMirror/modules/MMM-GoogleAssistant/tmp/lastResponse.mp3', uri: 'tmp/lastResponse.mp3' }, transcription: { transcription: 'selfie', done: true }, <----------- The transcription is there ! :) continue: false, volume: null, lastQuery: { type: 'TEXT', key: 'selfie', lang: 'fr-FR', useResponseOutput: true, useAudioOutput: true, status: 'standby', chime: true } }
and in dev console (if you start with
npm start dev
)
you can see this log:[GA] TranscriptionHook matched: SELFIE_SHOOT [GA] Status from confirmation to hook [GA] Command SELFIE_SHOOT is executed (notificationExec). [Notification Send by MMM-GoogleAssistant] SELFIE_SHOOT {shootCountdown: 5, displayResult: true, playShutter: true, displayCountdown: true} [GA] Conversation ends.
-
OMG! OMG! After I enable and disabled again debug mode Selfie module started to work perfectly now! Probably it was indeed something with the recipes :[] in a bad place in config:{} lost in my old config…
You rock! Thanks man! I was trying this for months and I even started a new SD config from scratch without any luck.
I also had some progress in the Screen Manager recipe, now when I say pattern: “Desliga o ecrã” it does now trigger the command “SCREEN_TURNOFF” and I can see the animated Gif and ear the chime sound but only for 2 seconds or so… then it turns the screen on again, it doesn’t stay off. It doesn’t seem like a “pattern” issue, right?