Call HTTP on event

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
m0rph13
Posts: 5
Joined: 12 Jan 2016 00:31

Call HTTP on event

Post by m0rph13 »

I would like to configure Z-way to open a certain URL at a certain time, or when a certain lamp is turned on/off.
Can someone point me in the right direction on how to acheive this?
Would I add the URL as a device?

(The result from opening the URL is of no interest in itself, its a fire-and-forget thing).

Thank you!
bogr
Posts: 190
Joined: 16 Nov 2015 22:46

Re: Call HTTP on event

Post by bogr »

Depends on where your preferences lie, but I don't like the dark hell of javascript ;), so I would create a logical rule:

Code: Select all

if light=on then HttpCall
and configure a CodeDevice (named HttpCall above) to call curl, e.g.

Code action for on:

Code: Select all

system('curl...')
but you must also place curl in

Code: Select all

pi@raspberrypi /opt/z-way-server/automation/.syscommands
You can also use the "If then" or Association module.
Post Reply