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 10.1k 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.
    • S Offline
      SuVo @schris88
      last edited by

      @schris88 dfg
      Hi,
      I am using
      HMS-800W-2T
      I have done your installation steps but there is no output on my MagicMirror.
      The source http://127.0.0.1:5000 is correct?
      What can I try?
      Have you any idea what could be wrong?

      evroomE 2 Replies Last reply Reply Quote 0
      • evroomE Offline
        evroom @SuVo
        last edited by

        @SuVo said in MMM-Hoymiles-Wifi:

        What can I try?
        Have you any idea what could be wrong?

        You have to edit
        ~/MagicMirror/modules/MMM-Hoymiles-Wifi/hoymiles_data.py
        Change this line to the address of your DTU:
        dtu = DTU("192.168.178.114")

        And I had to change

         width: "288px",
         height: "360px",
        

        in the ~/MagicMirror/config/config.js file.

        This is my config:

        {
          module: "MMM-Hoymiles-Wifi",
          header: "MMM-Hoymiles-Wifi",
          disabled: false,
          position: "top_left",
          config: {
            width: "288px",
            height: "360px",
            updateInterval: 60000, // in milli seconds
            frames : [
              { src: 'http://127.0.0.1:5000' },
            ]
          },
        },
        

        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.33.0
        Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
        Raspbian GNU/Linux 12 (bookworm)

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

          Just FYI.

          I am currently busy making some changes to the module.
          As there is no sunshine due to the current weather conditions, it is a bit difficult to have real measurements.
          Trying to add a test using a JSON dataset.
          Hope to be able to present it a.s.a.p.

          E.J.

          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.33.0
          Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
          Raspbian GNU/Linux 12 (bookworm)

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

            @evroom said in MMM-Hoymiles-Wifi:

            ~/MagicMirror/modules/MMM-Hoymiles-Wifi/hoymiles_data.py
            Change this line to the address of your DTU:
            dtu = DTU(“192.168.178.114”)

            sounds like a new config parm so you don’t have to edit the file
            (pass as a parameter on /hoymiles_data.py start)

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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

              @sdetweil said in MMM-Hoymiles-Wifi:

              sounds like a new config parm so you don’t have to edit the file
              (pass as a parameter on /hoymiles_data.py start)

              Exactly!

              I did change hoymiles_data.py to be able to refrain from hard-coding it:
              python hoymiles_data.py --dtu_ip_address 192.168.178.114--debug
              The next thing would be to pass the parameter(s) from the configuration (to be coded in the MMM-Hoymiles-Wifi.js file).

              As I never made a module myself, I would need to find out how.

              Any suggestions are much appreciated!

              E.J.

              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.33.0
              Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
              Raspbian GNU/Linux 12 (bookworm)

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

                @evroom put it in the modulename.js defaults section
                i bet the config is already passed to the node helper which execs the python script.
                yep

                  this.sendSocketNotification("INIT", this.config)
                

                then the user adds the property to the config.js module entry, as they are editing it anyhow

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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

                  @SuVo

                  Hi, question,

                  do you live somewhere sunny ?

                  Could you try the run this and share the output ?

                  hoymiles-wifi --host 192.168.178.114 get-real-data-new

                  You’ll need to change the IP to the IP of your DTU.

                  E.J.

                  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.33.0
                  Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                  Raspbian GNU/Linux 12 (bookworm)

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

                    @sdetweil said in MMM-Hoymiles-Wifi:

                    i bet the config is already passed to the node helper which execs the python script.

                    Actually the python script is being executed via a shell script (in order to make it running using pm2).
                    I do not see anything in the node_helper.js file.

                    This is mainly due to the fact that the developer of the module used MMM-HTMLSnippet as basis and concentrated more on the data that he wanted to display.

                    The challenge is now to have everything running inside the module, without this ‘external’ stuff.
                    As all modules tend to do.

                    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.33.0
                    Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                    Raspbian GNU/Linux 12 (bookworm)

                    S S 2 Replies Last reply Reply Quote 1
                    • S Do not disturb
                      sdetweil @evroom
                      last edited by sdetweil

                      @evroom see my pythonPrint module for how to execute a python script

                      https://github.com/sdetweil/MMM-PythonPrint
                      you can also exec a shell script too

                      and launch pm2 to start/stop that shell script

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 1
                      • S Offline
                        schris88 @evroom
                        last edited by

                        @evroom said in MMM-Hoymiles-Wifi:

                        @sdetweil said in MMM-Hoymiles-Wifi:

                        i bet the config is already passed to the node helper which execs the python script.

                        Actually the python script is being executed via a shell script (in order to make it running using pm2).
                        I do not see anything in the node_helper.js file.

                        This is mainly due to the fact that the developer of the module used MMM-HTMLSnippet as basis and concentrated more on the data that he wanted to display.

                        The challenge is now to have everything running inside the module, without this ‘external’ stuff.
                        As all modules tend to do.

                        This is true, it´s a hacked proof of concept, nothing to be proud of at the moment :D

                        Not sure how much time I have for it till end of year, I can grant write access to anyone who´s willing to help.

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

                          @schris88 said in MMM-Hoymiles-Wifi:

                          This is true, it´s a hacked proof of concept, nothing to be proud of at the moment :D

                          Not sure how much time I have for it till end of year, I can grant write access to anyone who´s willing to help.

                          Not to worry. You sparked an idea.

                          I have some modifications ready (I forked it), but fighting with github to get it synced (github wants to delete all my modifications when I try).
                          Perhaps granting me access (evroom) wil make it easier.
                          Although it is not really the way to use github, I guess.

                          E.J.

                          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.33.0
                          Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                          Raspbian GNU/Linux 12 (bookworm)

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

                            @evroom

                            you fork
                            clone fork //git clone
                            make new branch // git checkout -b nane
                            make code changes
                            // this part multiple times
                            add to files to commit // git add filename
                            git commit
                            git push // to add to github fork
                            //

                            on github go to original repo source
                            create pull request // for origin to pull changes from your fork

                            if subsequent push to same branch, PR will be updated automatically

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

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

                              @sdetweil said in MMM-Hoymiles-Wifi:

                              git commit
                              git push // to add to github fork

                              I am stuck here.
                              Will open a new topic for it …

                              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.33.0
                              Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                              Raspbian GNU/Linux 12 (bookworm)

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

                                Hi there,

                                I made some major changes to the code and hopefully did all the GitHub stuff correct in order to allow persons interested to give it a (new) try.

                                https://github.com/schris88/MMM-Hoymiles-Wifi

                                There is still a lot to do (see ‘TODO’ in the README file), but I think the basis provided by Christian (@schris88) has been strengthened.

                                Best regards,

                                E.J.

                                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.33.0
                                Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                                Raspbian GNU/Linux 12 (bookworm)

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

                                  @schris88

                                  Christian,

                                  This is on the TODO list:
                                  change pv_data to dtu date for combined output of inverter

                                  But I do not really understand what you mean by it.
                                  Do you mean combined output of 2 panels iso just 1 ?

                                  Please elaborate.

                                  E.J.

                                  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.33.0
                                  Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                                  Raspbian GNU/Linux 12 (bookworm)

                                  S 1 Reply Last reply Reply Quote 0
                                  • S Offline
                                    schris88 @evroom
                                    last edited by

                                    @evroom Hi there, maybe you can confirm, if the inverter has multiple inputs there seems to be an array of pv_data objects in the json (as seen in the test.json you pushed)

                                    so the meter should combine all pv data power to have the total, right.
                                    But we dont need to do that by hand because the combined value should be in dtu_power already, you can get rid of all the try except.

                                    I just didnt change it in the beginning because for inverters with only one input it makes no difference because its pv_data power and dtu_power is always the same value.

                                    evroomE 2 Replies Last reply Reply Quote 0
                                    • evroomE Offline
                                      evroom @schris88
                                      last edited by

                                      @schris88

                                      First of all, those are details I need to have a look at now that the basis is there.
                                      Perhaps there are other values and queries that make sense and that I can use. Like dtu_power and dtu_daily_energy.
                                      Also saving some data to not have counters showing 0 when the invertor is inactive needs to be implemented.
                                      During testing I found out that the pv_data for port 1 and 2 were different sometimes and that is why I needed to add those checks.
                                      And they can never hurt. Better to be safe than sorry.
                                      Furthermore, when you have only 1 panel connected, it is needed anyway.

                                      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.33.0
                                      Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                                      Raspbian GNU/Linux 12 (bookworm)

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

                                        @schris88

                                        Just FYI, I declare(d) more parameters than really necessary and actually used, in order to allow for more counters to display.
                                        For example a gauge for each panel; more details on the energy production of each panel; etc.
                                        I will make a remark about this in the code.

                                        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.33.0
                                        Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                                        Raspbian GNU/Linux 12 (bookworm)

                                        S 1 Reply Last reply Reply Quote 0
                                        • S Offline
                                          schris88 @evroom
                                          last edited by

                                          @evroom That sounds good, but we should loop through the pv_data objects and display each as a graph. In the end, there could be a config setting like detailed: true to activate the display of all pv_data objects as individual graphs. If set to false, we could display a single graph with the total power.

                                          There are Hoymiles inverters with 6 inputs, and adding 6 × 6 to 8 variables can quickly add up. This might not be an issue for us, but it’s worth considering if the module should be as generic as possible.

                                          Sorry I´m a IT-Consultant who, sometimes it breaks through :D

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

                                            @schris88 Recently worked on it a bit and added a second branch with local mongodb to save and display max power, Im planning to use the db entries to display a history chart

                                            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