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.

    JSON request module

    Scheduled Pinned Locked Moved Solved Requests
    41 Posts 3 Posters 15.9k 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 @wishmaster270
      last edited by

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • E Offline
        ELMAGO @wishmaster270
        last edited by

        @wishmaster270 said in JSON request module:

        valueTitle

        I’m really sorry but I’m really bad at this.

        I did this:
        config:

        //TEMPERATURE MAISON
        
        {
           module: "MMM-CommandToNotification",
           disabled: false,
           config: {
            updateInterval: 60,
            commands: [
             {
              script: "/usr/bin/curl",
              args: "-s  http://192.168.100.244:3000/TEMPSALLE",
              timeout: 5000,
              notifications: [
               "TEMPSALLE",
               ],
             },
        
             {
                   script: "/usr/bin/curl",
                   args: "-s  http://192.168.100.244:3000/TEMPBUREAU",
                   timeout: 5000,
                   notifications: [
                    "TEMPBUREAU",
                    ],
                  },
             ]
           },
          },
        
        // AFFICHAGE
        
        {
        		module: "MMM-ValuesByNotification",
        		position: "top_left",
        		header: "TEMPERATURE MAISON",
        		config: {
        			updateInterval: 10,
        			reuseCount: 100,
        			addClassesRecursive: true,
        			groups: [
        				{
        					items: [
        						{
        							notification: "TEMPSALLE",
        							itemTitle: "Salle: ",
        							classes: "withIcons",
        							values: [
        								{
        									valueIcon: "fa fa-thermometer-full",
        									valueUnit: "°C",
        									valueFormat: "Number(${value}).toFixed(2)",
        									jsonpath: "data",
        								},
        {
        									valueUnit: "%rH",
        									valueFormat: "Number(${value}).toFixed(1)",
        									jsonpath: "humidity",
        								},
        							]
        						},
        						{
        							notification: "TEMPBUREAU",
        							itemTitle: "Bureau ",
        							values: [
        								{
        									valueUnit: "°CC",
        									valueFormat: "Number(${value}).toFixed(2)",
        									jsonpath: "data",
        								},
        {
        									valueUnit: "%rH",
        									valueFormat: "Number(${value}).toFixed(1)",
        									jsonpath: "humidity",
        								},
        							]
        						},
        					]
        				},
        			]
        		},
        	},
        
        

        And use css :

        .MMM-ValuesByNotification .vbn .itemWrapper {
          flex-direction: row;
        }
        
        .MMM-ValuesByNotification .vbn .itemTitle {
          min-width: 105px;
          text-decoration: none;
        }
        
        .MMM-ValuesByNotification .vbn .itemTitle.withIcons {
          margin-top: 17px;
        }
        
        .MMM-ValuesByNotification .vbn .itemWrapper.withIcons {
          line-height: 22px;
        }
        
        .MMM-ValuesByNotification .vbn .itemWrapper:not(.withIcons) {
          line-height: 10px;
        }
        

        and nothing is displayed

        wishmaster270W 1 Reply Last reply Reply Quote 0
        • wishmaster270W Offline
          wishmaster270 Module Developer @ELMAGO
          last edited by

          @ELMAGO
          Great to see the data beeing displayed. We get the styling, too.
          Please do not edit files in the module folder. You can modify/override all css in the custom.css file in the css directory of MagicMirror.
          The examples only overrides the things needed.
          Currently I only have my mobile and can not test any things. Maybe I can look at it tomorrow.

          E 2 Replies Last reply Reply Quote 0
          • E Offline
            ELMAGO @wishmaster270
            last edited by

            @wishmaster270
            The custom file?

            there is no problem, you help me already it is a lot.

            There is nothing urgent, I just have this display to do on a whole home automation installation.

            I await your return and thank you again.

            S 1 Reply Last reply Reply Quote 0
            • S Do not disturb
              sdetweil @ELMAGO
              last edited by sdetweil

              @ELMAGO the CSS design is a stack, top down

              css/custom.css
              module_provided_css (in the module folder)
              css/main.css (provided by MM).

              so a search for a css setting starts with custom.css and stops at the 1st occurrence.

              Sam

              How to add modules

              learning how to use browser developers window for css changes

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

                @wishmaster270 @sdetweil

                I correct myself, it is displayed but thus, having created the custom.css file in css:

                c70503d5-7fdd-4bcf-aff4-0be3fdc8537d-image.png

                08393d06-6cfc-4d4b-a59a-d588f2c700cd-image.png

                Here is my config file:

                // AFFICHAGE
                
                {
                		module: "MMM-ValuesByNotification",
                		position: "top_right",
                		header: "TEMPERATURE MAISON",
                		config: {
                			updateInterval: 10,
                			reuseCount: 100,
                			addClassesRecursive: true,
                			groups: [
                				{
                					items: [
                						{
                							notification: "TEMPSALLE",
                							itemTitle: "Salle  ",
                							classes: "withIcons",
                							values: [
                								{
                									valueUnit: " °C",
                									valueFormat: "Number(${value}).toFixed(2)",
                									jsonpath: "data",
                								},
                							]
                						},
                						{
                							notification: "TEMPBUREAU",
                							itemTitle: "Bureau  ",
                							values: [
                								{
                									valueUnit: " °C",
                									valueFormat: "Number(${value}).toFixed(2)",
                									jsonpath: "data",
                								},
                							]
                						},
                					]
                				},
                			]
                		},
                	},
                
                
                wishmaster270W 1 Reply Last reply Reply Quote 0
                • wishmaster270W Offline
                  wishmaster270 Module Developer @ELMAGO
                  last edited by

                  @ELMAGO
                  Today, with my notebook ready things are getting easier.
                  I styled the module like the example you provided…
                  example.png

                  Let’s look at the steps to do this now:

                  First we tell the itemWrapper? to display the items in rows and not columns and set the line height to the regular value 1.0` to avoid a great space in between:

                  .MMM-ValuesByNotification .vbn .itemWrapper {
                    flex-direction: row;
                    line-height: 1.0;
                  }
                  

                  Next we tell the itemsWrapper to set a small space of 5px between the rows:

                  .MMM-ValuesByNotification .vbn .itemsWrapper:first-child,
                  .MMM-ValuesByNotification .vbn .itemsWrapper
                  {
                    gap: 5px;
                  }
                  

                  We then remove some margins of the title if items, remove the underlining and set the min-with to 60px to get a straight lining of the values:

                  .MMM-ValuesByNotification .vbn .itemTitle {
                    margin-top: 0px;
                    margin-bottom: 0px;
                    min-width: 60px;
                    text-decoration: unset;
                    color: white;
                  }
                  

                  If you do not like the gray border around the items you can remove it with:

                  .MMM-ValuesByNotification .vbn .groupWrapper {
                    border-style: none;
                  }
                  

                  If you copy all these contents to the MagicMirror/css/custom.css file and restore the original valuesByNotification.css you should the style of above.

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

                    @wishmaster270
                    good evening
                    thank you for your return, for the config file I put back yours or mine is good? I would test this tomorrow morning, tonight it’s rugby.
                    good evening and thank you again

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

                      @ELMAGO

                      Good evening,

                      I couldn’t wait…it’s almost great, I just have to find how to align the text on the left and the temperatures on the right.

                      04655c32-b4d0-4180-a5f4-9724b5cc27f0-image.png

                      Thank you very much for your help

                      wishmaster270W 1 Reply Last reply Reply Quote 0
                      • wishmaster270W Offline
                        wishmaster270 Module Developer @ELMAGO
                        last edited by

                        @ELMAGO
                        Do you mean something like this…
                        example.png

                        We first define a width for the most outer wrapper. I choose 200px but can adjust it to the value you want:

                        .MMM-ValuesByNotification .vbn .groupsWrapper{
                          width: 200px;
                        }
                        

                        Then we configure the next two deeper wrappers to expand to the maximum width:

                        .MMM-ValuesByNotification .vbn .groupWrapper,
                        .MMM-ValuesByNotification .vbn .itemsWrapper {
                          width: 100%;
                        }
                        

                        And we tell the itemWrapper to expand to maximum width and justify its content by putting space around the items equally:

                        .MMM-ValuesByNotification .vbn .itemWrapper {
                          flex-direction: row;
                          line-height: 1.0;
                          width: 100%;
                          justify-content: space-between;
                        }
                        

                        The rest stays the same as before:

                        .MMM-ValuesByNotification .vbn .itemTitle {
                          margin-top: 0px;
                          margin-bottom: 0px;
                          min-width: 60px;
                          text-decoration: unset;
                          color: white;
                        }
                        
                        .MMM-ValuesByNotification .vbn .groupWrapper {
                          border-style: none;
                        }
                        
                        E 2 Replies Last reply Reply Quote 0
                        • E Offline
                          ELMAGO @wishmaster270
                          last edited by

                          @wishmaster270

                          Re Goodnight

                          It’s awesome, it’s exactly what I wanted.

                          Thank you so much.

                          b3cb1a61-c845-4689-91a3-53944fca4ee8-image.png

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

                            @wishmaster270

                            Hello

                            sorry to bother you again but is it possible to display an answer following the answer of the request.

                            example :
                            The JSON request returns false I would like to display “NON”

                            wishmaster270W 1 Reply Last reply Reply Quote 0
                            • wishmaster270W Offline
                              wishmaster270 Module Developer @ELMAGO
                              last edited by

                              @ELMAGO Sorry, but i do not understand exactly what you mean. You can override the “na” value which is the one displayed if no value could be parsed in the JSON.

                              The config option is:

                              naValue: "NON"
                              

                              There might also be a chance to do add a valueFormat which checks for the “false” value in the JSON but that would be a little more complex and i need to know the exact format of the output.

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

                                @wishmaster270
                                Hello

                                No, not al all.
                                the returned value will be “false” or “true” and I would like to replace it with “Non” or “Oui” in French.

                                wishmaster270W 1 Reply Last reply Reply Quote 0
                                • wishmaster270W Offline
                                  wishmaster270 Module Developer @ELMAGO
                                  last edited by

                                  @ELMAGO
                                  You can use valueFormat for this purpose.

                                  valueFormat: "\"${value}\".replace(\"false\",\"Non\").replace(\"true\",\"Oui\")",
                                  

                                  This will convert the value to a string (if needed) and replaces all “false” with “Non” and “true” with “Oui”.

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

                                    @wishmaster270

                                    great, thank you.
                                    Is there a “lexicon” with these commands?

                                    wishmaster270W 1 Reply Last reply Reply Quote 0
                                    • wishmaster270W Offline
                                      wishmaster270 Module Developer @ELMAGO
                                      last edited by

                                      @ELMAGO
                                      I added some to the [documentation] (https://github.com/Tom-Hirschberger/MMM-ValuesByNotification/blob/main/doc/value.md) of the module.
                                      As there can be used any build-in JavaScript function in valueFormat there are nearly endless possibilities.

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

                                        @wishmaster270

                                        good evening,

                                        I tested the replace function:

                                        {
                                        		module: "MMM-ValuesByNotification",
                                        		position: "top_right",
                                        		header: "INFORMATION MÉGANE",
                                        		config: {
                                        			updateInterval: 300,
                                        			reuseCount: 100,
                                        			addClassesRecursive: true,
                                        			valueFormat: "\"${value}\".replace(\"false\",\"Non\").replace(\"true\",\"Oui\")",
                                        			groups: [
                                        				{
                                        					items: [
                                        						
                                        						{
                                        							notification: "AUTBATTMEGANE",
                                        							itemTitle: "Autonomie  ",
                                        							values: [
                                        								{
                                        									valueUnit: " Km",
                                        									valueFormat: "Number(${value}).toFixed(2)",
                                        									jsonpath: "data",
                                        								},
                                        							]
                                        						},
                                        						{
                                        							notification: "BATTMEGANE",
                                        							itemTitle: "Charge batterie  ",
                                        							values: [
                                        								{
                                        									valueUnit: " %",
                                        									valueFormat: "Number(${value}).toFixed(2)",
                                        									jsonpath: "data",
                                        								},
                                        							]
                                        						},
                                        						{
                                        							notification: "PLUGMEGANE",
                                        							itemTitle: "Voirture branchée ",
                                        							classes: "withIcons",
                                        							valueFormat: "\"${value}\".replace(\"false\",\"Non\").replace(\"true\",\"Oui\")",
                                        							values: [
                                        								{
                                        									
                                        									valueFormat: "Number(${value}).toFixed(2)",
                                        									jsonpath: "data",
                                        								},
                                        							]
                                        						},
                                        						
                                        					]
                                        				},
                                        			]
                                        		},
                                        	},
                                        
                                        
                                        

                                        But unfortunately it doesn’t work.

                                        504f3bb6-cb32-49fa-97b6-c872e2b1aa31-image.png

                                        Would you know why?

                                        Thanks

                                        wishmaster270W 1 Reply Last reply Reply Quote 0
                                        • wishmaster270W Offline
                                          wishmaster270 Module Developer @ELMAGO
                                          last edited by

                                          @ELMAGO As valueFormat settings further down in the hierarchy override setting further up you only have to much valueFormat settings.

                                          This config should do the trick:

                                          	{
                                          		module: "MMM-ValuesByNotification",
                                          		position: "top_right",
                                          		header: "INFORMATION MÉGANE",
                                          		config: {
                                          			updateInterval: 300,
                                          			reuseCount: 100,
                                          			addClassesRecursive: true,
                                          			groups: [
                                          				{
                                          					items: [
                                          						
                                          						{
                                          							notification: "AUTBATTMEGANE",
                                          							itemTitle: "Autonomie  ",
                                          							values: [
                                          								{
                                          									valueUnit: " Km",
                                          									valueFormat: "Number(${value}).toFixed(2)",
                                          									jsonpath: "data",
                                          								},
                                          							]
                                          						},
                                          						{
                                          							notification: "BATTMEGANE",
                                          							itemTitle: "Charge batterie  ",
                                          							values: [
                                          								{
                                          									valueUnit: " %",
                                          									valueFormat: "Number(${value}).toFixed(2)",
                                          									jsonpath: "data",
                                          								},
                                          							]
                                          						},
                                          						{
                                          							notification: "PLUGMEGANE",
                                          							itemTitle: "Voirture branchée ",
                                          							classes: "withIcons",
                                          							values: [
                                          								{
                                          									valueFormat: "\"${value}\".replace(\"false\",\"Non\").replace(\"true\",\"Oui\")",
                                          									jsonpath: "data",
                                          								},
                                          							]
                                          						},
                                          						
                                          					]
                                          				},
                                          			]
                                          		},
                                          	},
                                          
                                          1 Reply Last reply Reply Quote 0
                                          • E Offline
                                            ELMAGO
                                            last edited by

                                            Hi @wishmaster270

                                            I come back here, it will be simpler.

                                            My code is:

                                            //INFORMATION HOMEY EUFY
                                            
                                            {
                                               module: "MMM-CommandToNotification",
                                               disabled: false,
                                               config: {
                                                updateInterval: 300,
                                                commands: [
                                                 
                                            
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/ETATEUFY",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "ETATEUFY",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/CAMSALLE",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "CAMSALLE",
                                                        ],
                                                      },
                                            
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/CAMPALIER",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "CAMPALIER",
                                                        ],
                                                      },
                                            
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/CAMARRIERE",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "CAMARRIERE",
                                                        ],
                                                      },
                                            
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/CAMGARAGE",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "CAMGARAGE",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/CAMGAUCHE",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "CAMGAUCHE",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/CAMAVANT",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "CAMAVANT",
                                                        ],
                                                      },
                                            {
                                                  script: "/usr/bin/curl",
                                                  args: "-s  http://192.168.100.244:3000/TEMPSALLE",
                                                  timeout: 1000,
                                                  notifications: [
                                                   "TEMPSALLE",
                                                   ],
                                                 },
                                            
                                                 {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/TEMPBUREAU",
                                                       timeout: 1000,
                                                       notifications: [
                                                        "TEMPBUREAU",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/TEMPCHELENA",
                                                       timeout: 1000,
                                                       notifications: [
                                                        "TEMPCHELENA",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/TEMPCHLOUCA",
                                                       timeout: 1000,
                                                       notifications: [
                                                        "TEMPCHLOUCA",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/TEMPCHALAN",
                                                       timeout: 1000,
                                                       notifications: [
                                                        "TEMPCHALAN",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/TEMPCHPARENT",
                                                       timeout: 1000,
                                                       notifications: [
                                                        "TEMPCHPARENT",
                                                        ],
                                                      },
                                            {
                                                  	script: "/usr/bin/curl",
                                                  	args: "-s  http://192.168.100.244:3000/AUTBATTMEGANE",
                                                  	timeout: 1000,
                                                  	notifications: [
                                                   	"AUTBATTMEGANE",
                                                   	  ],
                                                 		},
                                            
                                                 {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/BATTMEGANE",
                                                       timeout: 1000,
                                                       notifications: [
                                                        "BATTMEGANE",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/PLUGMEGANE",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "PLUGMEGANE",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/CHARGEMEGANE",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "CHARGEMEGANE",
                                                        ],
                                                      },
                                            
                                                 ]
                                               },
                                              },
                                            

                                            So I think it launches all requests at the same time, because my server which must answer crashes.

                                            I wanted to split it like this:

                                            //INFORMATION HOMEY EUFY
                                            
                                            {
                                               module: "MMM-CommandToNotification",
                                               disabled: false,
                                               config: {
                                                updateInterval: 300,
                                                commands: [
                                                 
                                            
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/ETATEUFY",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "ETATEUFY",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/CAMSALLE",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "CAMSALLE",
                                                        ],
                                                      },
                                            
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/CAMPALIER",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "CAMPALIER",
                                                        ],
                                                      },
                                            
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/CAMARRIERE",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "CAMARRIERE",
                                                        ],
                                                      },
                                            
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/CAMGARAGE",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "CAMGARAGE",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/CAMGAUCHE",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "CAMGAUCHE",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/CAMAVANT",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "CAMAVANT",
                                                        ],
                                                      },
                                                 ]
                                               },
                                              },
                                            
                                            
                                            

                                            and

                                            //INFORMATION HOMEY EUFY
                                            
                                            {
                                               module: "MMM-CommandToNotification",
                                               disabled: false,
                                               config: {
                                                updateInterval: 300,
                                                commands: [
                                                 
                                            
                                            
                                            {
                                                  script: "/usr/bin/curl",
                                                  args: "-s  http://192.168.100.244:3000/TEMPSALLE",
                                                  timeout: 1000,
                                                  notifications: [
                                                   "TEMPSALLE",
                                                   ],
                                                 },
                                            
                                                 {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/TEMPBUREAU",
                                                       timeout: 1000,
                                                       notifications: [
                                                        "TEMPBUREAU",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/TEMPCHELENA",
                                                       timeout: 1000,
                                                       notifications: [
                                                        "TEMPCHELENA",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/TEMPCHLOUCA",
                                                       timeout: 1000,
                                                       notifications: [
                                                        "TEMPCHLOUCA",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/TEMPCHALAN",
                                                       timeout: 1000,
                                                       notifications: [
                                                        "TEMPCHALAN",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/TEMPCHPARENT",
                                                       timeout: 1000,
                                                       notifications: [
                                                        "TEMPCHPARENT",
                                                        ],
                                                      },
                                            
                                            
                                                 ]
                                               },
                                              },
                                            
                                            
                                            

                                            and :

                                            //INFORMATION HOMEY EUFY
                                            
                                            {
                                               module: "MMM-CommandToNotification",
                                               disabled: false,
                                               config: {
                                                updateInterval: 300,
                                                commands: [
                                                 
                                            
                                            
                                            
                                            {
                                                  	script: "/usr/bin/curl",
                                                  	args: "-s  http://192.168.100.244:3000/AUTBATTMEGANE",
                                                  	timeout: 1000,
                                                  	notifications: [
                                                   	"AUTBATTMEGANE",
                                                   	  ],
                                                 		},
                                            
                                                 {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/BATTMEGANE",
                                                       timeout: 1000,
                                                       notifications: [
                                                        "BATTMEGANE",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/PLUGMEGANE",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "PLUGMEGANE",
                                                        ],
                                                      },
                                            {
                                                       script: "/usr/bin/curl",
                                                       args: "-s  http://192.168.100.244:3000/CHARGEMEGANE",
                                                       timeout: 1000,
                                            			
                                                       notifications: [
                                                        "CHARGEMEGANE",
                                                        ],
                                                      },
                                            
                                                 ]
                                               },
                                              },
                                            
                                            
                                            

                                            But it doesn’t work, only the last element appears.

                                            wishmaster270W 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
                                            • 2
                                            • 3
                                            • 1 / 3
                                            • 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