Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,


as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.


As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!



Smart Home Forum by FIBARO Team

Voip call on Alarm


Recommended Posts

Dear Fibaro,


Because of urgently of an alarm/co2/smoke trigger it is important to get direct notification.

Is it possible to use the HC2 voip capabilities to call an phone number?

Or is their a phone dialer planned?


Best Regards



Link to comment
Share on other sites

Hello Jacques.



Please login or register to see this link.


HC2 can manage user rights and supports VoIP functionality and video intercoms.


In the maual they also talk about a Voip panel

Link to comment
Share on other sites

Hello Jacques,


I managed to have my HC2 system calling my iphone in case of alarm/fire/flooding for already a few years, working well, however not using the voip system of the HC2 (was not aware of this possibility until recently).

In my situation, the HC2 triggers a script (different for the various types of alarms) on a raspberry pi computer, which in turn is setup as a voip phone, calling my iphone.

if you are interested, I can post a setup instruction (need to dig through some old files though, has been a few years since I have setup this system).







Link to comment
Share on other sites

Hello @Sjakie and @Jacques


Herewith the description on how to setup a SIP/VOIP dialer HC2/Raspberry combination. I hope this is complete, it has been a while since I put this in place on my HC2, but working fine already for a few years now.

Let me know if there are any questions on this.





Setup HC2 with Raspberry Pi to call phone in case of alarm


Setup on HC2:


-        Create a virtual device with one button per alarm type (alarm, fire, flooding, etc.)  with the following LUA code per button (of course, php filename differs per button. The IP address is the address of the Raspberry on which the php code will be run (default port 80):



r1, s1, e1 = PI1:GET("/fibaro-inbraak.php");


-        Triger the appropriate button of this virtual device in the various alarm scenes


Setup on RasPi:


-        Install apache2 (webserver for RasPi), PHP (required to run shell script 

-        Install (and configure) sip-phone dialer pjsip/pjsua, details on how to install can be found at the following link)  

Please login or register to see this link.

-        Note that the dialer uses espeak, so that a text from a text file can be spoken and used for the message text of the phone call. 

With the old Raspberry I was using at the time, the process of text-to-speak conversion, speaking the resulting wav file and dialing was a bit too much for the Raspberry. I modified the code slightly, not using text-to-speak conversion anymore, but playing a pre-recorded wav-file for the phone-call instead. The modified c-code is given in the appendix.

-        Put all PHP scripts that you have defined in the Virtual Device in the Raspberry directory /var/www/html

-        The PHP scripts are as follows:



       $command=system("/home/pi/alarm/sip-alarm.sh >/home/pi/alarm/alarm.log 2>&1");

       $filename = "/home/pi/alarm/fibaro-alarm.txt";

       $fhandle  = fopen($filename,"r");

       $jsonspul = fread($fhandle,filesize($filename));






-        Each PHP script calls a bash-shell script, which is as follows:




# define sip-settings

sip_domain="NAME OF SIP SERVER";



play_file="/home/pi/alarm/fibaro-alarm.wav";  #pre-recorded message


# define number to call



# make call with sip-alarm

/home/pi/alarm/sip-alarm -sd $sip_domain -su $sip_user -sp $sip_password -pn $phone_number -s 1 -mr 2 -ttsf $play_file


-        For info: SIP server can be an external service, but some routers can be configured as a SIP server. I’m using an AVM-FritzBox, which I’ve configured as a SIP server


Please login or register to see this attachment.

Link to comment
Share on other sites

  • Topic Author
  • Many thanks Wim,


    I shall try your solution because it looks stable and you can generate a message.


    What I do now is depending on 2 other services.



    1. Fibaro detects movement.
    2. Swith on a light.
    3. Arlo camera detects light.
    4. Use IFTTT ARLO app let the Iphone ringing.





    Link to comment
    Share on other sites

    • 9 months later...

    wow this topic is best 
    i read like this topic in

    Please login or register to see this link.

    i have offer for my friend that read this caption .

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    • Create New...