Page 1 of 1

Specific URL call if a door sensor is open/close

Posted: Tuesday 03 April 2018 14:28
by jafel
Hi,

First of all: domotic is a very cool software for xiaomi sensors, great!

I wanted to do the following thing:

If a door opens/closes i want to call a url from my server. For example:

If the door #1 is open, then call http://myserver.com/script.php?door=1&status=1

So the script and the variables door=1 and status=1 must be individual.

I tried to do this with the notifications http, but there i can only add a description, not an url? How can i realise that?

Thanks for your answer!
Jason

Re: Specific URL call if a door sensor is open/close

Posted: Tuesday 03 April 2018 14:40
by snellejellep
i think what you are trying to do is really simple with a blocky:
see image for example https://snellejellep.stackstorage.com/s/bM1YhBMvfSrIMr3

Re: Specific URL call if a door sensor is open/close

Posted: Wednesday 04 April 2018 18:23
by philchillbill
snellejellep wrote:i think what you are trying to do is really simple with a blocky:
see image for example https://snellejellep.stackstorage.com/s/bM1YhBMvfSrIMr3
You could just put the http:// in the on/off actions field for the corresponding switch in Domoticz. That’s also how Sonoffs are switched using Domoticz.


Sent from my iPhone using Tapatalk

Re: Specific URL call if a door sensor is open/close

Posted: Thursday 05 April 2018 8:50
by snellejellep
philchillbill wrote: Wednesday 04 April 2018 18:23
You could just put the http:// in the on/off actions field for the corresponding switch in Domoticz. That’s also how Sonoffs are switched using Domoticz.


Sent from my iPhone using Tapatalk
then i am really interested how you can call two http commands in that single field...

Re: Specific URL call if a door sensor is open/close

Posted: Thursday 05 April 2018 12:51
by philchillbill
snellejellep wrote:
philchillbill wrote: Wednesday 04 April 2018 18:23
You could just put the http:// in the on/off actions field for the corresponding switch in Domoticz. That’s also how Sonoffs are switched using Domoticz.


Sent from my iPhone using Tapatalk
then i am really interested how you can call two http commands in that single field...

Wrap them in a 2-line bash file with 2 curl statements.


Sent from my iPhone using Tapatalk