• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Module suspend not being called

Scheduled Pinned Locked Moved Development
3 Posts 1 Posters 1.0k Views 1 Watching
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.
  • S Away
    sdetweil
    last edited by sdetweil Jun 7, 2018, 11:39 AM Jun 6, 2018, 6:44 PM

    I have two modules, which are executing fine…

    I want to add support for suspend and resume, to be used with the Hello-Lucy extension to hide modules.

    I added the functions to my module.js, but suspend is never called…

    the hello-lucy mod to MMM-Voice (module.js) does

                MM.getModules().enumerate((module) => {
                    module.hide(1000);
    
    

    so my modules should be found and notified…

    config for my modules is

                    {
                                    module: "ImageScheduler",
                    },
                    {
                                    module: "ImageService",
                    },
    

    resume is working… suspend is not…

    my suspend and resume functions

    				suspend: function(){
    					Log.log("image service in suspend");
    					self.sendSocketNotification("suspend",null)
    				},
    
    				resume: function(){
    					Log.log("image service in resume");
    					self.sendSocketNotification("resume",null)
    				},
    

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    1 Reply Last reply Reply Quote 0
    • S Away
      sdetweil
      last edited by sdetweil Jun 7, 2018, 12:42 PM Jun 7, 2018, 12:35 PM

      ok, this is a bug/limitation… the js/main.js.hideModule() method doesn’t call the callback if there is no dom content…, and there is no dom content if no module position is defined… (per UpdateDom not working)

      my module has no dom content, but I need the suspend notification

      i have opened issue 1308

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • S Away
        sdetweil
        last edited by Jun 8, 2018, 11:30 AM

        this fix is now added to the develop branch, and will be merged to master at some time.
        Thanks Mitch

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          1/3
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy