dzVents meta-triggers

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
rrozema
Posts: 470
Joined: Thursday 26 October 2017 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Delft
Contact:

dzVents meta-triggers

Post by rrozema »

I was working on yet another script and had to scan through *all* devices once more for a particular feature I was trying to write. Then the thought occurred to me that it should be possible to cache certain information between calls, if only my script were notified of particular changes in Domoticz. I ask for an extra trigger event on:
  • domoticz start: called exactly once, just after domoticz (or the event system?) starts.
  • device added: called whenever a device is added (or enabled?).
  • device removed: called whenever a device is removed (or disabled?).
  • device changed: called whenever a device is saved and at least one attribute, other than it's value or it's last_update, is changed.
  • domoticz shutdown: called whenever domoticz is about to shutdown (added for completeness only).
Using such a set of triggers I could keep track of all devices matching certain criteria, so that every time a device's value changes I do not have to go through the full collection of devices to see if one matches my criteria.

Would it be possible to add such a trigger set, @dannybloe?
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents meta-triggers

Post by dannybloe »

Yes, that is what we are working on for 2.5.0. System events, hardware events etc.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
rrozema
Posts: 470
Joined: Thursday 26 October 2017 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Delft
Contact:

Re: dzVents meta-triggers

Post by rrozema »

I can't wait!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest