Read the statement by Michael Teeuw here.
MMM-Fritz-Box-Callmonitor: Notification formatting
-
@coernel Perhaps, my renaming of the module is the problem. On my computer, the module is stilled named “MMM-FRITZ-Box-Callmonitor”. I only renamed it for the branch.
I will check this in the next days.
Doespython3 fritz-access.py -u '<username>' -p '<password>'
work? -
@Jan-0 if you rename a module, you have to rename the folder and the filename AND EDIT the file and change it’s register clause w the right name.
modulename - folder
modulename.js
edit modulename.js and change 1 line of code -
After changing some lines as suggested by sdetweil the MagicMirror loads again.
@Jan-0 said in MMM-Fritz-Box-Callmonitor: Notification formatting:
python3 fritz-access.py -u ‘’ -p ‘’
The filename is fritz_access.py. So after executing it I got
print json.dumps({"filename": file, "content": content}) ^ SyntaxError: invalid syntax
This was easily solded by changing it to
print (json.dumps({"filename": file, "content": content}))
(Just adding round brackets) - that was a change from Python2 to Python3.However it was followed by the next error
urllib2
does not work in Python 3. According to stackoverflow urllib.error and urllib.request must be used for Python3.Are you sure you uploaded the right code to github? It seems you accidentally uploaded th old python2 code!
-
-
@wishmaster270
I uploaded my changes in the branch code_update_2023 and did not pullit to the master of the fork.
I will have a look at the pull requests tomorrow. -
@wishmaster270 This is great.
I can confirm that executingfritz_acces.py
with username and password now works! It results in some structured data:<Call><Id>4373</Id><Type>3</Type><Called>0123456789</Called><Caller>SIP: 9328727</Caller><CallerNumber>54321</CallerNumber><Name>Some fancy Name</Name><Numbertype>sip</Numbertype><Device>Tardis</Device><Port>13</Port><Date>03.09.22 12:55</Date><Duration>0:02</Duration><Count></Count><Path /></Call>
I also get the module to show however it does not show active nor missed calls. It just shows “no call”, the spinner and the phonebook.
I used this config:
module: 'MMM-FRITZ-Box-Callmonitor-py3', position: 'bottom_left', header: "Verpasste Anrufe", config: { username: "foo", password: "bar", reloadContactsInterval: 24*60, minimumCallLength: 0, showContactsStatus: true, maximumCallDistance: 60*6, maximumCalls: 4, fade: false, debug: true, } },
So I guess the communication between the js and the py is faulty.
I would like to help you with your formatting though in the end…
-
@coernel
The pythons script is only responsible to fetch the call history and the phonebook of the fritz box. The call notification is handled by java script.
So should see a alter containing the (wrong formatted) phone number for each incoming call.Are you sure you activated the call notification on your fritz box by dialing
#96*5*
with a phone connected to the box (DECT phone works as well).
Edit:
I do not think the formatting problem is related to this module. As of the documentation of the alert module it should be possible to send either simple text or html formatted text.
As a debug test i tried to send html formatted text with one of my other modules which ends in the same problem -
@wishmaster270 known bug. fixed in next release
-
@sdetweil
I should have checked that. Thank you for the link.
With the current develop branch the formatting works as expected, too.Edit: If the comment is removed of the translation files the translations work as well and the right title is displayed
-
@wishmaster270 and @Jan-0 Is there now a current repository with the issues fixed? I would love to use the module as well.
Also it should be added here : https://github.com/MichMich/MagicMirror/wiki/3rd-party-modules