• 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.

Problem with MMM-LocalTemperature using MMM-Lucy

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 2 Posters 2.3k Views 2 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.
  • J Offline
    Johans
    last edited by Nov 2, 2018, 12:59 PM

    Re: Hello-Lucy

    Installed MMM-voice, and MMM-Lucy -> made modifications as you decribed well in the readme file on modules that i’m using but not listed in your list of adapted modules to work with voice.

    Ex MMM-YouLess, MMM-Iframe-Ping, MMM-rain-forecast, MMM-LocalTemperature

    All work fine, except the last one -> MMM-LocalTemperature.
    I can Hide the module , but Show does’t react.

    this the code snippet set in the MMM-LocalTemperature.js file

    		return wrapper;
    	},
    	
    	   /////  Add this function to the modules you want to control with voice //////
    
    	    notificationReceived: function(notification, payload) {
    	        if (notification === 'HIDE_INDOOR') {
    	            this.hide(1000);
    		    this.updateDom(300);
    	        }  else if (notification === 'SHOW_INDOOR') {
    	            this.show(1000);
     		    this.updateDom(300);
    	        }
    	            
    	    },
    
    
    	/**
    	 * The roundNumber function rounds a number to the specified number of decimal places.  
    	 * Use a negative precision value to round to a position left of the decimal.  
    

    Don’t understand reason why HIDE command is working, but SHOW is not.

    Verified MMM-voice.js & node_helper.js and here also is fine.

    @Mykle1 , would be gret if you could look into the code of the MMM-LocalTemperature.
    Could it be because it’s using some C-programming (DHT.c)

    M 1 Reply Last reply Nov 3, 2018, 12:02 AM Reply Quote 0
    • M Offline
      Mykle1 Project Sponsor Module Developer @Johans
      last edited by Nov 3, 2018, 12:02 AM

      @johans

      Your entry looks good

      Check that your entry in the MMM-voice node_helper has

      else if (/(SHOW)/g.test(data) && /(INDOOR)/g.test(data)) {
                  this.sendSocketNotification('SHOW_INDOOR');
              } else if (/(HIDE)/g.test(data) && /(INDOOR)/g.test(data)) {
                  this.sendSocketNotification('HIDE_INDOOR');
              }
      

      and that your entry into the MMM-voice.js file sentences array has

      'HIDE INDOOR',
      'SHOW INDOOR',
      

      and further down in the same file

      // MMM-voice sends notification to MMM-LocalTemperature to HIDE
              else if (notification === 'HIDE_INDDOR') {
                   this.sendNotification('HIDE_INDOOR');
              }
          
              // MMM-voice sends notification to MMM-LocalTemperature to SHOW
              else if (notification === 'SHOW_INDOOR') {
                   this.sendNotification('SHOW_INDOOR');
              }
      

      Create a working config
      How to add modules

      J 1 Reply Last reply Nov 3, 2018, 11:15 AM Reply Quote 0
      • J Offline
        Johans @Mykle1
        last edited by Nov 3, 2018, 11:15 AM

        @mykle1
        Thanks for the information, but every bit of code is exactly as you wrote. So I really can’t understand why all other modules are working fine, except this one.
        First I thought it was because of the word wasn’t recognized.
        So I used words like TEMPERATURE, TEMP, HUMIDITY, en last one INDOOR. All have the same behaviour.
        Module hides, but voice command can’t bring it back on screen. So there must be something in this MMM-LocalTemperature.js file that is blocking it from coming back on screen.

        M 1 Reply Last reply Nov 4, 2018, 12:39 AM Reply Quote 0
        • M Offline
          Mykle1 Project Sponsor Module Developer @Johans
          last edited by Nov 4, 2018, 12:39 AM

          @johans

          I’ve only seen that behavior when I made errors in my changes to the files described above. I can’t test it with that module because I don’t have the sensors necessary to run the module.

          Create a working config
          How to add modules

          J 1 Reply Last reply Nov 4, 2018, 8:43 AM Reply Quote 0
          • J Offline
            Johans @Mykle1
            last edited by Nov 4, 2018, 8:43 AM

            @mykle1
            I understand that you need the proper sensor for making a test. Anyhow for now, I disabled the SHOW & HIDE for this module so it will remain always on screen.
            It isn’t realy a breaking problem. I was just wondering why all other modules are doing fine except this one’s not.
            Thanks man, for your the help & support.

            M 1 Reply Last reply Nov 5, 2018, 1:04 AM Reply Quote 0
            • M Offline
              Mykle1 Project Sponsor Module Developer @Johans
              last edited by Nov 5, 2018, 1:04 AM

              @johans

              If, as you say, you’ve made all the edits correctly, then it is still possible that the temperature module is conflicting in some way. I would try to troubleshoot if I could run that module. Try some things on your own if you feel comfortable doing so.

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                1/6
                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