Plugin: DeusExMachinaII (Deus Ex Machina for UI7 and beyond)

I am creating this thread as the (official) new home of DeusExMachinaII.

DeusExMachinaII (aka DEMII) is the UI7 (and beyond) version of beowulfe’s Deus Ex Machina plugin. It is a “vacation ghost” that manipulates a configurable set of lights on a random pattern. It can be triggered to run at sunset, or a specific time, and will run until a configurable “lights out” time. At lights out, it will turn off any lights it has turned on.

Documentation is available in the GitHub repository for the project.


UPDATE HISTORY
2019-12-01: Version 2.10. Uses a modern task scheduler to improve (and in some cases fix) timing. Adds a filesystem log of its own for easy supervision/diagnosis of activities.

2019-06-08: Version 2.9. This version includes instant house mode change response (feature imported from Reactor; it is not necessary to use Reactor to enable this feature in DEMII). It also fixes a bug in device state tracking that could leave some lights on when disabled while actively cycling.

2018-12-23: Version 2.8 released.

2018-10-15: Version 2.8RC1 release candidate.

2018-02-23: Version 2.8beta1. This version implements three previously requested enhancements: the ability to have a “wake up” scene that runs before cycling of lights begins, the full ability to control start and end of cycling from scenes, PLEG, Lua, etc. (disabling DEMIIs schedule entirely); and the ability to run different “Final” scenes when the house mode changes to an “inactive” mode.

2018-01-15: Version 2.7 (approved 2018-01-22) This version reverses a change introduced in 2.6 that was an attempt to address a minor issue with certain Fibaro and Qubino dimmers. Unfortunately, the fix works for those (apparently rare) products, but causes many other dimmers to turn on to 100% rather than the configured brightness level. I’ll look into other ways of handling the Fibaro/Qubino matter. Upcoming for the next release is the addition of a “wake up” scene that runs before lights begin cycling, the ability to have different scenes run when DEMII stops due to a house mode change, and the ability to more easily circumvent all of DEMII’s native timing and run as directed by “Wake” and “Sleep” actions (driven by PLEG, scenes, Lua, etc.). Longer-term, I’m looking at smarter algorithms for cycling, rather than just random selection.

@rigpapa, thanks again for this wonderful plugin.
It is great now, if you succeed in implementing the future plans described above, it is going to achieve total awesomeness! :slight_smile:

Just for your information, all my dimmers are all Fibaro (FGD-211 and FGD-212). They did not work correctly for dimming level before the 2.6 patch, with the patch they are working perfect. Was there another Fibaro dimmer that had the issues addressed in 2.6? I never had any issues with them that I am aware of prior to 2.6.

It was related to a firmware issue on the dimmer. I’m looking for my notes, but it had something to do with certain low-demand loads. The fix was an attempt to work around the issue and relieve users of the need to upgrade firmware on the dimmer unit (which apparently requires it be removed from its normally-installed location). Another case of cure worse than disease. The change gave my network of dozens of dimmers of various brands (Leviton, Cooper, GE/Jasco, Evolve, but no Fibaro) no issues. That is, I’m sure, a taste of what the folks at Vera get to deal with every day in dealing with all of these different elements.

Just wanted to say thanks as well. Keep up the amazing work!

Awesome plugin - looking for clarification on two items:

  1. The Max ON Time - If I were to put 45 minutes for a device (light), that device (lights) would stay on for exactly 45 mins then turn off, will it cycle back through again? OR only be on during the entire Start - Lights-Out time for 45mins?

  2. The Maximum ON Target - Does that correspond with how many devices would be on at once? If I were to pick 7, would there always be 7 devices on or not necessarily, just the max would be 7?

The max on time is a maximum, but if Deus decides to turn the light off sooner, it will. The light may also be turned on again later, but any time it is turned on, it will not be on for more than the max on time.

2) The Maximum ON Target - Does that correspond with how many devices would be on at once? If I were to pick 7, would there always be 7 devices on or not necessarily, just the max would be 7?
The max is 7, but at any given time, there could be fewer than 7.

Thank you!

I have a beta release of v2.8 of DeusExMachinaII up on GitHub. See the head of this thread for a link to the release.

This release includes three features previously promised:

[ul][li]The ability to run a scene before cycling of lights begins;[/li]
[li]The ability to run a special scene when the house mode changes to one in which the user has indicated that DEMII should not run;[/li]
[li]The ability to completely disable DEMII’s internal timing and have it activate/deactivate from scenes, PLEG, Lua, etc.[/li][/ul]

It also has a lot of code cleanup and “modernization” ported in from my evolving style and knowledge gained doing other plugins (this is my oldest plugin, and it still has a way to go).

I think this could be published on the AltAppStore too :wink:

And done.

So I have the “start time” to blank (sunset), but in the past few weeks I’ve been noticing that the lights are coming on during the day. Is there a way to trouble shoot this? I’m still running DE2.7 w/ Vera Plus with UI7

Without turning on debug, DEMII logs some pretty helpful information, so next time you see lights coming on when you think they should not, grab your log file and email it to me (my email address is on my profile).

10-4, thanks. is there a way i can go back until this morning during a specific time frame? I have cameras so i can look back and see when they came on.

Odds are your logs have rotated, possibly many times over. It’s best if you can catch it fresh.

Duhh… So I started to look through my logs and notice the date was 5/30 at 1:00am… My vera for some odd reason has the wrong time… :slight_smile: THANK YOU, you did help me

Does DEMII provide any guarantee that there will be at least one light on between startup and when it begins shutting down?
I think not, but just want to check my understanding.

Thanks.

[quote=“bobgor, post:16, topic:198291”]Does DEMII provide any guarantee that there will be at least one light on between startup and when it begins shutting down?
I think not, but just want to check my understanding.

Thanks.[/quote]
When it starts up and does its first random cycle, if all controlled lights are off, the only thing it can do is turn something on, so in the most general sense of your question, yes, unless the active period is shorter than the cycle delay, at least one will be turned on.

Does it guarantee that one light is on throughout the entire active period? No. It’s 100% random, so there always exists the possibility that it could turn off every light it has turned on at some point during the cycling period. But the odds go down, the more devices there are.

Makes sense, thanks.

Tried to update to the beta, exactly as described, but doesn’t update. I unchecked restart, I manually reloaded and refreshed and still shows 2.7.

When I made the beta package, I neglected to change the version number in the code (hate when I do that). So the beta will show 2.7 when installed.

At this point, there have been some other fixes applied, so it’s probably better than I make an updated package; it’s now a release candidate. You can download that here: Release Version 2.8 RC1 (2.8stable-180729) · toggledbits/DeusExMachina · GitHub

Installation via same method.