We have moved at community.getvera.com

Author Topic: Reactor - Announcements (New Users Start Here!)  (Read 14466 times)

Offline rigpapa

  • Moderator
  • Hero Member
  • *****
  • Posts: 1121
  • Karma: +187/-3
Reactor - Announcements (New Users Start Here!)
« on: June 15, 2018, 05:41:19 pm »
Lately there have been a lot of requests for assistance with conceptually simple triggering tasks that remain outside the reach of Vera's built-in trigger conditions for scenes. Many have also voiced a resistance to using Lua or PLEG for various reasons (learning curve, resource constraints, etc.). I have also fielded a lot of inquiries about how to do certain triggering tasks for DelayLight. As I pondered these issues, and in particular considered the value of making more capability in this area separate from DelayLight, I decided to take a stab at my own version of a logic plugin.

This is Reactor. Reactor is meant to be a milestone along the power path of GUI-based logic controllers between Vera's native scene triggers and the almighty PLEG. It responds to a set of configurable conditions, implementing the semantics of a motion/door sensor (aka the SecuritySensor1 service), and so can be used to trigger scenes, etc. Users create trip conditions in a simple GUI. Conditions live in one or more "condition groups." For a Reactor Sensor to be tripped, all of the conditions in any of the groups must be met (i.e. AND between conditions within a group, OR between groups). As a single-instance plugin, it controls all of its timers from a single copy of the core parent code, making it very efficient on your system resources.

Here are some typical use cases one could address with Reactor, taken from recent discussions:
  • Trigger a notification or scene if the garage door is left open for more than 5 minutes between the hours of 10am and 6am;
  • Trigger a scene to run at 5am on the 2nd Sunday of March and 1st Sunday of November every year (US DST change);
  • Trigger a scene when the house is in Away or Vacation mode and the Nest thermostat leaves "Away" mode;
  • Trigger a notification when a child enters the home and a parent is not home (latchkey);
  • Turn off a light or fan that's controlled by a motion sensor when the sensor's untrip message has been missed and the light has been on too long.
  • Turn on all the lights in the room if the main light is turned on-off-on within 10 seconds.
Reactor can be installed from the Vera Plugin Marketplace, or for users of ALTUI (on Vera or openLuup) via the AltAppStore. You can also grab the latest release from the Github repo and install it manually. The repo's stable branch contains the most recent updates that pass basic QA.

Before posting a question or reporting a problem, please read this post.

Documentation: Reactor Wiki

PLEASE DONATE TO SUPPORT THIS PROJECT. Reactor is free to use, and I have no plans to ever charge for it, but if you find it useful, please make a small donation to support its ongoing development.


REVISION HISTORY
Note: You can always see the current release info and latest changes by looking at the CHANGELOG.md file in the Github repo.

2019-01-27: Reactor 2.2 introduces a number of new features and fixes, further described in the CHANGELOG.

2019-01-13: Reactor 2.1 primarily addresses UI misbehaviors. If you are using 2.0, or have patched 2.0 with an update UI JavaScript file, please update to 2.1. All patch fixes are included in this release. Thanks to everyone who contributed comments and assisted with screenshots, logic summaries and logs.

2018-12-23: Release 2.0 was approved by Vera on Jan 7 2019, so they were a bit slow over the holidays. The biggest change in this release was the introduction of a full suite of Activities, so you can have Reactor perform actions directly, without creating scenes. For a full list of changes, please see the CHANGELOG. Also, check out the new documentation on the Github wiki!.

2018-11-11: Release 1.8. This version adds support for twilight (civil, nautical, and astronomical) in the "sunrise/sunset" condition, and contains other minor bug fixes.

