Giter VIP home page Giter VIP logo

mmm-fritz-box-callmonitor's People

Contributors

bitte-ein-bit avatar jopyth avatar mueller-ma avatar paviro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mmm-fritz-box-callmonitor's Issues

LOOKING FOR MAINTAINER

Hi everyone,
As you probably noticed I don't have time to maintain this plugin at the moment. Is anyone interested in maintaining it? If yes I would be willing to give write access to the repo so existing pull requests can finally be merged.

Best,
Paul

Changing IP Address doesn't work.

Hi,

if I change the IP address to 192.168.178.200, the MM Interface will not load up because of an error.

I can set every options (not username and password) which works, but not with the IP address.

ERROR:
{
module: 'MMM-FRITZ-Box-Callmonitor',
position: 'top_right',
header: "Verpasste Anrufe",
config: {
fritzIP: 192.168.178.200,
username: Username,
password: XXXXX,
minimumCallLength: 10,
reloadContactsInterval: 0,
maximumCallDistance: 600
}
},

NO ERROR:
{
module: 'MMM-FRITZ-Box-Callmonitor',
position: 'top_right',
header: "Verpasste Anrufe",
config: {
minimumCallLength: 10,
reloadContactsInterval: 0,
maximumCallDistance: 600
}
},

I need the option for the IP address because I use a different fritzBox for calls.

Versions: latest version of everything (RP3, Node.js, Debian Jessie)

Thanks!

Activate Monitor via relay on incoming call ?

Hello,
first of all thanks for this module. Works fine so far. :)

I am searching for a solution to turn on my monitor on an incoming call. The monitors power is already switched on and off with an relay combined with an PIR sensor with these commands within an .py-script:

ON:
subprocess.call("gpio export 21 out", shell=True)

OFF:
subprocess.call("gpio export 21 in", shell=True)

How can I use these commands to activate the monitor when a call comes in and deactivate it again when the call ends?

Thanks in advance.

Kind Regards :)

Sorting calls

Since the update of my 7490 to FritzOS 6.92 the list of the calls isn´t sorted by time any more.
i.e.:
X one day ago
Y one day ago
Z 24 Minutes ago
and so on,
Any idea?
Regards
wominator

Uncaught SyntaxError after Update to MagicMirror v2.13.0

Hi,
after updating my MagicMirror to v2.13.0, i got this error:

Uncaught SyntaxError: JSON.parse: expected double-quoted property name at line 5 column 3 of the JSON data

onreadystatechange http://110.120.100.80:8080/js/translator.js:22

The error was caused by a comment in the language files of the module "MMM-FRITZ-Box-Callmonitor".

After I removed the comment in line 5, my MagicMirror comes up again:

/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/translations/de.json

{
"title": "Eingehender Anruf",
"noCall": "Keine kürzlichen Anrufe.",

// keep the error messages short                         <-------- remove this line
"calllist_parse_error": "Anrufliste unlesbar.",
"phonebook_parse_error": "Telefonbuch unlesbar.",
"vcf_parse_error": "vCard unlesbar.",
"login_error": "Logindaten falsch?",
"network_error": "FRITZ!Box nicht erreichbar.",
"unknown_error": "Unbekannter Fehler."
}

/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/translations/en.json

{
"title": "Incoming Call",
"noCall": "No recent calls.",

// keep the error messages short                         <-------- remove this line
"calllist_parse_error": "Can't parse calllist.",
"phonebook_parse_error": "Can't parse phonebook.",
"vcf_parse_error": "Can't parse vCard.",
"login_error": "Login data wrong?",
"network_error": "Could not reach FRITZ!Box.",
"unknown_error": "Unknown error."
}

Hope it helps someone else.

