Want NR to phone you anywhere to warn you of an alarm?

Do you want NR to phone you to warn you of an alarm for example?

For those who want to be called on their cell phone by their home automation, in case of alarm for example, here is what I set up. I use for this the software from Linphone.

You can see a short visual and auditory demo here

It is relatively simple.

  1. First of all, you have to buy 2 SIP virtual phone numbers. Your ISP can rent them to you at about 1,30€ per month.

  2. Install a SIP client on your smartphone and register your first number. Make sure you are online.

  3. Install the Linphone software on your home automation, for me, it is a Pi under Linux.

Follow the steps below: :point_down:

Install Linphone

sudo apt install linphone

Linphone configuration

linphonec

Starting the SIP daemon

linphonecsh init -c ~/.linphonerc

Look if the default port is well occupy by linphonc daemon

sudo lsof -i -P -n | grep LISTEN
image

And now make a call with a wav file registered before like:

image

And now, in order, the commands to make to call from your Pi:

sound initialization:

linphonecsh generic "soundcard use files"

Start a call to your personal phone by exemple :

linphonecsh generic "call 004122nnnnnn"

When answering, play the wav file wanted

linphonecsh generic "play /home/pi/Documents/Sound/msg1.wav"

And terminate the call after a delay

linphonecsh generic "terminate"

It remains to use a flow NR to make phone calls in case of alarm or other needs.
Here below an example to adapt for your personal use.
Think of changing the SIP phone number (or fixed number) by your own

Et voilà ! :smiley:

