New Plugin: Deus Ex Machina

I’ve created a new plugin that is now available in Mios. If anyone tries it out, I’d love to hear feedback.

Deus Ex Machina is a plugin for the MiCasaVerde Vera home automation system. It takes over your house while you’re away on vacation by creating a ghost that moves from room to room, turning on and off lights. Simply specify the lights you want to have controlled by the plugin, specify a “Lights Out” time when lights will begin to turn off, and come sundown Deus Ex Machina will take over.

How It Works

Once Deus Ex Machina is activated, or the following Sundown occurs, it picks a random light from its configured list of lights, and switches its state. Deus Ex Machina continues doing this at random intervals between 5 and 30 minutes until the Lights Off time or Sunrise. When that happens, the same pattern is followed, however a random light in an On state is chosen to turn Off. Once all lights are off, Deus Ex Machina goes to sleep until the next Sundown.

Also, I can’t post external links, but there’s a GitHub repository if anyone wants to see the code, file bugs, or contribute. Search for DeusExMachina on GitHub. You’ll find it under my name, beowulfe.

@beowulfe

Great app. I have been trying it out tonight and it works well.

The only request is to enable it so it can be added to scenes. Right now it can only be activated through the settings menu. I currently use Google Calendar Switch to activate a “vacation” scene which turns down my thermostat. I would love to include this plug-in in that scene as well.

That’s a good suggestion @Trotsky40 – I’ll get that added!

Nice plugin (and nice name too). I’ll use it on my next holiday :slight_smile:

@beowulfe

I did have a question about the time off setting. In the configure tab, there is a setting for “enter time (after sunset) to begin turing off lights”. The default was set to 23:59 (I assumed this meant 11:59 pm) and changed it to 22:30 (10:30pm). Last night after 10:30pm the plug-in continued to run…

I looked in the advanced tab and saw the 'Lightsouttime". It appeared to show a very large number in seconds, so I thought maybe the setting on the cofigure tab wasn’t a “clock” time (i.e. 10:30pm) but the number of hours and minutes after sunset (i.e. 22 hours and 30 minutes after sunset). To test this I set the configure tab to 00:00 and the “Lightsoutime” went to zero. So far so good. Then I set the configure tab to 00:01 expecting the “Lightsouttime” to be 60 but instead it came back at 60,000 (about 16 hours and 40 minutes)

Is this setting not working correctly or am I misinterpretting something?

It is meant to be an absolute time. Looking over the code again, I think there’s a bug around times before midnight. I’ll get a new release out soon with that fixed and the scene support.

beowulfe
I just installed your plugin. When I open the config the only Device is shows is one zwave device - none of my Insteon devices, or my zwave lock or thermostat?
I use Altsteon plugin for Insteon - can you make it work with Alsteon devices?

Also, are you planning to have options for lights (on, off, dim level) and sunrise/sunset?
… it would be great to see an all-in-one plugin that can simulate occupancy.

thx

Thank you very much for this great plugin!
Excellent idea.
My wife and I are actually going on vacation soon so I will try it out.

One question, is there an option to exclude certain lights from coming on though?
Flo

Nevermind… just found it :slight_smile:

@Aaron - the plugin only controls lights right now, so your other z-wave devices won’t show up. I’m not too familiar with insteon – right now the plugin acts on any devices that implement schemas-upnp-org:device:BinaryLight:1. What’s the device-type that shows up in the advanced tab for your insteon switches?

I’m not sure what to do with dimmer switches besides on/off. Do you think randomly changing the brightness has any value? What other devices do you think are worthwhile?

Altsteon uses:
urn:geektaco-info:device:Dimmer:1

I ask because many of my lights are never 100% on… my main room is usually at 30% in the evening (and off all day long). So, if your intent is to simulate occupancy to deter would-be thieves… the plugin should simulate the occupancy as accurately as possible. Anyone casing the house (e.g. thieves that are good at thieving) would know something is not right if light pattern is different in any way.

… This is also why lighting changes base on time offsets from sunrise/sunset is necessary - it is more realistic.

beowulfe
can you add support for Altsteon devices?

Beowulfe:

Awesome idea - keep up the great work!

Has this been added? I currently have a vacation (away) scene that I trigger by enabling a virtual switch. I’d love to be able to enable your plugin from that away scene.

Thanks,

Hi Beowulfe,

This is functionality that was sorely needed by Vera. I could do this 20 years ago with my X-10 equipment, but until now there was no easy way to do this with Vera. I am going away this weekend so I just installed the plug-in but I was just wondering if the time bug has been fixed? If not, your answer implies that it will work correctly if I use a time after midnight, say 01:00. Is this correct? I want to set it up tomorrow so it’s working when I take my son back to college this weekend.

Thank you.

Hi,

first thanks for the plug in.

Any news for the scene support?

Thank you
Matteo

How can I ‘enable’ the Deus Ex Machina plugin from another scene? I have a virtual switch called vacation, and when it’s set to on, I’d like to use that as a trigger to to enable Deus, and vice-versa.

I tried:
luup.variable_set(“urn:micasaverde-com:serviceId:DeusExMachina1”, “Enabled”, “1”, 109)

where 109 is my vacation virtual switch.

Thanks!

I think the OP (Beowulfe) has dropped off the forum. He hasn’t updated the plug-in, posted to the forum, or responded to PMs in quite a while.

Has anyone made progress with integrating scenes with this plugin?

Specifically I am trying to use this plugin as a trigger for a vacation scene that controls thermostats. So when vacation plugin is enabled, then vacation scene runs per the schedule until vacation plugin is disabled.

I know that scenes have the option of writing luup as triggers for scenes but I don’t know luup. Any help would be appreciated.