bitte-ein-bit / MMM-iCloud-Client

MIT License
26 stars 3 forks source link

MMM-FRITZ-Box-Callmonitor #1

Open paviro opened 8 years ago

paviro commented 8 years ago

Providing an address book for MMM-FRITZ-Box-Callmonitor would be amazing! I tried integrating a csv reader but I could not get it to work yet but I definitely want to get rid of the adressbook.js

bitte-ein-bit commented 8 years ago

Ran out of Time today. It's all there. Just the integration part is missing. If you broadcast a 'PHONE_LOOKUP' message, a 'PHONE_LOOKUP_RESULT' should be broadcasted if a number is found. As it's not done yet, I couldn't test it. But a number lookup does work. So maybe just add the line to broadcast the lookup message and see what happens...

Am So, 24. Apr 2016, um 13:42, schrieb Paul-Vincent Roll:

Providing an address book for MMM-FRITZ-Box-Callmonitor would be amazing! I tried integrating a csv reader but I could not get it to work yet but I definitely want to get rid of the adressbook.js — You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub[1]

Links:

  1. https://github.com/bitte-ein-bit/MMM-iCloud-Client/issues/1
paviro commented 8 years ago

I can integrate it, only problem is what do people without iCloud do. Any chance you could also build one for vcf cards?

paviro commented 8 years ago

I am working on adding it to the module. Once it's done, I will also add support for the PHONE_LOOKUP broadcast.

paviro commented 8 years ago

Sorry, I guess you have to add it yourself. I want to work on some other things first. Please use something like usePhoneLookup in the config to toggle it to true or false (default) and also add it to the README as an option for getting phone number names.

If usePhoneLookup is true you would need to disable the sendNotification("SHOW_ALERT") when a call is received in my module and instead send a notification to your own module and then handle its response somehow. Just a thought: What happens if someone else decides to use PHONE_LOOKUP to get names from your module, you would need to make sure that the CallMonitor only displays an alert when the notification it receives was also really requested by it in the first place.

CFenner commented 8 years ago

What do you think about a separate model to split this from the calendar?

paviro commented 8 years ago

I like the idea of an iCloud module. I would simply add an entry to the config so everything can be disabled and enabled at will.

bitte-ein-bit commented 8 years ago

I thought about adding a preference / order field of modules providing address data. I'd love to have a carddav version aswell. So maybe move all lookup of the callmonitor to an extra module and just adding a preference order would do it.

bitte-ein-bit commented 8 years ago

@CFenner What do you want to split? Callmonitor / Addressbook, Phonebook / Birthdaycalendar?

paviro commented 8 years ago

I am not quite sure what you mean by that sorry.

Viele Grüße, Paul-Vincent Roll

bitte-ein-bit commented 8 years ago

@paviro Not sure if my English was clear on that. Let's try German.

Ich habe gedacht, man könnte im Callmonitor einfach nur Prioritäten für die Module konfigurieren, die auf Anfragen antworten könnten. So könnte es zum Beispiel ein iCloud und vcf Adressbuch Modul konfiguriert in einem MM geben. Der Callmonitor schickt einfach eine Nachricht raus und warten auf antworten. Wenn nun mehrere Antworten eintreffen, dann wird nach Prio entschieden, welcher Eintrag gewinnt und angezeigt wird. Evtl. könnte man auch sofort die Nummer anzeigen und nach und nach den Eintrag ergänzen. Ich habe übrigens ein Proof-of-Concept nach https://github.com/bitte-ein-bit/MMM-FRITZ-Box-Callmonitor/tree/proof-of-concept gepusht, falls du mal testen willst. Weit von fertig, aber ich wollte einfach mal wissen, ob es sauber funktioniert.

paviro commented 8 years ago

Klingt doch ganz gut :) schau es mir die Tage an. Wichtig ist mir einfach, dass es nicht in meinen vCard Reader reinfunkt, also Aussteller ist und das du wie gesagt sicherstellst, dass es nur auf antworten reagiert, bei denen es auch die Anfrage gestellt hat :)

CFenner commented 8 years ago

@bitte-ein-bit Ich dachte man könnte ein iCloudNameLookup Modul bauen, was nur das nachschlagen einer Nummer in der cloud übernimmt und die Daten über Events an wen auch immer zurück gibt. Im callMonitor baut man die gleichen Event Namen ein und kann bei Bedarf das Standard Modul deaktivieren und das iCloudLookupModul installieren. Evtl. könnte man sich auch Prioritäten überlegen und beide aktiviert lassen oder mehrere iCloud Accounts anschließen.

bitte-ein-bit commented 8 years ago

@CFenner Also das ist prinzipiell das was das Modul macht. Die iCloud Kontakte runterziehen und lokal synchronisieren. Damit's im Fall der Fälle auch schnell geht.

Zusätzlich stellt es noch einen Kalender zur Verfügung in dem alle Geburtstage vorhanden sind. Denn kann, muss man aber nicht verwenden. Ohne das man die URL in das Kalender Modul einbaut, passiert da nix.