Error: Cannot find module 'vcard-json'�[0m

Hi,

since the lateset get pull from MM² yesterday, the software doesn't start anymore. nohup.out has the following error. When I deactivate the call monitor, everything works fine:

Error: Cannot find module 'vcard-json'�[0m

Perhaps you can have a look at it.

Thanks,
Maurice

Recent calls yes, current calls no

Hi guys, after not working with the original code from @paviro (the Pi would just display no previous calls), @armybean 's fork got my installation working again, even showing older entries before MagicMirror was booted. The original code didn't manage to fetch the address book from my 7590, armybean's did. 🙏 However, incoming calls are not being displayed live. This leads me to assume, that my installation is working correct. Also, the 7590's call monitor is active, as "nc fritz.box 1012" shows incoming calls perfectly. Did AVM maybe change something recently that broke the code?

Module not shown anymore after update to MagicMirror v2.13.0

Hi,
after updating my MagicMirror to v2.13.0, i got this error:

Uncaught TypeError: Cannot read property 'replace' of undefined
    at cmpVersions (module.js:528)
    at Function.Module.register (module.js:506)
    at MMM-FRITZ-Box-Callmonitor.js:12

As a workaround I added a comment in front of line 12 of file MMM-FRITZ-Box-Callmonitor.js
Now the module shows up again.

MMM-FRITZ-Box-Callmonitor.js after adding comments:

/* global Module */

/* Magic Mirror
 * Module: MMM-FRITZ-Box-Callmonitor
 *
 * By Paul-Vincent Roll http://paulvincentroll.com
 * MIT Licensed.
 */

Module.register("MMM-FRITZ-Box-Callmonitor", {

	// requiresVersion: "2.0.0",        <-- add // at the beginning of this line

	// Default module config.
	defaults: {
		numberFontSize: 30,
		vCard: false,
		fritzIP: "192.168.178.1",
		fritzPort: 1012,

I hope this helps someone.

No limit in recent call list

Hi, i have following question. Is there a reason why there is no limit in getting the recent call list (fritz_access.py, Line 16ff. On the AVM Page i saw that there would be a way to limit this list by URL parameters.

grafik

Unfortunatelly i dont have an idea, how to add URL Parameters in the right syntax (in fritz_access.py).
Maybe setting a limit by config is a good idea (maximumCallDistance or maximumCalls).

I am working on a reverse Lookup on "dasoertliche.de" and i reach a limit, as i put my code in the getName Function of node_helper.js and this function is also used for the (not limited) recent call list.
See forum: https://forum.magicmirror.builders/topic/6639/reverse-lookup-mmm-fritz-box-callmonitor-help-needed

I am looking forward hearing from you.

Regards AxLED

KeyError: 'NewPhonebookList'

Hey,

I just installed your module and it doesn't work, it displays "unknown error". These are the logged lines:

MMM-FRITZ-Box-Callmonitor error while accessing FRITZ!Box:
Traceback (most recent call last):
File "/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/fritz_access.py", line 74, in
main(args)
File "/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/fritz_access.py", line 60, in main
handle.download_phone_book()
File "/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/fritz_access.py", line 23, in download_phone_book
for phonebook_id in result["NewPhonebookList"]:
KeyError: 'NewPhonebookList'

Regards
Matthias

vCard einbinden

Hi,

I need help.
My mirror shows me only the number if someone calls me.
But I would like to see the Name.

Den Rest jetzt auf Deutsch:
Zum einen ist mir nicht ganz klar, wie aus meinem Telefonbuch von der FritzBox eine vcf erzeugen kann.
Zum anderen kenne ich es so, dass Pro Kontakt eine vcf erzeugt wird. Aber ich werde doch keine 350 vcfs einbinden müssen, oder?

Bestimmt stell ich mich grad nur wieder blöd an. Eine kleine Hilfestellung wäre total super :-)

Grüße

No German language

I see only "title" in the Windows, no german language.
Language files are available.
Can you helf me?

JS TypeError

Thanks for the great module,

I have error in MMM-FRITZ-Box-Callmonitor.js when call is coming and in hangup.

LIne 24 and 31.
"TypeError: self.sendNotification is not a function. (In 'self.sendNotification', 'self.sendNotification' is undefined)"

"TypeError: self.sendNotification is not a function. (In 'self.sendNotification("HIDE_ALERT")', 'self.sendNotification' is undefined)"

Mayby there is something I did wrong?

Sorting is not working

On my system the call history is sorted in a wrong order! It is completely out of order, call from yesterday, today, 3 days ago, yesterday, and so on.

Setup: FritzBox 7390 with current firmware, German language...

I changed the sortHistory function, now it works for me:

sortHistory: function() {
	var history = this.callHistory;
	
	//Sort history by time
	history.sort(function(a, b) {
		return new Date(b.time) - new Date(a.time);
	});

	this.callHistory = history;
},

Make use of TR-064 API

I am currently working on exploring the possibilities of the TR-064 API. It can be used to access Fritz.Box settings / phone books / call list. Do you think this makes sense? Depending on how far I get, I will fork the project and upload my progress. Currently when I come home and start the mirror, any calls I missed while away will not be displayed, since the mirror did not record them. Also the phone book management as a vcard file does not work for me, my contacts are in the Fritz.Box only at the moment.

There is a node library which implements the protocol, and a (little bit outdated) documentation

The correct naming of the services can be read from the device:

const tr = require("tr-064");

var tr064 = new tr.TR064();
tr064.initTR064Device("fritz.box", 49000, function (err, device) {
    if (!err) {
        console.log("=== " + device.meta.friendlyName + " ===");
        device.meta.servicesInfo.forEach(function (serviceType) {
            var service = device.services[serviceType];
            console.log("  ---> " + service.meta.serviceType + " <---");
            service.meta.actionsInfo.forEach(function (action) {
                console.log("   # " + action.name + "()");
                action.inArgs.forEach(function (arg) {
                    console.log("     IN : " + arg);
                });
                action.outArgs.forEach(function (arg) {
                    console.log("     OUT: " + arg);
                });
            });
        });
    }
});

White screen

After the installation process the MagicMirror-Monitor (not call monitor itself) is completely white.
I use the newest MagicMirror.

                {
                        module: 'MMM-FRITZ-Box-Callmonitor',
                        position: 'top_left',
                        header: 'Calls',
                        config: {
                                fritzIP: 'x.x.x.x'
                        }
                }
drwxr-xr-x  5 pi pi  4096 Aug 28 11:08 .
drwxr-xr-x 14 pi pi  4096 Aug 27 22:48 ..
drwxr-xr-x 10 pi pi  4096 Aug 27 22:10 default
drwxr-xr-x  4 pi pi  4096 Aug 28 11:08 MMM-FRITZ-Box-Callmonitor
drwxr-xr-x  3 pi pi  4096 Aug 28 11:23 node_modules
-rw-r--r--  1 pi pi 22719 Aug 27 22:10 README.md

Black Screen after installation

Hi Guys,

somethings wrong after the module installation and adding the part to the config file. After Restart the Service or reboot my raspberry pi the whole screen is black. After i delete the part again in the config file, everything works great. What i am doing wrong? i checked the config file and everything seems to be fine....

How to read the phonenumbers

On the mirror i see the both modules ( recent call and actual call) but how and where i must setup it so that i can see the name from the caller (i only see the number) and it don't show the recent calls (it say continue, no recent call)

The (API?) code in the readme file where paste i this? (i want to read the phonebook in my fritzbox only)
It is not clear for me how to make this work.

Thanks Chris

Type Error

Hello.
I get the following error if i try to use the modul with the API.

Tbh i don´t know what is even meant by it.

TypeError: PythonShell is not a constructor
at Class.loadDataFromAPI (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_helper.js:216:17)
at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_helper.js:69:9)
at Socket. (/home/pi/MagicMirror/js/node_helper.js:112:11)
at Socket.emit (events.js:210:5)
at /home/pi/MagicMirror/node_modules/socket.io/dist/socket.js:423:28
at processTicksAndRejections (internal/process/task_queues.js:75:11)

Best regards
RhodanBull

Missed Calls

I'm not so interested in the current calls as the mirror is in the bathroom and I just have a look into it every morning. But is it possible to display missed calls?

0|mm | TypeError: PythonShell is not a constructor 0|mm | at Class.loadDataFromAPI (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_helper.js:216:17)

Does anyone know this mistake, meets with this as well as the FitBit module, according to MichMich it lies at the respective modules and not at the MagicMirror Core.

MagicMirrorOrg/MagicMirror#1415

0|mm | TypeError: PythonShell is not a constructor
0|mm | at Class.loadDataFromAPI (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_helper.js:216:17)
0|mm | at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_helper.js:62:10)
0|mm | at Socket. (/home/pi/MagicMirror/modules/node_modules/node_helper/index.js:113:11)
0|mm | at emitTwo (events.js:126:13)
0|mm | at Socket.emit (events.js:214:7)
0|mm | at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:513:12
0|mm | at _combinedTickCallback (internal/process/next_tick.js:131:7)
0|mm | at process._tickCallback (internal/process/next_tick.js:180:9)

Not showing any calls

Hi,

I believe I configured the module correctly. Unfortunately it's not showing any calls. As I still have 'debug' switched on I see the following in the console:

Connecting socket for: MMM-FRITZ-Box-Callmonitor
Starting module: MMM-FRITZ-Box-Callmonitor
Connecting socket for: updatenotification
Connecting socket for: calendar
Starting node helper for: calendar
Connecting socket for: newsfeed
Starting module: newsfeed
Sockets connected & modules started ...
Launching application.
Received config for MMM-FRITZ-Box-Callmonitor
MMM-FRITZ-Box-Callmonitor is waiting for incoming calls.
Starting access to FRITZ!Box...
Whoops! There was an uncaught exception...
SyntaxError: Unexpected token F in JSON at position 2
at JSON.parse ()
at PythonShell.asJson (/home/pi/MagicMirror/modules/node_modules/python-shell/index.js:350:21)
at /home/pi/MagicMirror/modules/node_modules/python-shell/index.js:302:42
at Array.forEach ()
at PythonShell.recieveInternal (/home/pi/MagicMirror/modules/node_modules/python-shell/index.js:298:15)
at PythonShell.receiveStderr (/home/pi/MagicMirror/modules/node_modules/python-shell/index.js:282:21)
at Socket. (/home/pi/MagicMirror/modules/node_modules/python-shell/index.js:100:18)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
Whoops! There was an uncaught exception...
TypeError: Cannot read property 'indexOf' of undefined
at PythonShell._endCallback (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_helper.js:233:25)
at terminateIfNeeded (/home/pi/MagicMirror/modules/node_modules/python-shell/index.js:140:39)
at ChildProcess. (/home/pi/MagicMirror/modules/node_modules/python-shell/index.js:113:13)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)

My config files looks like this:

      },
            {
                    module: 'MMM-FRITZ-Box-Callmonitor',
                    position: 'top_center', // This can be any of the regions. Best results in left or right regions.
                    header: "Kürzliche Anrufe", // This is optional
                    config: {
                            username: "iobroker",
                            password: "********",
                            fritzIP: "192.168.188.1",
                            vCard: "/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/contacts.vcf",
                            showContactsStatus: true,
                            debug: true
                            }
            },

Any hints or tipps are welcome.

Regards,
Timo

TR-064 API continued

Currently there is the issue, that if the Fritz API is used to load recent calls + phonebook, it breaks after a certain number of uses, due to an internal problem of the library used to access the API. I will prepare a PR to solve this issue.

Also I suggest a small (optional) status icon, which shows how many contacts are loaded, or if some error happened.

Error while loading the contacts

I have the following problem: The contacts of my Fritzbox are not loading. A loading symbol is permanently displayed. What can I do?

Picture

My configuration looks like this:

{
module: 'MMM-FRITZ-Box-Callmonitor',
position: 'top_left',
header: 'Verpasste Anrufe',
config: {
//vCard: 'home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/vCard1.vcf',
username: "pi",
password: "raspberry",
showContactsStatus: true,
maximumCallDistance: 300,
deviceFilter: [],
debug: "true"
}
},

Info: I use the user pi and the password raspberry also for the Fritzbox user.

Call History

Kannst du eine version schreiben wo die letzten Anrufe angezeigt werden Name oder Nummer?

uncaught ENOENT exception

IsState:
Raspberry Pi B+, Debian Jessie, running https://github.com/MichMich/MagicMirror
node --version --> v6.6.0
Installation of MMM-FRITZ-Box-Callmonitor module like in description.

Complete error message:
Whoops! There was an uncaught exception...
{ Error: spawn /bin/sh ENOENT
at exports._errnoException (util.js:1036:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn /bin/sh',
path: '/bin/sh',
spawnargs:
[ '-c',
'python fritz_access.py -d data -p MyPassword -u MyUser' ],
cmd: 'python fritz_access.py -d data -p MyPassword -u MyUser' }
MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues

Sooo I guess this is the right place to put the issue in cause this module causes the exception.

Via command shell I can run:
python fritz_access.py -d data -u MyUser -p MyPassword -i fritz.box -P 49000
Working. I receive the xml file. So the access with the module fritz_access.py is working.

As far as I see, the complete python command does not include the ip address nor the port.
Closer look at the node_helper.js file shows the problem in my opinion:
loadDataFromAPI: function(){} does not contain the config parameters of port and ip address.

I added the parameters but still get the exception. Google helped out more or less. This exception is thrown when files/executives are missing in the call path. But thats only maybe a hint.

cd /usr/local/bin/node
ls node -al
node -> /home/pi/compile/node-v6.6.0-linux-armv6l/bin/node

Should be fine.......or not?

Try reloading if connection to FRITZ!Box is not up, when the mirror starts

Currently the connection to the FRITZ!Box sometimes fails, e.g. if the WLAN is not connected on startup. Most modules just load after a few minutes, when the connection is established, however the loading contacts thing is currently one time only.

I will make a PR soon, to fix this, by catching the Error returned from the python script:

MMM-FRITZ-Box-Callmonitor error while accessing FRITZ!Box: Traceback (most recent call last):
[...]
IOError: Error reading file 'http://192.168.178.1:49000/igddesc.xml': failed to load external entity "http://192.168.178.1:49000/igddesc.xml"

JavaScript error on call

Hi,

ich habe gestern die neue Version des MM's inkl. der Module ein bisschen getestet. Die Installation und das Starten funktioniert. Leider erhalte ich bei einem Anruf folgenden Error:

img_2658

Was kann das sein?

Viele Grüße
Maurice

EDITED by paviro: Translated title into English.

Example config.js

Hallo Paviro,
Can you give me an example config.js to show how and where i put the Fritz Code into.
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.