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-PC-Stats

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    41 Posts 3 Posters 21.3k Views 3 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.
    • Mykle1M Offline
      Mykle1 Project Sponsor Module Developer @justjim1220
      last edited by

      @justjim1220

      I know the line that is the problem. Listen, I’m tired. If you’ll let me TeamViewer into your machine tomorrow I’ll fix it. Doing it this way is very tedious

      Create a working config
      How to add modules

      justjim1220J 2 Replies Last reply Reply Quote 0
      • justjim1220J Offline
        justjim1220 Module Developer @Mykle1
        last edited by

        @mykle1

        Absolutely.
        No Problem.
        Just let me know when.

        "Life's Too Short To Dance With Ugly People"
        Jim Hallock - 1995

        1 Reply Last reply Reply Quote 0
        • justjim1220J Offline
          justjim1220 Module Developer
          last edited by

          is there something I need to set up on this end for TeamViewer?

          "Life's Too Short To Dance With Ugly People"
          Jim Hallock - 1995

          1 Reply Last reply Reply Quote 0
          • justjim1220J Offline
            justjim1220 Module Developer @Mykle1
            last edited by

            @mykle1

            And, your gonna have to let me know how to do a screen shot of just a certain part of the screen, or how to crop the image. A lot different than Windows.

            "Life's Too Short To Dance With Ugly People"
            Jim Hallock - 1995

            Mykle1M 1 Reply Last reply Reply Quote 0
            • Mykle1M Offline
              Mykle1 Project Sponsor Module Developer @justjim1220
              last edited by

              @justjim1220

              This is what you need to change in the main js

              		// Check if core0 has temp sensor
                      var core0TempCheck = Sensors["acpitz-virtual-0"]; // ['ISA adapter']['Core 0'];
              		if (typeof core0TempCheck !== 'undefined'){
              
                      var core0Temp = document.createElement("div");
                      core0Temp.classList.add("small", "bright", "core0Temp");
                      core0Temp.innerHTML = Sensors["acpitz-virtual-0"]["Virtual device"].temp1.value + " &nbsp  @  &nbsp "
              						    + Sensors["acpitz-virtual-0"]["Virtual device"].temp1.value + "°C";
                      wrapper.appendChild(core0Temp);
                      }
              
                      // ["acpitz-virtual-0"]["Virtual device"].temp1.value
              
              
              		// Check if core1 has temp sensor
                      var core1TempCheck = Sensors["acpitz-virtual-0"]; // ['ISA adapter']['Core 1'];
              		if (typeof core1TempCheck !== 'undefined'){
              
                      var core1Temp = document.createElement("div");
                      core1Temp.classList.add("small", "bright", "core1Temp");
                      core1Temp.innerHTML = Sensors["acpitz-virtual-0"]["Virtual device"].temp2.value + " &nbsp  @  &nbsp "
              						    + Sensors["acpitz-virtual-0"]["Virtual device"].temp2.value + "°C";
                      wrapper.appendChild(core1Temp);
                      }
              

              Create a working config
              How to add modules

              justjim1220J 1 Reply Last reply Reply Quote 0
              • Mykle1M Offline
                Mykle1 Project Sponsor Module Developer
                last edited by

                Now leave me alone. I’m going to bed. :-)

                Create a working config
                How to add modules

                justjim1220J 4 Replies Last reply Reply Quote 0
                • justjim1220J Offline
                  justjim1220 Module Developer @Mykle1
                  last edited by

                  @mykle1 ok

                  "Life's Too Short To Dance With Ugly People"
                  Jim Hallock - 1995

                  1 Reply Last reply Reply Quote 0
                  • justjim1220J Offline
                    justjim1220 Module Developer @Mykle1
                    last edited by

                    @mykle1 YES SIR!!!

                    "Life's Too Short To Dance With Ugly People"
                    Jim Hallock - 1995

                    1 Reply Last reply Reply Quote 0
                    • justjim1220J Offline
                      justjim1220 Module Developer @Mykle1
                      last edited by

                      @mykle1

                      This is what I ended up with:

                      for (var i = 0, len = Stats.cpu.threads.length; i < len; i++) {
                      
                      		var Element = document.createElement("div");
                      		Element.classList.add("large", "bright", "usage");
                      		Element.innerHTML = Stats.cpu.threads[i].name + " &nbsp  @  &nbsp " + Number(Math.round(Stats.cpu.threads[i].usage+"e2")+"e-2") + "%";
                      		wrapper.appendChild(Element);
                      
                      
                      
                      		// ["acpitz-virtual-0"]["Virtual device"].temp1.value
                      
                      		// Check if core0 has temp sensor
                      		var core0TempCheck = Sensors["acpitz-virtual-0"]["Virtual device"];
                      			if (typeof core0TempCheck !== 'undefined'){
                      			// core0Temp
                      			var core0Temp = document.createElement("div");
                      			core0Temp.classList.add("large", "bright", "core0Temp");
                      			core0Temp.innerHTML = Stats.cpu.threads[i].name + " &nbsp  @  &nbsp " + Sensors["acpitz-virtual-0"]["Virtual device"].temp1.value + "°C";
                      			wrapper.appendChild(core0Temp);
                      		}
                      	}
                      

                      this is the output:
                      0_1540410083724_Screenshot from 2018-10-24 13-45-54.png

                      "Life's Too Short To Dance With Ugly People"
                      Jim Hallock - 1995

                      1 Reply Last reply Reply Quote 0
                      • justjim1220J Offline
                        justjim1220 Module Developer @Mykle1
                        last edited by justjim1220

                        @mykle1

                        So, when I use the code you sent last night, It gives error regarding .temp2.value

                        being that the ‘Virtual device’ only has 1 output value.

                        My changes will always show the ‘temp value’ as the same for all CPU’s

                        When I run ‘sensors’ in MM, it showed a ‘Core0 Temp’ and a ‘Core1 Temp’, It actually showed 2 temps for each one.

                        jim@jim-Aspire-4520:~/MagicMirror$ sensors
                        k8temp-pci-00c3
                        Adapter: PCI adapter
                        Core0 Temp:   +69.0°C  
                        Core0 Temp:   +67.0°C  
                        Core1 Temp:   +69.0°C  
                        Core1 Temp:   +68.0°C  
                        
                        acpitz-virtual-0
                        Adapter: Virtual device
                        temp1:        +71.0°C  (crit = +100.0°C)
                        
                        nouveau-pci-0090
                        Adapter: PCI adapter
                        GPU core:     +1.20 V  (min =  +1.00 V, max =  +1.20 V)
                        temp1:        +64.0°C  (high = +95.0°C, hyst =  +3.0°C)
                                               (crit = +105.0°C, hyst =  +2.0°C)
                                               (emerg = +135.0°C, hyst =  +5.0°C)
                        

                        With this being a Dual Core CPU, why can’t I get it to use the ‘PCI adapter’ to give the output?

                        "Life's Too Short To Dance With Ugly People"
                        Jim Hallock - 1995

                        1 Reply Last reply Reply Quote 0
                        • justjim1220J Offline
                          justjim1220 Module Developer @Mykle1
                          last edited by

                          @mykle1

                          Another question…

                          How can be changed to show F°?

                          Not really a big deal, mostly just curious… :upside-down_face:

                          "Life's Too Short To Dance With Ugly People"
                          Jim Hallock - 1995

                          yawnsY 1 Reply Last reply Reply Quote 0
                          • yawnsY Offline
                            yawns Moderator @justjim1220
                            last edited by yawns

                            @justjim1220 said in MMM-PC-Stats:

                            @mykle1

                            Another question…

                            How can be changed to show F°?

                            Not really a big deal, mostly just curious… :upside-down_face:

                            Just run sensors -f, at least this is working in debian, so I guess it should work in raspbian too

                            Or, if you just want to convert Celcius to Fahrenheit, add some code to Mykles module like this temp = ((temp/5)*9)+32 ;)
                            But then again, you could add a config option to toggle between Fahrenheit and Celsius and submit a pull request

                            1 Reply Last reply Reply Quote 2

                            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
                            • 2 / 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