2018-11-04: Release 1.7. This is a maintenance release that fixes a bug in "between" time conditions that can cause Reactor to miss "end of span" timing. It also further improves update checks for certain time-based conditions, and improves summary output (that part's to help me help you).

2018-09-30: Release 1.6. This version fixes a startup crash caused by scenes with empty actions (e.g. Lua only); it introduces several new options or features of existing options; it provides a UI for a previously undocumented backup and restore feature, and addresses a few small UI glitches. Please refer to the CHANGELOG linked above.

2018-08-27: Release 1.5 is available in the Vera Plugin Marketplace and AltAppStore. This version has internal scene triggering and execution; scenes run by Reactor that have delayed activity groups will survive Luup reloads (unfinished work will be completed after the event). The Reactor master device now tracks VeraSecure battery level and power source (AC or DC), so you can trigger based on these (use a service condition pointed at the Reactor device). Lots of optimizations to further reduce system load.

2018-08-12: Release 1.4 rekeased. This was a bug fix release only (see change log above if you're interested in the details).

2018-08-05: Release 1.3 now in AltAppStore and Vera Plugin Marketplace. Major additions: expressions and variables for interim results and even more logic capability (e.g. compare values of state for two different devices); repeat count over time (e.g. trip when event happens 3 times in 10 seconds); "Luup Reloaded" condition (to trigger something once on restart); there's more, see the change log (note above).

2018-07-26: Update to stable branch (install manually or via AltAppStore 0.github version) introduces variables with expressions and repeat event counting/timing. Detail in this post. I'd appreciate any testing and feedback. Planned for formal release in 1.3 (Aug 5).

2018-07-08: Version 1.2 has been released to the Vera Plugin Marketplace (expected available tomorrow), and the AltAppStore (immediately available). This version provides a new date/time condition to replace the old (which is now deprecated and will be removed at 1.5), which has more definitive control, and separates sunrise/sunset to its own condition (with offsets). It also adds a "test" configuration screen to manipulate the (apparent) current date/time so you can test these conditions more easily. A new Runtime state variable accumulates the total time a ReactorSensor has been tripped (resettable; use for tracking furnace fan runtime for filter replacement, for example). And adds the missing UI for arming/disarming the sensor, plus bug fixes and other minor changes (see the CHANGELOG as usual).

2018-07-02: Version 1.1 has been released to the Vera Plugin Marketplace and AltAppStore. This version has a lot of bug fixes (most minor, a couple significant), and two new features: "sequences light" (creating time-dependency between conditions), and a real-time status display so you can see the logic in action.

2018-06-24: Version 1.0 has been released to the AltAppStore and Vera Plugin Marketplace.

2018-06-17: alpha1 released to Vera Plugin Marketplace.
« Last Edit: January 28, 2019, 12:04:01 pm by rigpapa »
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3, Lite. Hassio, Slapdash.

Offline rigpapa

  • Moderator
  • Hero Member
  • *****
  • Posts: 1121
  • Karma: +187/-3
Re: Reactor - Announcements (New Users Start Here!)
« Reply #1 on: September 30, 2018, 01:26:09 pm »
Reactor 1.6 has been sent to Vera for approval for the Vera Plugin Marketplace (expected available tomorrow, Monday), and is immediately available to users of the AltAppStore.

This version fixes a startup crash caused when a trip/untrip scene has no actions (e.g., just Lua), adds some new options to service/variable conditions, and fixes some UI glitches (in particular the display of "hidden" scenes on the scene selector). More information is available in the CHANGELOG on Github.

I am going to continue to produce bug fix releases as needed, and minor feature updates, as I work on the much bigger project of implementing a scene builder for v2.0 as previously discussed.

Thank you to everyone for your questions, suggestions, and support!
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3, Lite. Hassio, Slapdash.

Offline rigpapa

  • Moderator
  • Hero Member
  • *****
  • Posts: 1121
  • Karma: +187/-3
Re: Reactor - Announcements (New Users Start Here!)
« Reply #2 on: December 24, 2018, 09:56:10 am »
Reactor 2.0 is now released. It has been submitted for approval to the Vera Plugin Marketplace, but as of this morning, Vera has not yet approved it or two other plugins I've submitted updates to, so they appear to be a bit off their usual schedule (likely just holiday staffing). It is available immediately from the AltAppStore, however, and if you want to download and install it manually, you can find the release package on Github.

Reactor 2.0's biggest change is the introduction of a full suite of Activities, so you can have Reactor perform actions directly, without creating scenes. For a full list of changes, please see the CHANGELOG.

Also, check out the new documentation on the Github wiki!.

UPDATE: AS OF MONDAY 12/31/18, VERA HAS STILL NOT APPROVED PLUGIN UPDATES SUBMITTED THE WEEK BEFORE LAST. APPARENTLY THEY ARE STILL IN VACATION MODE. IF YOU WANT TO INSTALL 2.0 ON A VERA, YOU'LL HAVE TO DOWNLOAD THE ZIP RELEASE PACKAGE FROM GITHUB AND INSTALL IT MANUALLY.
« Last Edit: December 31, 2018, 01:40:32 pm by rigpapa »
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3, Lite. Hassio, Slapdash.

Offline rigpapa

  • Moderator
  • Hero Member
  • *****
  • Posts: 1121
  • Karma: +187/-3
Re: Reactor - Announcements (New Users Start Here!)
« Reply #3 on: January 14, 2019, 10:06:04 am »
Reactor 2.1 is now released available in both the Vera Plugin Marketplace and AltAppStore.

This release addresses a number of UI issues people have run into (including all in patch updates since the 2.0 release). It contains no new features.
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3, Lite. Hassio, Slapdash.

Offline rigpapa

  • Moderator
  • Hero Member
  • *****
  • Posts: 1121
  • Karma: +187/-3
Re: Reactor - Announcements (New Users Start Here!)
« Reply #4 on: January 28, 2019, 12:03:18 pm »
Reactor 2.2 is now released and available in the Vera Plugin Marketplace and AltAppStore.

* Enhancement: Allow invert of group state (i.e. return false when all conditions are met); makes some logic simpler for users.
* Enhancement: Groups can now be moved up and down (like conditions), just for organizational purposes (order has no meaning to the logic). It's also possible to delete a group directly (previously you had to delete all of its conditions one-by-one, and that would then delete the group). The enable/disable control was made an icon in the same control group as the foregoing tools for consistency and better appearance.
* Enhancement: When editing variable expressions, a new "insert getstate" tool is available to more easily fetch device state variable values into the expression.
* Enhancement: Reactor will check "Run Lua" fragments by putting them through Lua loadstring(), as an early check for syntax errors.
* Enhancement: Reactor now implements service SwitchPower1, which mirrors the SecuritySensor1 state (i.e. the binary light is on when the ReactorSensor is tripped; off when it is untripped); this allows facilities that don't support SecuritySensor1 but can support SwitchPower1 to sense and manipulate the ReactorSensor.
* Enhancement: New condition type "geofence" lets you react to one or more users being home, or not at home, or in one of the user's configured locations.
* Enhancement: Show current value of state variable when selecting configuring service conditions (conditions that test service state variables). The display value will be truncated to 64 characters. Hovering over the displayed value or "Current value" label will display the entire string.
* Enhancement: RunLua actions can now use Reactor.dump() to display the content of tables (e.g. `print(Reactor.dump(luup.scenes))`).
* Enhancement: attempt to load the ACE editor if it is not loaded, so it can be used to edit RunLua code with syntax highlighting under both UI7 and AltUI (AltUI loads ACE for us). Note: ACE is disabled by default currently on UI7, as there is some issue with Chrome/Mac; it seems to work for other browsers, so if you want to try/use it, set the `UseACE` state variable to "1" on the Reactor master device.
* Enhancement: "change" operator now supports "from" and "to" values, so a condition can test more than just if the value changes at all, but also if it changes from/to specific value (e.g. house mode changes from Away to Home).
* Fix an issue where cache expiry of condition state data may cause trip/untrip manual action buttons to fail to execute Lua fragments in the activities. This does not affect the normal, automatic operation of trip/untrip in response to conditions, only manual.
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3, Lite. Hassio, Slapdash.