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.3k 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
      last edited by

      Hallo,
      ich bin reltiv neu hier und versuche gerade das modul zu installieren.

      Ich habe soweit alles nach Anleitung gemacht, aber wenn ich ./HoymilesWifi.sh starte kommt immer folgende Meldung:

       * Serving Flask app 'hoymiles_data'
       * Debug mode: off
      Address already in use
      Port 5000 is in use by another program. Either identify and stop that program, or start the server with a different port.
      
      

      Was mache ich falsch? Der port ist angeblich durch pthon belegt …

      Danke und Grüße

      Florian

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

        @Jose1701

        Try this to find out what is using port 5000:

        sudo netstat -apln | grep -w 5000
        

        And did you update the bash program?
        https://github.com/schris88/MMM-Hoymiles-Wifi?tab=readme-ov-file#enter-dtu-ip-address-of-dtu

        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)

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

          @evroom
          Thanks for the quick answer.

          I inserted the IP of the dtu.

          Portscan is:

          tcp        0      0 127.0.0.1:5000          0.0.0.0:*               LISTEN      64879/python
          tcp        0      0 127.0.0.1:33698         127.0.0.1:5000          TIME_WAIT   -
          tcp        0      0 127.0.0.1:5000          127.0.0.1:56374         TIME_WAIT   -
          tcp        0      0 127.0.0.1:60100         127.0.0.1:5000          ESTABLISHED 71440/exe
          tcp        0      0 127.0.0.1:5000          127.0.0.1:60100         ESTABLISHED 64879/python
          tcp        0      0 127.0.0.1:52508         127.0.0.1:5000          TIME_WAIT   -
          tcp        0      0 127.0.0.1:50296         127.0.0.1:5000          TIME_WAIT   -
          
          
          evroomE 1 Reply Last reply Reply Quote 0
          • evroomE Offline
            evroom @Jose1701
            last edited by

            @Jose1701

            This command should give more information on the PID found:

            ps -Flww -p

            E.g.

            ps -Flww -p 64879

            Perhaps there are easier ways, but this should 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)

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

              @evroom

              Seems that this is hoymiles …?

              F S UID          PID    PPID  C PRI  NI ADDR SZ WCHAN    RSS PSR STIME TTY          TIME CMD
              0 S florian    64879   64878  1  80   0 - 59630 do_sys 137520  1 16:11 ?        00:05:02 python hoymiles_data.py --dtu_ip_address 192.168.178.150 --max 800
              
              
              evroomE 1 Reply Last reply Reply Quote 0
              • evroomE Offline
                evroom @Jose1701
                last edited by evroom

                @Jose1701

                Yes, so an instance is already running.
                You added it to pm2 too?

                pm2 status

                If yes, then you do not need to run it manually.
                If no, then kill the (p)pid.

                sudo kill -9 [ppid]

                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)

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

                  @evroom

                  Well, I’ve done that now. At the moment it is night so I can’t see any output.
                  Will see if it works tomorrow …

                  Thank you. I will post if it runs then.

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

                    Can’t get it to work.

                    I don’t know what I’m doing wrong…

                    Now, Portscan ist about that:

                    
                    tcp        0      0 127.0.0.1:5000          0.0.0.0:*               LISTEN      1139/python
                    tcp        0      0 127.0.0.1:5000          127.0.0.1:37002         ESTABLISHED 1139/python
                    tcp        0      0 127.0.0.1:57592         127.0.0.1:5000          TIME_WAIT   -
                    tcp        0      0 127.0.0.1:37002         127.0.0.1:5000          ESTABLISHED 6097/exe
                    
                    
                    evroomE 1 Reply Last reply Reply Quote 0
                    • evroomE Offline
                      evroom @Jose1701
                      last edited by evroom

                      @Jose1701

                      First I would disable the module:

                      $ vi ~/MagicMirror/config/config.js
                      
                          module: "MMM-Hoymiles-Wifi",
                          disabled: true,
                      
                      $ pm2 restart MagicMirror
                      

                      I build this command to try to get more info on port 5000:

                      $ for pid in `lsof -i :5000 | grep -v 'PID' | awk '{print $2}' | sort -u`; do echo $pid; ps -Flww -p  $pid; done
                      

                      Hopefully the Forum tool does not change it.

                      Furthermore please verify and supply the following data:

                      $ cd /home/admin/MagicMirror/modules/MMM-Hoymiles-Wifi
                      

                      Check path:

                      $ which hoymiles-wifi
                      $ echo $PATH
                      

                      Check if the path is in the PATH.
                      If not, do (using the path from ‘which’):

                      $ export PATH=$PATH:/home/admin/.local/bin
                      

                      Check config.js:

                      $ grep ':5000' ~/MagicMirror/config/config.js
                      

                      Expected is:

                      { src: 'http://127.0.0.1:5000' },
                      

                      Check HoymilesWifi.sh:

                      $ grep 'dtu_ip_address' HoymilesWifi.sh
                      

                      Expected is your DTU IP address, for example:

                      python hoymiles_data.py --dtu_ip_address 192.168.178.50 --max 800
                      

                      Test run (hoymiles-wifi):

                      $ hoymiles-wifi --host 192.168.178.50  identify-inverters
                      

                      Expected is a response.

                      Test run (HoymilesWifi.sh)

                      $ ./HoymilesWifi.sh
                      

                      Expected is:

                      * Serving Flask app 'hoymiles_data'
                      * Debug mode: off
                      INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
                      * Running on http://127.0.0.1:5000
                      INFO:werkzeug:Press CTRL+C to quit
                      

                      If you wait a bit some more output is shown.

                      If it works, then I would suggest to stop the ./HoymilesWifi.sh command and do:

                      $ cd /home/admin/MagicMirror/modules/MMM-Hoymiles-Wifi
                      $ pm2 start HoymilesWifi.sh
                      $ pm2 save
                      
                      $ pm2 status HoymilesWifi
                      
                      $ pm2 logs HoymilesWifi --lines 10
                      

                      If everything is okay, the enable the module again:

                      $ vi ~/MagicMirror/config/config.js
                      
                          module: "MMM-Hoymiles-Wifi",
                          disabled: false,
                      
                      $ pm2 restart MagicMirror
                      

                      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 J 3 Replies Last reply Reply Quote 0
                      • evroomE Offline
                        evroom @evroom
                        last edited by evroom

                        To be honest, for me the MM does not display anything.
                        Although it is dark, I still expected the graphic with 0 or so.
                        Or I have to wait a bit longer.

                        I used
                        https://github.com/schris88/MMM-Hoymiles-Wifi/
                        and all the above is correct and running.

                        A year ago I made a fork and made some changes, of which I think are present in the schris88 version as well.

                        https://github.com/evroom/MMM-Hoymiles-Wifi/
                        I will give this one a try when I have time.

                        PS: it seems that when the microinverter is off-line, you will not see anything. Need to wait for it to be active again.

                        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
                        • J Offline
                          Jose1701 @evroom
                          last edited by

                          @evroom said in MMM-Hoymiles-Wifi:

                          $ grep ‘dtu_ip_address’ HoymilesWifi.sh

                          Until that line everything is ok. After that it says:

                          
                          grep: HoymilesWifi.sh: No such file or directory
                          
                          
                          S 1 Reply Last reply Reply Quote 0
                          • J Offline
                            Jose1701 @evroom
                            last edited by

                            @evroom said in MMM-Hoymiles-Wifi:

                            $ hoymiles-wifi --host 192.168.178.50 identify-inverters

                            This works:

                            Identify-inverters Response:
                            {'1412a015f1e3': 'HMS-800W/1000W-2T'}
                            
                            

                            After that: ./HoymilesWifi.sh

                             * Serving Flask app 'hoymiles_data'
                             * Debug mode: off
                            Address already in use
                            Port 5000 is in use by another program. Either identify and stop that program, or start the server with a different port.
                            
                            
                            1 Reply Last reply Reply Quote 0
                            • S Do not disturb
                              sdetweil @Jose1701
                              last edited by

                              @Jose1701 typo

                               grep 'dtu_ip_address' Hoymiles-Wifi.sh
                              

                              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

                                Im getting this:

                                
                                python hoymiles_data.py --dtu_ip_address 192.168.178.150 --max 800
                                
                                
                                S evroomE 2 Replies Last reply Reply Quote 0
                                • S Do not disturb
                                  sdetweil @Jose1701
                                  last edited by

                                  @Jose1701 he just wanted to see the IP address the module was connecting to , which is hard coded in that line

                                  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

                                    First of all, where I write

                                    /home/admin/
                                    

                                    please use

                                    ~/
                                    

                                    (tilde sign)

                                    And can you please send me:

                                    cd ~/MagicMirror/modules/MMM-Hoymiles-Wifi
                                    git branch
                                    git remote -v
                                    

                                    Every time you get that port in use error, run the long command to see what programs are using the port.
                                    And of course do not use HoymilesWifi.sh when it is also active under pm2.

                                    I am starting to wonder if the module works at all.
                                    I finally got a picture, but it showed an error in 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)

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

                                      @Jose1701

                                      You also might try this module:

                                      https://github.com/CuddlyCow/MMM-HoymilesPVMonitor

                                      I may give it a try myself.

                                      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)

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

                                        @evroom

                                        * master
                                        origin  https://github.com/schris88/MMM-Hoymiles-Wifi (fetch)
                                        origin  https://github.com/schris88/MMM-Hoymiles-Wifi (push)
                                        
                                        

                                        I used the ~ symbol.

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

                                          @evroom

                                          Well I tried that but I’m to silly to install it.

                                          florian@raspberrypi:~/MagicMirror/modules/MMM-Hoymiles-Wifi $ pip3 install hoymiles-wifi
                                          error: externally-managed-environment
                                          
                                          × This environment is externally managed
                                          ╰─> To install Python packages system-wide, try apt install
                                              python3-xyz, where xyz is the package you are trying to
                                              install.
                                          
                                              If you wish to install a non-Debian-packaged Python package,
                                              create a virtual environment using python3 -m venv path/to/venv.
                                              Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
                                              sure you have python3-full installed.
                                          
                                              For more information visit http://rptl.io/venv
                                          
                                          note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
                                          hint: See PEP 668 for the detailed specification.
                                          
                                          
                                          florian@raspberrypi:~/MagicMirror/modules/MMM-Hoymiles-Wifi $ sudo apt install python3 hoymiles-wifi
                                          Error: Unable to locate package hoymiles-wifi
                                          florian@raspberrypi:~/MagicMirror/modules/MMM-Hoymiles-Wifi $
                                          
                                          
                                          
                                          evroomE 1 Reply Last reply Reply Quote 0
                                          • evroomE Offline
                                            evroom @Jose1701
                                            last edited by

                                            @Jose1701

                                            You installed that already, so no need to install it again.
                                            Probably using:

                                            python -m pip install -r requirements.txt --break-system-packages
                                            

                                            The schris88 requirements.txt contains the hoymiles-wifi package.

                                            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)

                                            J 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
                                            • 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