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 7.0k 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.
    • E Offline
      ELMAGO
      last edited by

      How can I help?

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @ELMAGO
        last edited by sdetweil

        @ELMAGO the module does not provide any special class names that you can override in custom.css.

        this is the only section of the module that does classnames
        creates a row (tr)

        le module ne fournit aucun nom de classe spécial que vous pouvez remplacer dans custom.css.

        c’est la seule section du module qui fait des noms de classe
        crée une ligne (tr)

        			var sensorWrapper = document.createElement("tr"); //on créé la liste principale, qu'on va remplir après
        			----> sensorWrapper.className = "normal";  <----
        
        			//on commence par afficher le symbole, selon tous les cas possible : symbol; symbolon, symboloff, ...
        			var symbolTD = document.createElement('td');
        			-----> symbolTD.className = "symbol align-left"; < -----
        			var symbol = document.createElement('i');
        			var symbolClass = sensor.symboloff;
        			if(sensor.boolean && sensor.status==1) symbolClass = sensor.symbolon;
        
        		        ----> if(typeof sensor.boolean== 'undefined') symbolClass = sensor.symbol;
        			symbol.className = symbolClass; < -----
        			symbolTD.appendChild(symbol);
        			sensorWrapper.appendChild(symbolTD); //et on ajoute le symbole au Wrapper
        

        symbol and whatever the sensor.symbol turns out to be (which is taken directly from the api response data)

        u might be able to change the font/color for the class ‘normal’

        in custom.css

        .MMM-Jeedom .tr .normal {
        color: red;
        }

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        E 1 Reply Last reply Reply Quote 0
        • E Offline
          ELMAGO @sdetweil
          last edited by

          @sdetweil

          Hello

          thank you for your answer, I have the impression that you speak French, I’m wrong?

          What you have provided me is a change of symbol if I understand well, how to do for the color of the font?

          Thanks in advance.

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @ELMAGO
            last edited by

            @ELMAGO i can read some french, I will use an online conversion tool to translate long text and sometimes my responses

            je peux lire du français, j’utiliserai un outil de conversion en ligne pour traduire des textes longs et parfois mes réponses

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            E 1 Reply Last reply Reply Quote 0
            • E Offline
              ELMAGO @sdetweil
              last edited by

              @sdetweil

              okay so i would make the effort, no problem, can answer my previous question?

              E 1 Reply Last reply Reply Quote 0
              • E Offline
                ELMAGO @ELMAGO
                last edited by

                @ELMAGO said in MMM-Jeedom:

                @sdetweil

                okay so i would make the effort, no problem, can answer my previous question?

                Exemple :

                			{
                				idx: "77", 
                				customTitle: "Batterie Etage : ",
                				unit : "%",
                								},
                

                if the result is greater than 50 then I would like it to be in green

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @ELMAGO
                  last edited by

                  @ELMAGO see my prior response

                  le module ne fournit aucun nom de classe spécial que vous pouvez remplacer dans custom.css.

                  c’est la seule section du module qui fait des noms de classe
                  crée une ligne (tr)

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  E 1 Reply Last reply Reply Quote 0
                  • E Offline
                    ELMAGO @sdetweil
                    last edited by

                    @sdetweil

                    I’m sorry, I understood correctly for the css part, but not for the module itself.

                    Could you give me this concrete example?

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      sdetweil @ELMAGO
                      last edited by

                      @ELMAGO i’m not sure I understand the comment, but i’ll try…

                      when the module generates content for the screen, each little piece can have different classes assigned.
                      those classes can be used in the custom.css to manipulate the presentation of that segment.

                      the cod in this modules does

                      create tablerow (tr)
                      assign class = ‘normal’ to everything in the row

                      then it looks at the sensor data

                      			if(sensor.boolean && sensor.status==1) symbolClass = sensor.symbolon;
                      
                      		        ----> if(typeof sensor.boolean== 'undefined') symbolClass = sensor.symbol;
                      			symbol.className = symbolClass; 
                      

                      and assigns a value to the (symbol is the icon )
                      symbol.className

                      and that is all

                      so u have a class for the symbol
                      and a class for the row.

                      I think u want a class for the VALUE on the row but that was not supplied

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      E 1 Reply Last reply Reply Quote 0
                      • E Offline
                        ELMAGO @sdetweil
                        last edited by

                        @sdetweil

                        ok but how can i know it?

                        S 1 Reply Last reply Reply Quote 0
                        • S Offline
                          sdetweil @ELMAGO
                          last edited by

                          @ELMAGO someone would have to change the code to add a class that you could then manipulate

                          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

                            Hello ,

                            I have tried this module (after an intallation of jeedom on rasp4) and i have no results on mirror… my config is certainly false because the result on terminal is good like this
                            curl -H “Content-Type: application/json” -X POST -d ‘{“jsonrpc”: “2.0”, “id”: “1000”, “method”: “cmd::execCmd”, “params”: {“apikey”: “my key”, “id”: 1}}’ http://192.168.1.28/core/api/jeeApi.php | python -m json.tool
                            % Total % Received % Xferd Average Speed Time Time Time Current
                            Dload Upload Total Spent Left Speed
                            100 248 100 123 100 125 1556 1582 --:–:-- --:–:-- --:–:-- 3179
                            {
                            “id”: “1000”,
                            “jsonrpc”: “2.0”,
                            “result”: {
                            “collectDate”: “2019-12-28 10:00:35”,
                            “value”: “A570; A57; Quai Marcel Pagnol Toulon”
                            }
                            }

                            my config is like

                            		{
                            			module: 'MMM-Jeedom',
                            			header: 'Jeedom Maison',
                            			position: "center",
                            			config: {
                            				updateInterval: 3000,
                            			      	jeedomAPIKey: "my key", 
                            				jeedomURL: "192.168.1.28",
                            				jeedomPORT: 443,
                            				jeedomHTTPS: false,
                            				jeedomAPIPath: "/core/api/jeeApi.php",
                            				sensors: [
                            				{
                            					idx: "1", 
                            					customTitle: "Itinéraire1",
                                  				},
                            				],
                             				},
                            		},
                            
                            

                            if you have an idea…thanks

                            S 1 Reply Last reply Reply Quote 0
                            • S Offline
                              sdetweil @chassain 0
                              last edited by sdetweil

                              @chassain-0 said in MMM-Jeedom:

                              http://192.168.1.28/core/api/jeeApi.php

                              	jeedomURL: "192.168.1.28",
                              	jeedomPORT: 443,    // < ---- should be 80 I think, because the url above uses port 80
                              	jeedomHTTPS: false,
                              

                              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

                                hello man,

                                it’s the same result…

                                S 1 Reply Last reply Reply Quote 0
                                • C Offline
                                  chassain 0
                                  last edited by

                                  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 Reply Quote 0
                                  • S Offline
                                    sdetweil @chassain 0
                                    last edited by sdetweil

                                    @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

                                      @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

                                        @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

                                          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

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          Register Login
                                          • 1 / 1
                                          • 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