Page 1 of 1

dzVents meta-triggers

Posted: Monday 30 July 2018 12:32
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?

Re: dzVents meta-triggers

Posted: Monday 30 July 2018 12:57
by dannybloe
Yes, that is what we are working on for 2.5.0. System events, hardware events etc.

Re: dzVents meta-triggers

Posted: Monday 30 July 2018 14:08
by rrozema
I can't wait!