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

MMM-Jeedom

Scheduled Pinned Locked Moved Unsolved Requests
20 Posts 4 Posters 4.7k Views 4 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.
  • C Offline
    chassain 0
    last edited by Dec 28, 2019, 11:37 AM

    hello man,

    it’s the same result…

    S 1 Reply Last reply Dec 28, 2019, 11:48 AM Reply Quote 0
    • C Offline
      chassain 0
      last edited by Dec 28, 2019, 11:45 AM

      just this with console

      Uncaught ReferenceError: moment is not defined
      at Class.start (MMM-Jeedom.js:39)
      at startModules (loader.js:55)
      at loader.js:40
      at HTMLLinkElement.stylesheet.onload (loader.js:200)

      npm install on vendor done

      S 1 Reply Last reply Dec 28, 2019, 11:52 AM Reply Quote 0
      • S Offline
        sdetweil @chassain 0
        last edited by sdetweil Dec 28, 2019, 11:49 AM Dec 28, 2019, 11:48 AM

        @chassain-0 in your sample above you use

        content-type:
        “Content-Type: application/json”
        but the module uses
        ‘Content-Type’: ‘application/x-www-form-urlencoded’,
        but sends json

        if you start MM using the terminal window,
        npm start
        you should see some error

        
        		  req.on('error', (e) => {
        		  console.log(`problem with request: ${e.message}`);
        			});
        

        also, the code does have a bug…

        if sends the ‘chunk of data’, not the final response

                        var databuffer="";
        		var req = protocol.request(options, (res) => {
        		  res.setEncoding('utf8');   // < --- hm should be ascii for json
        		  res.on('data', (chunk) => {
                               databuffer+=chunk;
        		  });
        		  res.on('end', () => {
        			self.sendSocketNotification("RELOAD_DONE",JSON.parse(databuffer));
        		  });
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @chassain 0
          last edited by sdetweil Dec 28, 2019, 11:53 AM Dec 28, 2019, 11:52 AM

          @chassain-0 said in MMM-Jeedom:

          Uncaught ReferenceError: moment is not defined

          this error is fatal… the module is dead

          add to the MMM-Jeedom.js, the getScripts function below

          	getStyles: function() {
          	    return ['font-awesome.css'];
          	},
                  getScripts: function() {                    //
                      return ["moment.js"]                  //
                  },                                                        //
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • C Offline
            chassain 0
            last edited by Dec 28, 2019, 11:56 AM

            @sdetweil said in MMM-Jeedom:

            getScripts: function() {                    //
                    return ["moment.js"]                  //
                }, 
            

            that’s why i m noob and you…the professor :)

            Perfect !!! thanks

            1 Reply Last reply Reply Quote 0
            • K Offline
              kris1208
              last edited by Apr 6, 2020, 9:46 AM

              Bonjour,
              Le module ne fonctionne plus ??
              J’ai pas d’affichage sur le mirroir.
              Jeedom en V3.3.45
              Merci

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