Simple event module
Posted: 08 Sep 2014 02:00
I'm currently running a script which continuously polls the z-way api for changes - as you can imagine this uses a lot of resources and isn't nearly as responsive as an event-driven system would be. So I've been scouring the internet to figure out a way of converting my polling system to an event-driven one, but can't find a decent example for the Z-Way server.
What I'm looking for is just a really simple example of wiring up a motion sensor so that every time it gets triggered it makes a call to an external URI. I've seen similar questions asked frequently on this board but haven't seen it properly answered, so a real working example could go a long way to helping out us newbies. From what I've read this should be possible using a custom automation module and a virtual device, but I'm very hazy on the exact implementation. Please, if you have something similar won't you paste an example so I can use it as a base? I'll update this topic with my findings in a hope that this answers the other queries I've seen as well.
Currently I'm just running repeated queries to a SwitchBinary resource such as "http://raspberrypi:8083/ZWaveAPI/Run/de ... nstances[0]", grabbing the data and then evaluating it. I'd really like to be able to fire off HTTP events whenever the switch status changes.
Please let me know if I can provide any further info - any help would be greatly appreciated :]
What I'm looking for is just a really simple example of wiring up a motion sensor so that every time it gets triggered it makes a call to an external URI. I've seen similar questions asked frequently on this board but haven't seen it properly answered, so a real working example could go a long way to helping out us newbies. From what I've read this should be possible using a custom automation module and a virtual device, but I'm very hazy on the exact implementation. Please, if you have something similar won't you paste an example so I can use it as a base? I'll update this topic with my findings in a hope that this answers the other queries I've seen as well.
Currently I'm just running repeated queries to a SwitchBinary resource such as "http://raspberrypi:8083/ZWaveAPI/Run/de ... nstances[0]", grabbing the data and then evaluating it. I'd really like to be able to fire off HTTP events whenever the switch status changes.
Please let me know if I can provide any further info - any help would be greatly appreciated :]