• Page:
  • 1

TOPIC: 'Translating' an addon for Openelec/XBMC -> FritzBox Call Notification

'Translating' an addon for Openelec/XBMC -> FritzBox Call Notification 1 year 4 weeks ago #1

  • tobias
  • tobias's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 82
  • Thank you received: 3
  • Karma: 1
Hi everybody,

I was searching for an Addon (Service) to perform some events in case there is an incoming call on my FritzBox.
The only addon I could find was this FritzBox Caller(sorry its in german).

It works, but I tried to bring it to a more mordern shape. Not a big deal beside its Perl core. - works fine on XBMCbuntu but Openelec seems to be shipped without it. :dry:
Any way to translate this 'open socket' to python?
What I found so far in the python wiki was beyond my skills. Listening and serving sockets ... :S Nothing compared to my PHP-ish view :D

this is my 'idea' of the default.py ...
#!/usr/bin/python
import os;
import xbmc;
import xbmcaddon;
import socket;

__settings__   = xbmcaddon.Addon(id='fritz.box.call.id')

def react_inc(nr):
	show_time = __settings__.getSetting("show_time");
	xbmc.executebuiltin('XBMC.Notification(Telefon,Anruf von '+ nr +','+ show_time +')');
	
def react_out():
	xbmc.executebuiltin('XBMC.Notification(Telefon,Anruf Beendet)');

def listen_Box(ip):
	mysock = open_tcp_socket(ip,'1012');
	file = mysock.makefile();
	while (line = file.readline()){
		c = line.split(';');
		if (c[1] == 'RING') {
			nr = c[3];
			react_inc(nr);
		}
		if (c[1] == 'DISCONNECT'){
			react_inc();
		}
	}
    file.close();
	mysocket.close();
return true;

	
while (not xbmc.abortRequested):
		listen_Box(__settings__.getSetting("box"));
Last Edit: 1 year 4 weeks ago by tobias.
The administrator has disabled public write access.

Re: 'Translating' an addon for Openelec/XBMC -> FritzBox Call Notification 1 year 2 weeks ago #2

  • yehl
  • yehl's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
I have put my Plugin on Googlecode.
code.google.com/p/xbmc-fritzbox/

It's an early Beta and has a Bug when the "abortRequest" is fired, but if you like we can work on it together to make it a great addon for users who have a fritzbox. I'm planning to add more functionality.
First Priority: Solve the Shutdown-Bug.
Second Priority: Add the Picture-Phonenumber-Lookup.
Third Priority: Make XBMC react on incoming calls. (like stop playing Music/Video, etc. ).
Fourth Priority: Read and show the recent Telephone List, show and play Voicemessages, Show Fax-Messages.

I started a Testing-Call on the german xbmcnerds Forum and I would be pleased to have a scecond Coder on board.
The administrator has disabled public write access.

Re: 'Translating' an addon for Openelec/XBMC -> FritzBox Call Notification 11 months 1 week ago #3

  • Fantasticn
  • Fantasticn's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 50
  • Thank you received: 1
  • Karma: 0
@yehl:
Great work!

I am totally new to OpenElec/XBMC and do not have the slightest idea about Linux (I am a Windows User from the first days on). Therefore I love when things are easy to install and work "out of the box". Reading the tutorial of creating some kind of script and installing it manuelly was quiet confusing to me. But installing your ready-made plugin via XBMC-Options was easy.

Thanx very much!

FantasticN
The administrator has disabled public write access.
  • Page:
  • 1

Our Sponsors & Partners

arctic_logo