Read the statement by Michael Teeuw here.
What's the difference?
-
Thank you, mate! :-)
-
I spent a day with the docs that you suggested and I successfully broadcast a notification from MMM-voice using
this.sendNotification('HIDE_LUCY')
. I successfully received that notification in MMM-EasyPix (test module) this way:if (notification === 'HIDE_LUCY') { MM.getModules().enumerate((module) => { module.hide(1000); });
However, this resulted in ALL modules being hidden, not just MMM-EasyPix, which was my intention. I then tried
moduleA.show(0, {force: true});
if (notification === 'HIDE_LUCY') { MMM-EasyPix.hide(0, {force: true});
and
if (notification === 'HIDE_LUCY') { module_0_MMM-EasyPix.hide(0, {force: true});
Nothing changed.
module_0_MMM-EasyPix I got from examining the elements in dev console. MMM-voice in these trials is module_6_MMM-voice.
I then removed all edits to MMM-EasyPix. Instead of trying to have MMM-EasyPix hide itself when it receives a notification, I tried to have MMM-voice hide MMM-EasyPix directly using
moduleA.hide(0, {lockString: "module_b_identifier"});
. One is commented out but both do not work as expectedelse if (notification === 'HIDE_LUCY') { // MMM-EasyPix.hide(0, {lockString: "module_6_MMM-voice"}); module_0_MMM-EasyPix.hide(0, {lockString: "module_6_MMM-voice"}); }
I know I’m going about it the wrong way. That’s painfully obvious, but I thought if I could get it to work then I would continue to find a more efficient way of doing it.
MMM-voice works amazingly well on some laptops that I’m experimenting with. It very intelligently added “LUCY” to the words.json file and the MMM-voice.dic file automatically. I determined this was done in the node_helper via the
generateDicLM()
andfs.writeFile()
functions when all I did was add ‘HIDE LUCY’ and ‘SHOW LUCY’ to the sentences array. Fantastic!And lastly, the only other modification I made was to the
socketNotificationReceived
function of the MMM-voice.js file hereelse if (notification === 'HIDE_MODULES') { MM.getModules().enumerate((module) => { module.hide(1000); }); } else if (notification === 'SHOW_MODULES') { MM.getModules().enumerate((module) => { module.show(1000); });
and here
else if (notification === 'HIDE_LUCY') { // MMM-EasyPix.hide(0, {lockString: "module_6_MMM-voice"}); module_0_MMM-EasyPix.hide(0, {lockString: "module_6_MMM-voice"}); } else if (notification === 'SHOW_LUCY') { // MMM-EasyPix.show(0, {lockString: "module_6_MMM-voice"}); module_0_MMM-EasyPix.show(0, {lockString: "module_6_MMM-voice"}); }
So, if you care to give me some pointers, or point me in the right direction, or simply point out my mistakes so that I might try to correct them, I would greatly and humbly appreciate it. :-)
Peace!
-
@Mykle1 just do that in easypix
if (notification === 'HIDE_LUCY') { this.hide(1000); }
-
@strawberry-3.141 said in What’s the difference?:
just do that in easypix
Success! :-)
Now I plan to do it the right way. I’ll take another look at the DEVELOPER document and learn how to properly register my modules with MMM-voice.
Thank you!
Peace!
-
Is there any way to run the
bash dependencies.sh
command on a Windows machine? I see that it requires sudo, which Windows does not have, so the installation fails immediately. -
This is what I tried to get MMM-voice working under windows:
I successfully installed MMM-voice on a laptop that is running ubuntu. It works just fine there. So I copied the MMM-voice folder, the pocketsphinx folder and the sphinxbase folder from the ubuntu machine and pasted them in their respective directories on the Windows machine. I did get an “initializing” message once before getting the dreaded “ERROR” message. I triedmicrophone: 2,
(numbers 1 thru 5) but all failed.Anyway, if there is a way to install this under Windows I would really appreciate some direction. Thanks.
Peace!
-
@Mykle1 never tried to install it on windows, you need ti install all dependencies manually if they even exist for windows, then make sure when they get used that the path etc is correct
-
Ok, thanks. I’m looking into that right now
-
I can now use MMM-voice to hide and show any module individually or all at once . I currently have about 10 working. When I launch MM I only have one module showing. All others are hidden by design. I am quite pleased with this.
The past 2 days I’ve been trying to make the keyword put MMM-voice directly into voice mode, as I will only be using it in voice mode to hide and show modules, sort of like MMM-RemoteControl using voice. I’ve tried notifications and socketNotifications, triggered by the keyword, to send a VOICE notification to change the mode to VOICE but I am defeated. i would really appreciate some advice on how to accomplish this. Thanks
Peace!
-
@Mykle1 not sure if i understand there is a check if the current mode is voice if so there will be no notification sent, you need to remove that if it is what you want