mykle1 / Hello-Lucy

Hide/Show pages, all or individual modules. Improved and more user friendly
MIT License
44 stars 11 forks source link

Hide a default module #11

Closed hugo82000 closed 5 years ago

hugo82000 commented 5 years ago

Hello, first thank you for you work it's really impressive!

I'm trying to hide the weather default module. I followed your tuto on github on how to add a module but it don't work.. Is your tuto complete or missing some things maybe..?

hugo82000 commented 5 years ago

This is in my currentweather.js

    return wrapper;
},

////////////////////////////////////////////////////////////////////////////////////:

notificationReceived: function(notification, payload) { if (notification === 'HIDE_WEATHER') { this.hide(1000); } else if (notification === 'SHOW_WEATHER') { this.show(1000); }

},  

/////////////////////////////////////////////////////////////////////////////////////////

hugo82000 commented 5 years ago

This is in my MMM-voice

` // MMM-voice sends notification to MMM-BMW-DS to HIDE else if (notification === 'HIDE_WEATHER') { this.sendNotification('HIDE_WEATHER'); }

    // MMM-voice sends notification to MMM-BMW-DS to SHOW
    else if (notification === 'SHOW_WEATHER') {
         this.sendNotification('SHOW_WEATHER');
    }`
hugo82000 commented 5 years ago

And this in my node_helper.js

else if (/(SHOW)/g.test(data) && /(WEATHER)/g.test(data)) { this.sendSocketNotification('SHOW_WEATHER'); } else if (/(HIDE)/g.test(data) && /(WEATHER)/g.test(data)) { this.sendSocketNotification('HIDE_WEATHER'); }

mykle1 commented 5 years ago

Are you referring to the weatherforecast and currentweather that come with MM? Your example above says MMM-BMW-DS. I can help you but I need to know what module(s) specifically

mykle1 commented 5 years ago

I just uploaded the weatherforecast.js file and the currentweather.js file to this repo. They are in the Replacement Module Files folder. Put them in their respective folders within the MagicMirror/modules/default folder. They will now work by saying HIDE WEATHER AND SHOW WEATHER. MMM-BWM-DS will also work using these commands. If you want them on certain pages then please follow the readme

mykle1 commented 5 years ago

That should take care of your issue