FritzBox Callmonitor

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

Post Reply
M4RcO
Posts: 11
Joined: Saturday 12 March 2016 18:45
Target OS: Windows
Domoticz version: 3.4834
Location: Germany
Contact:

FritzBox Callmonitor

Post by M4RcO »

Hello Everyone!
I found the FritzCall Monitor in the Hardware list. I have a Fritzbox and want to use the Call Monitor for Domoticz.

But how can i use it?

What is it good for?

Thx for Messages :)
Hardware: Shuttle XS35V5Pro
OS: Windows 7 Pro x64
Domoticz branch: beta
Domoticz Version: V3.5010
Albsucher
Posts: 24
Joined: Wednesday 17 July 2013 23:05
Target OS: -
Domoticz version:
Contact:

Re: FritzBox Callmonitor

Post by Albsucher »

Hello,

see the Domoticz WIKI how to setup the Call monitor.
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: FritzBox Callmonitor

Post by Thomasdc »

HI

I have the fritzbox callmonitor running

but now i would like to do something with it..
so when a certain person calls turn on a switch or something..

but how can i do this (using LUA)

something like:

Code: Select all

if deviceSvalue[FritzBox] =="Received From: telnumber to: telnumber" then
       commandArray['Lamp'] = "On"
 end
return commandArray
But this code is obviously not working, but i am not sure what to add
i probably need a 'devicechanged' in the if statement?
Hoggle
Posts: 4
Joined: Thursday 05 May 2016 9:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: FritzBox Callmonitor

Post by Hoggle »

Hi,

did you solve your problem?

Hoogle
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: FritzBox Callmonitor

Post by Thomasdc »

Hoggle wrote:Hi,

did you solve your problem?

Hoogle
Hi!

For incomming connections (before it is answered by someone or the ansewring machine i didn't know how to implement it..

But in my situation the answering machine will always answer.. when this happens the fritzbox sends a signal to Domotcizs "Call" --> 'On
(when an phonecall is answered end and 'off' signel when the call is ended..)

so for my situation i look when the switch changed, then check the the phonenummer of the active call on the answering machine..

(this system is used for orders that comes in by phone on the answering machine, when certain clients calls between certain hours we need to know if they have left a new order or not by a certain time (the time is just a switch with the timer enabled.)

probably not many people need something like this but for who is interested this is the code i uses:

"Call" --> on when active phonecall , off when ended
"NieuweOproepen" --> this is a time based switch ( on at 10pm , off at 11pm ) so when called within this time it will be registered
"smsNieuweOproepen" --> just a switch to be able to turn the system on/off when its not used for certain reason (is normaly always 'on'
I have 10 uservalues: t1, t2, ... t10
thes are the phonenumbers to check if its one of these numbers that are calling
"Fritzbox" is the text that the fritbox sends to domoticz (this is used to compared the phonenumbers with.
"NewMessages" is just a uservalue (to count how many new orders did come in of those phone numbers (t1, .. t10)

Code: Select all

if devicechanged['Call']=='On' and otherdevices['NieuweOproepen']=='On' and otherdevices['smsNieuweOproepenActief']=='On' then 
  local i = 1
    for i =1 , 10 do
        local number = tostring("t"..i)   
        local FrizBoxText = tostring("Connected ID: 0 Number: "..uservariables[number])
        if  otherdevices_svalues['FritzBox'] == FrizBoxText  then
            local teller = uservariables['NewMessages'] + 1
            commandArray['Variable:NewMessages'] = tostring(teller)
            print(FrizBoxText.. 'nieuwe te melden bericht binnen')
            commandArray['Bureau R 15'] = "On"
        end
        i = i+1
    end
end

if devicechanged['NieuweOproepen']== 'Off' and otherdevices['smsNieuweOproepenActief']=='On' then
    if (uservariables['NewMessages'] == 1) then
        print('één nieuw bericht')
        commandArray["SendSMS"] = "1 nieuwe bestelling voor leveringen Frankrijk"
     elseif (uservariables['NewMessages'] > 1 ) then
        print(uservariables['NewMessages']..' nieuwe berichten')
        commandArray["SendSMS"] = uservariables['NewMessages'].." nieuwe bestellingen  voor leveringen Frankrijk"
    elseif (uservariables['NewMessages'] == 0 ) then
        print('geen nieuwe berichten')
        commandArray["SendSMS"] = "GEEN nieuwe bestellingen voor leveringen Frankrijk"
    end
   commandArray['Variable:NewMessages'] = tostring(0)
end

return commandArray
Hoggle
Posts: 4
Joined: Thursday 05 May 2016 9:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: FritzBox Callmonitor

Post by Hoggle »

Many thanks for your answere.
For incomming connections (before it is answered by someone or the ansewring machine i didn't know how to implement it..
It is not possible to extract "Call From" from the text "Fritzbox" to say "telephone is ringing"?
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: FritzBox Callmonitor

Post by Thomasdc »

i thought i need an 'DeviceChanged' ... thats why i use the 'call' ;)
i dont know how to execute a script when just an sValue changed..
but once you can do that, it is possible to just check the 'call from' to activate a switch indeed!
Hoggle
Posts: 4
Joined: Thursday 05 May 2016 9:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: FritzBox Callmonitor

Post by Hoggle »

It is possible to put the state "'call from", "Connected " or "Disconnect " in a variable?
How?
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: FritzBox Callmonitor

Post by Thomasdc »

im not sure what you mean..

but normally yes, its possible to put parts from the sValue from the fritzbox in a uservariable (string)
Hoggle
Posts: 4
Joined: Thursday 05 May 2016 9:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: FritzBox Callmonitor

Post by Hoggle »

but normally yes, its possible to put parts from the sValue from the fritzbox in a uservariable (string)
Exactly.
Do you have an example or keyword for my search, to find an example code?

Many thanks in advance

Regards Hoggle
Thomasdc
Posts: 133
Joined: Wednesday 11 March 2015 19:13
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: FritzBox Callmonitor

Post by Thomasdc »

just someting like:

uservariables['Your_sVariable'] =otherdevices_svalues['FritzBox']

and for stringfunctrions:
http://lua-users.org/wiki/StringLibraryTutorial
(probably need the string.sub (see in the link)
honselbonsel
Posts: 18
Joined: Thursday 17 August 2017 20:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: FritzBox Callmonitor

Post by honselbonsel »

Hi Anybody,
are there any news about the CallMonitor. I had also the idea to have an event triggered when a call is incoming. Unfortunately i can not find any documentation about this Domoticz module/plugin.


thx
jens
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests