Page 1 of 1

FritzBox Callmonitor

Posted: Saturday 12 March 2016 18:51
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 :)

Re: FritzBox Callmonitor

Posted: Saturday 19 March 2016 9:02
by Albsucher
Hello,

see the Domoticz WIKI how to setup the Call monitor.

Re: FritzBox Callmonitor

Posted: Saturday 23 April 2016 18:51
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?

Re: FritzBox Callmonitor

Posted: Thursday 05 May 2016 9:39
by Hoggle
Hi,

did you solve your problem?

Hoogle

Re: FritzBox Callmonitor

Posted: Thursday 05 May 2016 13:38
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

Re: FritzBox Callmonitor

Posted: Thursday 05 May 2016 14:56
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"?

Re: FritzBox Callmonitor

Posted: Thursday 05 May 2016 15:13
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!

Re: FritzBox Callmonitor

Posted: Thursday 05 May 2016 15:30
by Hoggle
It is possible to put the state "'call from", "Connected " or "Disconnect " in a variable?
How?

Re: FritzBox Callmonitor

Posted: Thursday 05 May 2016 17:39
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)

Re: FritzBox Callmonitor

Posted: Thursday 05 May 2016 18:14
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

Re: FritzBox Callmonitor

Posted: Friday 06 May 2016 9:21
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)

Re: FritzBox Callmonitor

Posted: Thursday 18 January 2018 13:18
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