This project allows me to answer my door via SIP calls when someone presses the doorbell. These are the prerequisites…
- A doorbell that has integrated into HA. It can be a smart switch, buttons, etc… I am using a 433Mhz doorbell with OpenMQTTGateway.
- An Android phone or tablet with option to “use Internet calling” “for all calls”. Apparently not all phones have such option. My Xiaomi phones don’t have such options. I manage to find it in my old Samsung Galaxy Tab 7.7. Not sure about other phones.
- Install Tasker and MQTT Client into the phone.
- Bluetooth speaker with mic such as this one; http://amzn.to/2kpc51W.
- SIP/VOIP server. It can be self hosted or from third party. I’m using my existing IP PBX server.
Once you have all these ready, start with the automation in HA…
- alias: 'Door Bell'
trigger:
platform: mqtt
topic: home/doorbell
payload: 'on'
action:
- service: mqtt.publish
data:
topic: home/frontdoor/call
payload: '[SIP number/extension to call]'
Just make sure the publish payload is the SIP number or extension that you want to reach when someone press the doorbell. It can be a ring group number where it will ring multiple extensions.
Next, place the Android phone near the door at indoor. You can mount it on a wall if you wish. If you mount it on a wall, you may consider to use it as control panel for your smart home. Now go to the phone and setup internet calling using the native phone app. The most important part is to select the option to use Internet calling for all calls.
Try call other SIP extension (just number without suffix with server address) using the native phone app. If it goes through, then you are good to go.
Next go to MQTT Client app. Add your broker if you haven’t done so. Then add this topic home/frontdoor/call
. Now you are done with the MQTT Client app.
Now open Tasker. Under Profiles tab, click on the + button on the bottom right. Select Event > Plugin > MQTT Client > Message Arrived. Edit the Configuration. Select the topic home/frontdoor/call
and enter sipnum
for varmessage and topic
for varmqtttopic. Click save.
Click back and enter New Task. Give it a name, example: “Call SIP Number”.
Then add new action. Select Phone > Call. Under Number, enter %sipnum
and select “Auto Dial”…
Setting in Tasker is done.
Now, you need to mount the Bluetooth speaker somewhere strategic at outdoor. Make sure the power cord is long enough to reach the power source. Turn on the speaker and pair it to your phone/tablet using Bluetooth and you are done!