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-Hoymiles-Wifi

    Scheduled Pinned Locked Moved Development
    58 Posts 6 Posters 5.4k Views 5 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
      Jose1701 @evroom
      last edited by

      @evroom

      Great job! It could work for me. Unfortunately it’s dark outside but I can see the gauge on my mirror.

      I don’t even dare to ask, but do you have a hint how about resizing it? I tried it with width and height but it won’t work.

       {
          module: "MMM-HoymilesPVMonitor",
          disabled: false,
          header: "PV Monitor",
          position: "top_left",
          width: "100px",
          height: "105px",
          config: {
            dtuIp: "192.168.178.150",        // IP address of your Hoymiles DTU
            maxPower: 800,                  // Maximum system power in watts
            updateInterval: 5 * 60 * 1000   // Update interval in milliseconds (default: 5 minutes)
          }
        },
      
      

      Many thanks and kind regards

      Florian

      S evroomE 2 Replies Last reply Reply Quote 0
      • S Offline
        sdetweil @Jose1701
        last edited by

        @Jose1701 said in MMM-Hoymiles-Wifi:

        width: "100px",
        height: "105px",
        

        those are outside the config:{} section, that means they are for the MM runtime…
        but we don’t process width/height

        if you want to do this you need to learn to use css(cascading style sheet) to customize the html presentation
        ALL updated css goes in css/custom.css

        a css entry in custom.css is

        selector_clause {
           styles to apply to elements selected by the selector clause
        }
        

        we add the modulename as a class to the web content so that one can ‘select’ only for that module

        key selector clause elements
        starts with . means element has classname=xxx
        starts with # means element has id=xxxx
        does not start with either, means html element name, div, span, p, h1, img…

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          Jose1701 @sdetweil
          last edited by

          @sdetweil

          Alright, I will try to get some info in the internet. Never done sth with css.

          Thanks

          S 2 Replies Last reply Reply Quote 0
          • S Offline
            sdetweil @Jose1701
            last edited by

            @Jose1701 I understand , the browser provides a developer environment with different capabilities

            logger
            code execution
            and elements viewer, css tester env

            see the second link in my signature below for a starter course on the elements tab.

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • evroomE Offline
              evroom @Jose1701
              last edited by evroom

              @Jose1701

              No, sorry, no idea.
              What Sam says, but that needs knowledge.
              But I opened an issue/request, so let’s see if it will be granted:
              https://github.com/CuddlyCow/MMM-HoymilesPVMonitor/issues

              MagicMirror version: 2.33.0
              Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
              Raspbian GNU/Linux 12 (bookworm)

              Test environment:
              MagicMirror version: v2.31.0
              Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
              Raspbian GNU/Linux 12 (bookworm)

              J 1 Reply Last reply Reply Quote 0
              • J Offline
                Jose1701 @evroom
                last edited by

                @evroom

                ok. Thank you for your patience and help.

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

                  @Jose1701 also. Sometimes the author documents it on the readme, sometimes the author provides their own css you can override w custom.css entries

                  Sometimes it’s all grunt work….

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    Jose1701
                    last edited by

                    I spent a bit of time an got the following to work by using help of a friend.
                    I wrote the following in the css:

                    
                    /* custom.css */
                    
                    /* Passt die Gesamtbreite des gesamten Moduls an */
                    .MMM-HoymilesPVMonitor {
                        /* Beispiel: Setzt die maximale Breite des gesamten Moduls auf 200 Pixel */
                        max-width: 200px; 
                        /* Stellt sicher, dass das Modul zentriert bleibt, falls es kleiner als die Spalte ist */
                        margin-left: auto;
                        margin-right: auto;
                    }
                    
                    /* 
                      Passt den inneren Container an, der das Canvas-Diagramm enthält.
                      Dies überschreibt die 95% Breite, die im JS definiert wurde.
                    */
                    .MMM-HoymilesPVMonitor div:first-child {
                        /* 
                          Setzt die Breite des Containers auf 100% der oben definierten max-width (z.B. 200px).
                          Sie können hier auch absolute Werte (z.B. 180px) verwenden, 
                          aber 100% ist am flexibelsten.
                        */
                        width: 100% !important; 
                    }
                    
                    

                    Now it is smaller, nevertheless I can’t get it much more smaller because the gauge will disappear then.

                    (It’s not displayed correctly in the screenshot, but it is on my mirror.)

                    Screenshot 2025-11-07 102555.jpg

                    1 Reply Last reply Reply Quote 0
                    • 1
                    • 2
                    • 3
                    • 4
                    • 5
                    • 6
                    • 6 / 6
                    • 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