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-Fritz-Box-Callmonitor: Notification formatting

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    31 Posts 7 Posters 17.8k Views 7 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.
    • wishmaster270W Offline
      wishmaster270 Module Developer @coernel
      last edited by wishmaster270

      @coernel
      Hi,
      as i can see this fork https://github.com/drtorchwood/MMM-FRITZ-Box-Callmonitor-py3/tree/code_update_2023 contains all changes needed.
      But you will need to either use the current development version of MagicMirror or wait for the next release which i think is planned for 2022-04-01 to get the alerts formatted correctly.

      C 1 Reply Last reply Reply Quote 1
      • C Offline
        coernel @wishmaster270
        last edited by

        @wishmaster270 said in MMM-Fritz-Box-Callmonitor: Notification formatting:

        @coernel
        Hi,
        as i can see this fork https://github.com/drtorchwood/MMM-FRITZ-Box-Callmonitor-py3/tree/code_update_2023 contains all changes needed.
        But you will need to either use the current development version of MagicMirror or wait for the next release which i think is planned for 2022-04-01 to get the alerts formatted correctly.

        This is great however I just get this:
        nocall.jpg
        Is this the formatting error we are talking about without the Core update? If yes I am willing to wait. But this for me looks like more than a formatting setting!

        Callmonitor definately is enabled via Fritz!Phone. And username and password are correct - I can access the Fritz!Box and the user has the view and edit settings:

        Benutzer mit dieser Berechtigung können alle Einstellungen der FRITZ!Box sehen und bearbeiten.

        Any help would be appreciated!

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

          @coernel
          The view you show indicates that there are no recent calls and that the fetch of the telephone book is still running or was not successful. But it is the normal view. The calls will be signaled as alerts. So make sure you have the default alert module activated in your config.js:

          		{
          			module: "alert",
          		},
          

          The formatting will only be wrong in the alert.

          Please make sure to check the following things, too:

          • You cloned the right fork with the following command?
          cd ~/MagicMirror/modules
          git clone git@github.com:drtorchwood/MMM-FRITZ-Box-Callmonitor-py3.git
          

          Edit:
          * You use the right branch by calling the following commands?
          As of 2023-02-25 the changes are merged to the master branch of the fork. So no need to change to the code_update_2023 branch anymore.

          • You installed the JavaScript dependencies?
          cd ~/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor-py3
          npm install
          
          • You installed the Python dependencies?
          sudo pip3 install fritzconnection
          
          • You activated the call monitor service of the box by dialing the following number with one of your phones?
          #96*5*
          
          • You configured the right IP address in config.js with option fritzIP. Default is 192.168.178.1?
          		{
          			module: 'MMM-FRITZ-Box-Callmonitor-py3',
          			position: 'bottom_left',
          			header: "Verpasste Anrufe", 
          			config: {
          				username: "foo",
          				password: "bar",
          				fritzIP: "10.18.8.1",
          				reloadContactsInterval: 50,
          				minimumCallLength: 0,
          				showContactsStatus: true,
          				maximumCallDistance: 60*6,
          				maximumCalls: 4,
          				fade: false,
          				debug: true,
          			}
          		},
          

          If the call monitor service is not activated on the fritz box you will see a message like this in the logs:

          [24.02.2023 16:31.29.944] [ERROR] Error: connect ECONNREFUSED 192.168.178.1:1012
              at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
            errno: -111,
            code: 'ECONNREFUSED',
            syscall: 'connect',
            address: '192.168.178.1,
            port: 1012
          }
          

          And again the call monitor service is independent of username and password. The credentials are used to fetch the telephone book and the past calls only.

          Thats how the default view looks in my case:
          fritzcallmonitor.png

          And thats how it looks if there is a incomming call:
          fritzcall.png

          If you do not use the current development branch of MagicMirror there may be some html code in the alert and it will look like <span style='font-size:30px'>Tom</span>

          fritzcallmonitor_tom.png

          1 Reply Last reply Reply Quote 0
          • J Offline
            Jan 0 @coernel
            last edited by

            @coernel I now also pushed the changes into the master https://github.com/drtorchwood/MMM-FRITZ-Box-Callmonitor-py3/tree/master

            C 1 Reply Last reply Reply Quote 1
            • C Offline
              coernel @Jan 0
              last edited by

              @Jan-0
              This is so cool! It does work now. Has it been published to the list of modules?
              If you or @wishmaster270 are somewhere near Cologne you or are invited for a free professional solo session of Feldenkrais Functional Integration or a free professional singing lesson!

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

                @coernel
                Great to hear and you are welcome. I try to help where I can.
                I live about 30km south of Munich but thanks for your invitation.

                1 Reply Last reply Reply Quote 0
                • X Offline
                  xIExodusIx
                  last edited by

                  Hi Everybody out there using MMM-FRITZ-Box-Callmonitor,
                  I would love to use this Module, but I’m not really in the mod to code or to find errors.
                  I tried to install your new branch under PiOS “Bookworm” but I get some errors using
                  “sudo apt-get install python-dev libxml2-dev libxslt1-dev zlib1g-dev && sudo pip install fritzconnection”!
                  The first error is: " E: For Package »python-dev« exists no Installationscandidate."
                  The second error for pip install is: “externally-managed-environment …”
                  How can I solve these problems?
                  Sorry for my bad english, I’m german and over 60 years old.
                  Thanks for helping.

                  R 1 Reply Last reply Reply Quote 0
                  • R Offline
                    rabbit83ka @xIExodusIx
                    last edited by

                    @xIExodusIx that’s due to changes in the handling of the python packages. I installed “fritzconnection” in a virtual environment:

                    python -m venv venv
                    
                    source venv/bin/activate
                    
                    python -m pip install fritzconnection
                    

                    to make the Callmonitor use the fritzconnection, I edited the nodehelper.js (in ~/MagicMirror/modules/MMM-FritzBox-Callmonitor-py3) in line 212 to look like this (user is “pi”, must be adapted if you use another user):

                    pythonPath: '/home/pi/venv/bin/python',
                    

                    Don’t know if it’s the best solution, but it works.

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

                      @rabbit83ka you can set the venv in the mm.sh that starts MagicMirror

                      then you don’t need to do that

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      R 1 Reply Last reply Reply Quote 0
                      • R Offline
                        rabbit83ka @sdetweil
                        last edited by

                        @sdetweil Thanks, so it should look like this?

                        #!/bin/bash
                        # This file is still here to keep PM2 working on older installations.
                        cd ~/MagicMirror
                        export PYTHONPATH="/home/pi/venv/bin/python"
                        DISPLAY=:0 npm start
                        
                        S 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 3 / 4
                        • 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