Logging presence using Domoticz and IFTTT

I needed a way to lower the heating when no one is at home.
My heating is controlled by a Danfoss zwave thermostats so I can interact with them.

I came out with a simple solution using Domoticz and IFTTT.

Let’s proceed step by step, assuming you have a Domoticz installation up and running,
otherwise install on your system clicking here https://www.domoticz.com/

Step 1: Domoticz configuration

1.1) create a dummy …….
then create a virtual sensor
screen-shot-2017-02-08-at-11-24-41

1.2) Choose the Switch sensor type and give it a meaningful name:
screen-shot-2017-02-08-at-11-25-06

1.3) Now go to devices and take note of the deviceID, we will need it later…Screen Shot 2017-02-08 at 11.25.33.png
… to change the switch status. The URL to call is in this format:
http://url:8080/json.htm?type=command&param=switchlight&idx=deviceID&switchcmd=On

Step 2: Set up IFTTT

2.1) First of all, your Domoticz needs to be reachable from IFTTT, in my case I opened a non-standard port on my firewall and enable the port forwarding to domoticz.
Keep in mind that if you open the port 10000 on the router firewall you need to forward to the 8080 port to reach Domoticz.
EX: http://my.host.domain:10000/pluto –> http://my.internal.domoticz:8080/pluto

2.2) Install IFTTT on your smartphone and create a new applet by clicking this:screen-shot-2017-02-08-at-12-01-45

Let’s start by choosing the location service:
screen-shot-2017-02-08-at-12-03-06

In the following screen choose the “Exit an area” trigger:
screen-shot-2017-02-08-at-12-03-59

Select the area around your home and create the trigger:screen-shot-2017-02-08-at-12-05-34

The last step will be to call you domoticz, so let’s move to the that action:
screen-shot-2017-02-08-at-12-09-45
and choose the “Maker” action:
screen-shot-2017-02-08-at-12-12-20

then add the url for domoticz using the deviceID from the 1.3 step.
make sure to use the port from the 2.1 step.
There will be something like:
http://username:password@yourIP:yourPort/json.htm?type=command&param=switchlight&idx=deviceID&switchcmd=On

screen-shot-2017-02-08-at-12-13-58
Don’t forget to add the very same rule for the “Enter Area” and using the same URL but changing On to Off :
http://username:password@yourIP:yourPort/json.htm?type=command&param=switchlight&idx=deviceID&switchcmd=Off