[{"id":"7b282b0f357e4620","type":"tab","label":"Linphone - Alarme","disabled":false,"info":""},{"id":"f32eb89aafa3a63e","type":"exec","z":"7b282b0f357e4620","command":"linphonecsh generic \"call 0041224444444\"","addpay":false,"append":"","useSpawn":"true","timer":"25","winHide":false,"oldrc":false,"name":"Call my smartphone","x":760,"y":207,"wires":[["a3724ac1b9fcccd2","1b44f7cb0ecb9bc2"],[],[]]},{"id":"97ade5cb70a21412","type":"exec","z":"7b282b0f357e4620","command":"linphonecsh generic \"terminate\"","addpay":false,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"Termine l'appel en cours","x":1015,"y":460,"wires":[[],[],["f19bd5f304608062"]]},{"id":"a3724ac1b9fcccd2","type":"debug","z":"7b282b0f357e4620","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":970,"y":140,"wires":[]},{"id":"14d8dd2f0168c881","type":"inject","z":"7b282b0f357e4620","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1000,"y":360,"wires":[["97ade5cb70a21412"]]},{"id":"846710200c9b68f2","type":"ui_button","z":"7b282b0f357e4620","name":"","group":"35f1909c.48c1a","order":1,"width":0,"height":0,"passthru":false,"label":"Alarme C.O","tooltip":"","color":"","bgcolor":"","icon":"fa-phone","payload":"","payloadType":"date","topic":"","x":190,"y":40,"wires":[["14ad467ff32f8336"]]},{"id":"fc912c40f67f37d3","type":"ui_button","z":"7b282b0f357e4620","name":"","group":"35f1909c.48c1a","order":2,"width":0,"height":0,"passthru":false,"label":"Raccrocher le téléphone","tooltip":"","color":"","bgcolor":"","icon":"fa-phone-square","payload":"","payloadType":"str","topic":"","x":1030,"y":400,"wires":[["97ade5cb70a21412"]]},{"id":"4ebc7dac40a28fc2","type":"exec","z":"7b282b0f357e4620","command":"linphonecsh generic \"soundcard use files\"","addpay":false,"append":"","useSpawn":"true","timer":"25","oldrc":false,"name":"Défini usage of waw","x":500,"y":220,"wires":[["f32eb89aafa3a63e"],[],[]]},{"id":"1761beee730a431d","type":"exec","z":"7b282b0f357e4620","command":"linphonecsh generic \"play  /home/pi/Documents/Sound/msg1.wav\"","addpay":false,"append":"","useSpawn":"false","timer":"25","winHide":false,"oldrc":false,"name":"Play C.O chaudière","x":490,"y":360,"wires":[["f659ced7eb976764"],[],[]]},{"id":"f659ced7eb976764","type":"delay","z":"7b282b0f357e4620","name":"","pauseType":"delay","timeout":"25","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":800,"y":460,"wires":[["97ade5cb70a21412"]]},{"id":"d79ca253f29b8bdd","type":"link in","z":"7b282b0f357e4620","name":"Call Phone Sip","links":["30f9cb55.cc9314","29eafc3f.f4d3f4","aff086a3.04b3e8"],"x":235,"y":160,"wires":[["ef7828fd7a7f2fa5"]]},{"id":"5b9ff26b01507b79","type":"switch","z":"7b282b0f357e4620","name":"D'où vient l'alarme ?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"CO","vt":"str"},{"t":"eq","v":"Fumée","vt":"str"},{"t":"eq","v":"Fumée étage","vt":"str"},{"t":"eq","v":"Fumée chambre David","vt":"str"},{"t":"eq","v":"Pompe-panne","vt":"str"},{"t":"eq","v":"Pompe-Voltage","vt":"str"},{"t":"eq","v":"Fumée cave","vt":"str"}],"checkall":"false","repair":true,"outputs":7,"x":220,"y":320,"wires":[["1761beee730a431d"],["6107f8ae5f38ae03"],["cbec6f29411842b0"],["688af06cdd4e992d"],["06691c99a5677956"],["e91ad1513f3046de"],["202e6281af1d4c4d"]],"outputLabels":["Détection de CO chaudière","Fumée chaudière","Fumée étage","Fumée chambre David","Pompe-panne","Pompe-Voltage","Fumée cave"]},{"id":"6107f8ae5f38ae03","type":"exec","z":"7b282b0f357e4620","command":"linphonecsh generic \"play  /home/pi/Documents/Sound/msg2.wav\"","addpay":false,"append":"","useSpawn":"false","timer":"25","oldrc":false,"name":"Play fumée chaudière","x":500,"y":420,"wires":[["f659ced7eb976764"],[],[]]},{"id":"0bd95f7db4a2f2a0","type":"inject","z":"7b282b0f357e4620","name":"Inject alarme CO","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":80,"wires":[["14ad467ff32f8336"]]},{"id":"14ad467ff32f8336","type":"function","z":"7b282b0f357e4620","name":"msg-out \"CO\"","func":"global.set(\"msg-out\",\"CO\");\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":80,"wires":[["4ebc7dac40a28fc2"]]},{"id":"cbec6f29411842b0","type":"exec","z":"7b282b0f357e4620","command":"linphonecsh generic \"play  /home/pi/Documents/Sound/msg3.wav\"","addpay":false,"append":"","useSpawn":"false","timer":"25","oldrc":false,"name":"Play Fumée mezzanine étage","x":530,"y":480,"wires":[["f659ced7eb976764"],[],[]]},{"id":"688af06cdd4e992d","type":"exec","z":"7b282b0f357e4620","command":"linphonecsh generic \"play  /home/pi/Documents/Sound/msg4.wav\"","addpay":false,"append":"","useSpawn":"false","timer":"25","oldrc":false,"name":"Play Fumée ch. David","x":500,"y":540,"wires":[["f659ced7eb976764"],[],[]]},{"id":"06691c99a5677956","type":"exec","z":"7b282b0f357e4620","command":"linphonecsh generic \"play  /home/pi/Documents/Sound/msg5.wav\"","addpay":false,"append":"","useSpawn":"false","timer":"25","oldrc":false,"name":"Play Pompe-panne","x":490,"y":600,"wires":[["f659ced7eb976764"],[],[]]},{"id":"e91ad1513f3046de","type":"exec","z":"7b282b0f357e4620","command":"linphonecsh generic \"play  /home/pi/Documents/Sound/msg6.wav\"","addpay":false,"append":"","useSpawn":"false","timer":"25","oldrc":false,"name":"Play Pompe 0 Volt","x":490,"y":660,"wires":[["f659ced7eb976764"],[],[]]},{"id":"202e6281af1d4c4d","type":"exec","z":"7b282b0f357e4620","command":"linphonecsh generic \"play  /home/pi/Documents/Sound/msg7.wav\"","addpay":false,"append":"","useSpawn":"false","timer":"25","oldrc":false,"name":"Play Fumée cave","x":490,"y":720,"wires":[["f659ced7eb976764"],[],[]]},{"id":"1b44f7cb0ecb9bc2","type":"function","z":"7b282b0f357e4620","name":"Récupère la variable msg-out","func":"var message = global.get(\"msg-out\") || 0;\nmsg.payload = message\nreturn msg;","outputs":1,"noerr":0,"x":1020,"y":194,"wires":[["9fa011ddc9ea067e"]]},{"id":"9fa011ddc9ea067e","type":"delay","z":"7b282b0f357e4620","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"x":1231,"y":194,"wires":[["5b9ff26b01507b79"]]},{"id":"ef7828fd7a7f2fa5","type":"delay","z":"7b282b0f357e4620","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":180,"y":220,"wires":[["4ebc7dac40a28fc2"]]},{"id":"f19bd5f304608062","type":"debug","z":"7b282b0f357e4620","name":"Debug Termine l'appel","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1260,"y":473,"wires":[]},{"id":"35f1909c.48c1a","type":"ui_group","name":"☎  Téléphone","tab":"8fc69317.2b6ca","order":6,"disp":true,"width":"6","collapse":false},{"id":"8fc69317.2b6ca","type":"ui_tab","name":"Maintenance","icon":"settings_applications","order":11,"disabled":false,"hidden":false}]

Jean-Luc, nice possibility but tell me what advantage this non-cost free alternative would give in comparison with cost free alternatives? Like me, I'm using Telegram, it has all I can imagine. When there is an alarm in my home automation, NR calls my iPhone via Telegram and can attach both images and video to the text message. And then you can respond via Telegram since it supports two way communication. There are several other comparable free services available I know other people are using, even email to phone works for some

Correct. I also use Telegram and email in parallel, that said, if you want to call a landline or smartphone without the Telegram app, it's useful.
The SIP phone is also very useful to call from anywhere to anywhere. I use it between different countries to call people who do not have these applications. A company for example.
The call is free.
You can also call me on this landline number for free for the caller, no matter where I am.

3 Likes